¡@

Home 

2014/10/15 ¤U¤È 10:14:40

iphone Programming Glossary: switchtonewsdetails

Passing parameters to addTarget:action:forControlEvents

http://stackoverflow.com/questions/3988485/passing-parameters-to-addtargetactionforcontrolevents

forControlEvents I am using addTarget action forControlEvents like this newsButton addTarget self action @selector switchToNewsDetails forControlEvents UIControlEventTouchUpInside and I would like to pass parameters to my selector switchToNewsDetails . The.. switchToNewsDetails forControlEvents UIControlEventTouchUpInside and I would like to pass parameters to my selector switchToNewsDetails . The only thing I succeed in doing is to pass the id sender by writing action @selector switchToNewsDetails But I am trying.. selector switchToNewsDetails . The only thing I succeed in doing is to pass the id sender by writing action @selector switchToNewsDetails But I am trying to pass variables like integer values. Writing it this way doesn't work int i 0 newsButton addTarget self..