return from inside a @synchronized block in objective-c
@synchronized will automatically take down its exception-handling context when you return, and relinquish the lock. So the code you’ve written is fine.
@synchronized will automatically take down its exception-handling context when you return, and relinquish the lock. So the code you’ve written is fine.
The UITextView defines its delegate as @property(nonatomic, assign) id<UITextViewDelegate> delegate meaning it conforms to UITextViewDelegate, and that’s what compiler checks. If you want to use the new protocol, you need to redefine delegate to conform to your protocol: @interface MySubClass : UITextView { } @property(nonatomic, assign) id<MySubClassDelegate> delegate @end The compiler shouldn’t give any more … Read more
tl;dr – see the Conclusion at the bottom. I too have been getting occasional crash reports through from users regarding this, and then today suffered the indignity of it for myself. This was caused when selecting a row on my table view attempted to push a new nav controller, and then I pressed the back … Read more
Carl’s answer is right, but for the wrong reasons: there’s actually nothing wrong with linking static libraries together, as we can see using Carl’s own sample. Set-up Carl’s sample code and then do this: (I use libtool because that is what XCode uses) neutron:libtest jamie$ libtool -o a2.a a.a c.a neutron:libtest jamie$ libtool -o b2.a … Read more
Toll-free bridging means that the data structures are interchangeable. It is just as simple as casting — that’s the “toll-free” part. Anyplace you can use the type on one side of the bridge, you can use the other. So, for example, you can create a CFString and then send NSString messages to it, or you … Read more