Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 StoryBoard 上创建 UIButton,并为此 UIbutton 创建 Outlet,然后为 Touch Up Inside 创建一些方法。在标准按钮中有方法又名 TouchesEnded
也许这是愚蠢的问题,我是 Xcode 的新手,但我问如何在 TouchesBegan 上打开这个按钮?
谢谢
IBAction为您创建UIButton并将您的按钮连接到IBAction. 因为当您点击按钮时,您的方法就会被调用。
IBAction
UIButton
像这样的方法,
-(IBAction)butttonTaped:(UIButton *) Sender { // connect to your button }