How can I pass a parameter to this function?

前端 未结 6 959
既然无缘
既然无缘 2020-12-14 23:34

I have the following code:

[replyAllBtn addTarget:self.target action:@selector(ReplyAll:) forControlEvents:UIControlEventTouchUpInside];

- (void)replyAll:(         


        
6条回答
  •  遥遥无期
    2020-12-15 00:04

    A selector function will normally be defined as such:

    - (void) ReplyAll:(id)sender;
    

    So the only parameter an action will ever receives is the actual control that called it. You could just add a property to your control that can be read in replyAll

提交回复
热议问题