YellowViewController.m
上传用户:jjjjag8
上传日期:2017-04-17
资源大小:1443k
文件大小:1k
源码类别:
iPhone
开发平台:
MultiPlatform
- //
- // YellowViewController.m
- // View Switcher
- //
- // Created by Jeff LaMarche on 7/6/08.
- // Copyright 2008 __MyCompanyName__. All rights reserved.
- //
- #import "YellowViewController.h"
- @implementation YellowViewController
- -(IBAction)yellowButtonPressed:(id)sender
- {
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Yellow View Button Pressed" message:@"You pressed the button on the yellow view" delegate:nil cancelButtonTitle:@"Yep, I did." otherButtonTitles:nil];
- [alert show];
- [alert release];
- }
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
- if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
- // Initialization code
- }
- return self;
- }
- /*
- Implement loadView if you want to create a view hierarchy programmatically
- - (void)loadView {
- }
- */
- /*
- If you need to do additional setup after loading the view, override viewDidLoad.
- - (void)viewDidLoad {
- }
- */
- - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
- // Return YES for supported orientations
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview
- // Release anything that's not essential, such as cached data
- }
- - (void)dealloc {
- [super dealloc];
- }
- @end