how to push button and button name change and agin pus find same name in iphone
A:
Do some research on google.Type in "Setting UIButton title".Thats i how i got it
Mithun Madhav
2010-09-23 04:49:06
I'd try something like this: UIButton *myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; myButton.frame = CGRectMake(20, 20, 200, 44); // position in the parent view and set the size of the button [myButton setTitle:@"Click Me!" forState:UIControlStateNormal]; // add targets and actions [myButton addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside]; // add to a view [superView addSubview:myButton];
VK RAJ
2010-09-23 05:17:17
A:
I have written the code that you can use on the click event of the button to change its title from oldTitle to NewTitle on Click and again cage the code from NewTitle to OldTitle on another click.
BOOL isOne;
-(void) buttonClicked
{
if(!isOne)
{
[callsButton setTitle:@"NewTitle" forState:UIControlStateNormal];
isOne=YES;
}
else
{
[callsButton setTitle:@"OldTitle" forState:UIControlStateNormal];
isOne=NO;
}
//YOUR STUFFS HERE
}
hAPPY cODING...
Suriya
2010-09-23 05:20:57
dats because you dont have enough points to vote.. no worries atleast you can tick the answer as correct if it has helped you..
Suriya
2010-09-23 10:47:13
A:
to change the title of the UIButton use below code...
[myButton setTitle:@"New Title" forState:UIControlStateNormal];
Vivek Sharma,
iPhone App Developer
For any iPhone prgramming help come to my blog...
Vivek Sharma
2010-09-23 05:29:40