ios - prepareForSegue won't work with custom segue (swift) -


i've created custom segue , keeps giving same error. happened when i've created real simple uistoryboardsegue class.

overriding method selector 'prepareforsegue:sender:' has incompatible type '(customopensegue, anyobject?) -> ()'

this how i'm calling it

override func prepareforsegue(segue: customopensegue, sender: anyobject?) {      segue.iconframe = sender!.view!.frame  } 

my custom segue work without prepareforsegue (on simpler mode) need pass iconframe value work intended.

any suggestions?

change to

override func prepareforsegue(segue: uistoryboardsegue, sender: anyobject?) {     if segue customopensegue {         let customopensegue = segue as! customopensegue         customopensegue.iconframe = sender!.view!.frame     } } 

if override method, can't change parameter types.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -