Related questions
accessing UIButton by (id)sender
I have the following code
-(IBAction)ATapped:(id)sender{
//want some way to hide the button which is tapped
self.hidden = YES;
}
Which is linked to multiple buttons. I want to hide the button which triggered this IBAction.
self.…
UIButton TouchUpInside Touch Location
So I have a large UIButton, it is a UIButtonTypeCustom, and the button target is called for UIControlEventTouchUpInside. My question is how can I determine where in the UIButton the touch occured. I want this info so I can display …
Setting an image for a UIButton in code
How do you set the image for a UIButton in code?
I have this:
UIButton *btnTwo = [UIButton buttonWithType:UIButtonTypeRoundedRect];
btnTwo.frame = CGRectMake(40, 140, 240, 30);
[btnTwo setTitle:@"vc2:v1" forState:UIControlStateNormal];
[btnTwo addTarget:self action:@selector(goToOne) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btnTwo];
…