-4
-(void)clicketbutton{
UIButton *mybutton = [UIButton buttonWithType:UIButtonTypeCustom];
[mybutton setTitle:@"Click here" forState:UIControlStateNormal];
[mybutton addTarget:self action:@selector(displayvalue:)forControlEvents:UIControlEventTouchUpInside];
}
-(void)displayvalue:(id)sender{
UIButton *resultebutton= [UIButton buttonWithType:UIButtonTypeCustom];
resultebutton=sender;// pls clear here.. my question here , it it possible or not. if possible how ? NSLog(@" The buttontitile is %@ ", [resultebutton.Title] // here also. }
在上面的代码中,我创建了一个按钮并将标题设置为Click here
。当我按下那个按钮时,我想打印Click here
,我的意思是它的标题。为此,我的代码在这里。选择器关键字
hi arc charbonneau ... Thankyou非常..回应我.. 我提到我的问题很清楚..请帮助我..这是非常迫切的。 非常感谢你一次 – Raju 2009-05-23 05:01:56