Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IBAction methods in class extensions?

Is it good programming practice to define all (IBAction) methods associated with a NSViewController's .xib within a class extension?

like image 844
tgma4stuff Avatar asked Apr 23 '26 14:04

tgma4stuff


1 Answers

Everything that's in the class extension is private to your class.

So the real question here is your IBAction here is private to your view controller or not. If that's something used internally, like the press of a button to activate a function inside your view controller, then yes, put it in your class extension.

like image 74
gcamp Avatar answered Apr 27 '26 09:04

gcamp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!