Guest User

Untitled

a guest
Oct 13th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. #import "First_iPhone_AppViewController.h"
  2.  
  3. @implementation First_iPhone_AppViewController
  4.  
  5. @synthesize textLabel;
  6. @synthesize username;
  7. @synthesize password;
  8.  
  9. -(IBAction) clicked:(id)sender
  10. {
  11. NSString *titleOfButton = [sender titleForState: UIControlStateNormal];
  12. NSString *newLabelText = [[NSString alloc] initWithFormat:@"%@", titleOfButton];
  13.  
  14. textLabel.text = newLabelText;
  15.  
  16. [newLabelText release];
  17. }
  18.  
  19. - (void)didReceiveMemoryWarning
  20. {
  21. [super didReceiveMemoryWarning];
  22. }
  23.  
  24. #pragma mark - View lifecycle
  25.  
  26. - (void)viewDidUnload
  27. {
  28. [super viewDidUnload];
  29.  
  30. self.textLabel = nil;
  31. self.username = nil;
  32. self.password = nil;
  33. }
  34.  
  35. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  36. {
  37. return (interfaceOrientation == UIInterfaceOrientationPortrait);
  38. }
  39.  
  40. -(void) dealloc
  41. {
  42. [username release];
  43. [password release];
  44. [textLabel release];
  45. [super dealloc];
  46. }
  47.  
  48. @end
Add Comment
Please, Sign In to add comment