0
我想要一個UIButton這樣工作:首先點擊它,運行start_method;點擊它,運行stop_method;點擊它再次運行start_method;第四次點擊它,再次運行stop_method。這樣一個循環。如何在一個UIButton中實現Start和Stop動作?
當我設置按鈕:
[button addTarget:self action:@selector(start_method:) forControlEvents:UIControlEventTouchDown];
[button addTarget:self action:@selector(stop_method:) forControlEvents:UIControlEventTouchDownRepeat];
對此的反應,只要你點擊它兩個動作。
有什麼建議嗎?
簡單而漂亮。爲什麼我不這樣想! – Maadiah 2012-07-24 03:00:16
我很樂意提供幫助!我希望你的應用程序做得很好! – portforwardpodcast 2012-07-24 08:37:02