Button_FunViewController.m
上传用户:jjjjag8
上传日期:2017-04-17
资源大小:1443k
文件大小:1k
源码类别:

iPhone

开发平台:

MultiPlatform

  1. //
  2. //  Button_FunAppDelegate.m
  3. //  Button Fun
  4. //
  5. //  Created by Jeff LaMarche on 6/13/08.
  6. //  Copyright __MyCompanyName__ 2008. All rights reserved.
  7. //
  8. #import "Button_FunViewController.h"
  9. @implementation Button_FunViewController
  10. @synthesize statusText;
  11. - (IBAction)buttonPressed:(id)sender
  12. {
  13. NSString *title = [sender titleForState:UIControlStateNormal];
  14. NSString *newText = [[NSString alloc] initWithFormat:@"%@ button pressed.", title];
  15. statusText.text = newText;
  16. [newText release];
  17. }
  18. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  19. // Return YES for supported orientations
  20. return (interfaceOrientation == UIInterfaceOrientationPortrait);
  21. }
  22. - (void)didReceiveMemoryWarning {
  23. [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
  24. // Release anything that's not essential, such as cached data
  25. }
  26. - (void)dealloc {
  27. [statusText release];
  28. [super dealloc];
  29. }
  30. @end