开发者

Multiple Sent Actions From One Button?

开发者 https://www.devze.com 2023-03-22 14:20 出处:网络
I feel like this should be rather simple but my google-foo is failing me right now.How can I have a button send actions to two things (in this case add a new Coredata object to an Array Controller and

I feel like this should be rather simple but my google-foo is failing me right now. How can I have a button send actions to two things (in this case add a new Coredata object to an Array Controller and open the editing 开发者_运维技巧panel).

Thanks!


Call one method which does both things.

E.g.

- (void)doCoreDataStuff {
//Core Data Stuff
}

- (IBAction)buttonAction:(id)sender {
[self doCoreDataStuff];
// Show the edit panel
}

Link it up to the second method...

0

精彩评论

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