Uibutton events

// starting my code

int col=10;

UIButton*mbybutton = [UIButton buttonWithType:UIButtonTypeCustom];
[mbybutton setTitle:@"Click Here"  forState:UIControlStateNormal];

//-------------------    
[self performSelector:@selector(fullscreen:) 
  withObject:[NSNumber numberWithInt:col]
       afterDelay:0.2];
//----------------------------

-(void) displayvalue:(id)iid{

    int c=[iid intValue];


    printf("\n\n ======= %d========",c);
}
// end of code

      

code>

in this code my problem is this code replace afterDelay: 0.2 by forControlEvents: UIControlEventTouchUpInside (even on mybutton) and get col value in displayvalue method when it touchupinside pls fix this error ..

-2


a source to share


1 answer


you want to go to your header file and declare the IBAction first. Then in IB, bind a button to this IBAction.

Then, in your .m file, you do this



- (IBAction)yourActionName:(id)sender {

     [okbutton disabled:TRUE];

}

      

0


a source







All Articles