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.
我UIView在指定的里面加了一个UITableViewCell,然后我在上面加了两个自定义按钮UIView。出现的问题是,当我点击按钮时,它没有响应该方法。
UIView
UITableViewCell
在创建按钮时,您是否为内部事件(或您使用的任何事件)添加了目标?
[tempButton addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside]; - (void) buttonPressed:(UIButton *) sender { //Your implementation }