开发者

IBActions in class extensions

开发者 https://www.devze.com 2023-03-30 09:56 出处:网络
Is there a clean way to put IBActions in class extensions (without linking them to IB in .h, then moving to class extension in .m)?

Is there a clean way to put IBActions in class extensions (without linking them to IB in .h, then moving to class extension in .m)?

I can link or create the IBActions in IB, and them cut and paste them to the class extension in the .m. Is there a way to create them directly in the cla开发者_如何学Goss extension from IB?

Thanks


I just tried this and it works for me. What does your class extension look like? It should look like this:

@interface MyClass ()
- (IBAction)myAction:(id)sender;
@end
0

精彩评论

暂无评论...
验证码 换一张
取 消