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
Post a Comment