-2

// 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

在这段代码中,我的问题是这些代码将 afterDelay:0.2 替换为 forControlEvents:UIControlEventTouchUpInside (在 mybutton 的偶数上),并在 touchupinside 时在 displayvalue 方法中获取 col 的值,请纠正这些错误..

4

1 回答 1

0

你想去你的头文件,首先声明一个IBAction。然后在 IB 中,将按钮绑定到该 IBAction。

然后,在您的 .m 文件中,您执行此操作

- (IBAction)yourActionName:(id)sender {

     [okbutton disabled:TRUE];

}
于 2009-06-05T11:55:35.500 回答