简体   繁体   English

当点击子视图的UIButton时,我无法点击该子视图的另一个按钮

[英]When tap an UIButton of a subview, then I can't tap another button of that subview

I have an iPhone app, and when I tap a button, I add a subview (UIView) that have 3 buttons. 我有一个iPhone应用程序,当我点击一个按钮时,我添加了一个具有3个按钮的子视图(UIView)。

One is for public at Facebook, another is to tweet, and the last one is to hide the subview. 一种是在Facebook上公开,另一种是在Twitter上鸣叫,最后一种是隐藏子视图。

My problem is that when I've tap on facebook or tweet button and complete the post, then I can't tap other button. 我的问题是,当我点击Facebook或tweet按钮并完成帖子时,我无法点击其他按钮。

Can anyone help me? 谁能帮我?

Why don't you use an action sheet instead? 您为什么不使用操作表呢?

Here is the code: 这是代码:

UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:@"Share" delegate:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Facebook",@"Twitter", nil];
[actionSheet showInView:self.view];

It will look like this: 它看起来像这样:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM