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

iPhone

开发平台:

MultiPlatform

  1. //
  2. //  BlueViewController.m
  3. //  View Switcher
  4. //
  5. //  Created by Jeff LaMarche on 7/6/08.
  6. //  Copyright 2008 __MyCompanyName__. All rights reserved.
  7. //
  8. #import "BlueViewController.h"
  9. @implementation BlueViewController
  10. - (IBAction)blueButtonPressed:(id)sender
  11. {
  12. UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Blue View Button Pressed" message:@"You pressed the button on the blue view" delegate:nil cancelButtonTitle:@"Yep, I did." otherButtonTitles:nil];
  13. [alert show];
  14. [alert release];
  15. }
  16. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
  17. if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
  18. // Initialization code
  19. }
  20. return self;
  21. }
  22. /*
  23.  Implement loadView if you want to create a view hierarchy programmatically
  24. - (void)loadView {
  25. }
  26.  */
  27. /*
  28.  If you need to do additional setup after loading the view, override viewDidLoad.
  29. - (void)viewDidLoad {
  30. }
  31.  */
  32. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
  33. // Return YES for supported orientations
  34. return (interfaceOrientation == UIInterfaceOrientationPortrait);
  35. }
  36. - (void)didReceiveMemoryWarning {
  37. [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
  38. // Release anything that's not essential, such as cached data
  39. }
  40. - (void)dealloc {
  41. [super dealloc];
  42. }
  43. @end