Button_FunViewController.m
上传用户:jjjjag8
上传日期:2017-04-17
资源大小:1443k
文件大小:1k
源码类别:
iPhone
开发平台:
MultiPlatform
- //
- // Button_FunAppDelegate.m
- // Button Fun
- //
- // Created by Jeff LaMarche on 6/13/08.
- // Copyright __MyCompanyName__ 2008. All rights reserved.
- //
- #import "Button_FunViewController.h"
- @implementation Button_FunViewController
- @synthesize statusText;
- - (IBAction)buttonPressed:(id)sender
- {
- NSString *title = [sender titleForState:UIControlStateNormal];
- NSString *newText = [[NSString alloc] initWithFormat:@"%@ button pressed.", title];
- statusText.text = newText;
- [newText release];
- }
- - (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 {
- [statusText release];
- [super dealloc];
- }
- @end