When I link buttons to the source code (.h file in this case) and select NSButton
as type it Xcode will write:
- (IBAction)pushClear:(id)sender;
as far as I understand it should be
- (IBAction)pushClear:(NSButton)sender;
am I right, or just somewhat confused? If I link s.th. from within the iOS Interface Builder, everything seems to do what it should.
so will I have to fix these things by hand? Or is it ok the way it is (in the end, every things working fine. Just don't want to step into problems down the road.
EDIT:
Is there some sort of performanc开发者_开发问答e issue by just using?
- (IBAction)pushClear:(id)sender;
You can set type like this:
- (IBAction)pushClear:(NSButton *)sender;
if you are sure, that only NSButton
objects will send this actions.
If you are not sure, than you may leave:
- (IBAction)pushClear:(id)sender;
and inside of this method check that sender
is kind of class NSButton
.
精彩评论