Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import "First_iPhone_AppViewController.h"
- @implementation First_iPhone_AppViewController
- @synthesize textLabel;
- @synthesize username;
- @synthesize password;
- -(IBAction) clicked:(id)sender
- {
- NSString *titleOfButton = [sender titleForState: UIControlStateNormal];
- NSString *newLabelText = [[NSString alloc] initWithFormat:@"%@", titleOfButton];
- textLabel.text = newLabelText;
- [newLabelText release];
- }
- - (void)didReceiveMemoryWarning
- {
- [super didReceiveMemoryWarning];
- }
- #pragma mark - View lifecycle
- - (void)viewDidUnload
- {
- [super viewDidUnload];
- self.textLabel = nil;
- self.username = nil;
- self.password = nil;
- }
- - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
- {
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
- }
- -(void) dealloc
- {
- [username release];
- [password release];
- [textLabel release];
- [super dealloc];
- }
- @end
Add Comment
Please, Sign In to add comment