objective c - Thread 1: EXC_BAD_INSTRUCTION (code=EXC_1386_INVOP, SUBCODE=0x0) -


when run app, error in these lines:

ballonview = (cell!.contentview.viewwithtag(0)!.viewwithtag(1) as? uiimageview)! label = (cell!.contentview.viewwithtag(0)!.viewwithtag(2) as! uilabel) 

here original code in objective-c, want in swift

balloonview = (uiimageview *)[[cell.contentview viewwithtag:0] viewwithtag:1]; label = (uilabel *)[[cell.contentview viewwithtag:0] viewwithtag:2]; 

so, can do?

if of associated storyboard elements youll need make sure connected , identified. in experience thats first place need check when there crash involving ui elements.

also, extremely beneficial unwrap optionals in safe manner well. 3 bangs in same line giant red flag.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -