UITABLEVIEW CELL POPUP MENU

Jessica James

Total Post:16

Points:114
Posted by  Jessica James
 1100  View(s)
Ratings:
Rate this:

In my application I am using custom table cell, in that cell I am having a button.

When I click that button it has to open a popup menu.

if ([strUserID isEqualToString:_LoginID]){

    [cell.editButton addTarget:self action:@selector(myoptionsmenu:)

forControlEvents:UIControlEventTouchUpInside];

} else {

    [cell.editButton addTarget:self action:@selector(otheroptionsmenu:)

forControlEvents:UIControlEventTouchUpInside];

}

This is working fine. For login user post, the menu will be myoptionsmenu:

For other users post, the menu will be otheroptionsmenu:

First when I click myoptionsmenu: it is working fine, second when I click otheroptionsmenu: it is working fine.

In the third post, when I click it is showing both myoptionsmenu: and otheroptionsmenu: menus.

I would like to know how to avoid this.

 

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!