Pass different parameters to an IBAction

前端 未结 7 1461
面向向阳花
面向向阳花 2020-12-08 22:39

My iPhone app has many buttons and I want all the buttons to call the same method, but with different parameters.

For example I want tapping one button to call the m

7条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 23:38

    (id)Sender is shows that whatever u pass on UIButton click event is directly pass to this method and no matter that what type it is , it take automatically like if you pass button tag then it take button tag as sender.tag etc

提交回复
热议问题