Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
250
Swift equivalent for cellAtIndex method ?
posted

hi all, we're getting up to speed on swift, still early days! 

we r having a problem on this (datasource) func, at first line of code when the func is invoked :

IGFlowLayoutViewCell *cell = [flowLayoutView dequeueReusableCellWithIdentifier:@"CELL"];

we tried:

var cell = flowLayoutView.dequeueReusableCellWithIdentifier("CELL") as! IGFlowLayoutViewCell

but that crashes the app at runtime.


any help would be greatly appreciated. 


Swift method / signature)

func flowLayoutView(flowLayoutView: IGFlowLayoutView!, cellAtIndex index: Int) -> IGFlowLayoutViewCell! {

     var cell = flowLayoutView.dequeueReusableCellWithIdentifier("CELL"asIGFlowLayoutViewCell

      .....

}

Parents Reply Children
No Data