How can I pass a parameter to this function?

前端 未结 6 964
既然无缘
既然无缘 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

    If you want to send an int value, set the tag of the button = the int value you want to pass. Then you can access the tag value of the button to get the int you wanted.

    NSInteger is not a pointer. Try this

    NSInteger tid = sender.tag;
    

提交回复
热议问题