ios - IBOutlet properties from Swift framework are missing from Objective-C app -
i have framework i've written in swift contains class extends uiview , has iboutlet property.
the class visible objective-c app, interface builder won't see iboutlet. here's code:
@objc protocol myframeworkdelegate { // delegate methods here ... } @objc class myframeworkclass: uiview { @objc @iboutlet var delegate:myframeworkdelegate? // rest of class here ... } i set view's class myframeworkclass in storyboard, delegate outlet isn't showing.
i tried , without @objc modifier, no luck. when inspect class objective-c, property comes without iboutlet.
anyone else came across that?
edit
here's code generated xcode swift -> objective-c conversion:
@protocol myframeworkdelegate; swift_class("_nc9a0xd6myframeworkclass") @interface myframeworkclass : uiview @property (nonatomic) id <myframeworkdelegate> delegate; ... also, here's error message when seek run app:
2014-06-22 21:41:59.095 myapp test[75211:17812266] unknown class myframeworkclass in interface builder file. 2014-06-22 21:41:59.099 myapp test[75211:17812266] -[uiview setdelegate:]: unrecognized selector sent instance 0xcf5d650 2014-06-22 21:41:59.101 myapp test[75211:17812266] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[uiview setdelegate:]: unrecognized selector sent instance 0xcf5d650' edit
here's screenshot of storyboard:
your module none, should select corresponding value.
ios objective-c frameworks swift
No comments:
Post a Comment