【发布时间】:2013-05-08 13:53:57
【问题描述】:
我的按钮如下
- 已创建标签1
- 已创建标签2
- 创建自定义视图 (
UIView) - 在自定义视图中添加了 label1 和 label2
- 创建了 myCustomButton(
UIButton) - 在 myCustomButton 上添加了 customView
我已经为 custom_View、label1 和 label2 完成了 userInteractionEnable。
然后添加
[myCustomButton addTarget:self action:@selector(OnButtonClick:) forControlEvents:UIControlEventTouchUpInside];
还有
-(void)OnButtonClick:(UIButton *)sender
{
}
但即使我触摸按钮,也不会调用上述函数。有什么解决办法吗?
【问题讨论】:
-
请把您的相关代码放在这里?
标签: iphone ios uibutton uitouch