leirbaggmj
leirbaggmj

Reputation: 67

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.

One is for public at Facebook, another is to tweet, and the last one is to hide the subview.

My problem is that when I've tap on facebook or tweet button and complete the post, then I can't tap other button.

Can anyone help me?

Upvotes: 0

Views: 160

Answers (1)

Abdullah Shafique
Abdullah Shafique

Reputation: 6918

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:

enter image description here

Upvotes: 1

Related Questions