Note that there are some explanatory texts on larger screens.

plurals
  1. POhandling Button Event in iphone
    primarykey
    data
    text
    <p><img src="https://i.stack.imgur.com/5lQzZ.png" alt="sren sort"></p> <p>i created a Drop down class for popup a window on click button , that is work fine but there is a problem is that how can i handle its event that it return index (on popup of tableview which is selected for its own button) what i mistak there ? any one guide me what i will do for it ??</p> <p>here code for that..</p> <pre><code> -(IBAction)popupOnClikingButton:(id)sender{ if (sender == button1) { arrayData = [[NSMutableArray alloc] initWithArray:[NSMutableArray arrayWithObjects:@"Test1",@"Test2",nil]]; dropDownView = [[DropDownView alloc] initWithArrayData:arrayData cellHeight:30 heightTableView:150 paddingTop:-3 paddingLeft:-1 paddingRight:-1 refView:button1 animation:BLENDIN openAnimationDuration:2 closeAnimationDuration:2]; dropDownView.delegate = self; [dropDownView openAnimation]; [self.view addSubview:dropDownView.view]; return; } if (sender == button2) { [arrayData release]; arrayData = [[NSMutableArray alloc] initWithArray:[NSMutableArray arrayWithObjects:@"Demo1",@"Demo2",nil]]; dropDownView = [[DropDownView alloc] initWithArrayData:arrayData cellHeight:30 heightTableView:150 paddingTop:-3 paddingLeft:-1 paddingRight:-1 refView:button1 animation:BLENDIN openAnimationDuration:2 closeAnimationDuration:2]; dropDownView.delegate = self; [dropDownView openAnimation]; [self.view addSubview:dropDownView.view]; return; } } </code></pre> <p>return index DropDownDelegate method is.. How Can i handle this event that which button for returnIndex ??</p> <pre><code>-(void)dropDownCellSelected:(NSInteger)returnIndex{ //set for title that which button is selected here for Ex. [button1 setTitle:[arrayData objectAtIndex:returnIndex] forState:UIControlStateNormal]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload