@synthesize statusText;

This is how we tell the compiler to automatically create the accessor and mutator methods for us.

two invisible methods in out class

:statusText   setStatusText:   

but they are there  nonetheless  waiting for use them.

when either button is tapped

-(IBAction)buttonPressed: (id)sender {

  NSString *title = [sender titleForState:UIControlStateNormal];

  NSString *newText = [[NSString alloc] initWithFormat:

              @"%@ button pressed.", title];

}

相关文章:

  • 2021-10-16
  • 2021-08-13
  • 2021-12-03
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-11-24
猜你喜欢
  • 2021-11-14
  • 2022-02-01
  • 2022-02-21
  • 2021-05-27
  • 2021-07-16
  • 2022-02-26
  • 2022-12-23
相关资源
相似解决方案