tags:

views:

28

answers:

3

Is there some way in objective C to see if an instance is being touched such as:

- (void)viewDidLoad {
      [super viewDidLoad];
      if (recordButton.touched = YES) {
          NSLog (@"record button got touched");
      }
}

Can't they just make these things easy?

Could someone help?

A: 

I'm assuming you're talking about a UIButton in UIKit. To tell when a button is pressed, give the button an action with -[UIControl addTarget:action:forControlEvents:].

Chuck
A: 

Since UIView inherits from UIResponder, you can use touchesBegan:withEvent:

Shaggy Frog
A: 

You just create a custom button, right click, and connect touchUp with your function

Nathan
yay me!!!!!!!!!!!
Nathan