Advertisement
Kirinriki

table2viewcontroller.m

Jun 29th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import "table2viewcontroller.h"
  2.  
  3.  
  4. @implementation table2viewcontroller
  5. @synthesize Label1;
  6. @synthesize Label2;
  7. @synthesize image;
  8. @synthesize segment;
  9. @synthesize loremtext;
  10.  
  11. - (id)initWithStyle:(UITableViewStyle)style
  12. {
  13.     self = [super initWithStyle:style];
  14.     if (self) {
  15.         // Custom initialization
  16.        
  17.     }
  18.     return self;
  19. }
  20.  
  21. - (void)didReceiveMemoryWarning
  22. {
  23.     // Releases the view if it doesn't have a superview.
  24.     [super didReceiveMemoryWarning];
  25.    
  26.     // Release any cached data, images, etc that aren't in use.
  27. }
  28.  
  29. #pragma mark - View lifecycle
  30.  
  31. - (void)viewDidLoad
  32. {
  33.     [super viewDidLoad];
  34.  
  35.     self.Label1.text = @"This is a title";
  36.     self.Label2.text = @"Annika";
  37. }
  38.  
  39. - (void)viewDidUnload
  40. {
  41.     [self setLabel1:nil];
  42.     [self setLabel2:nil];
  43.     [self setImage:nil];
  44.     [self setSegment:nil];
  45.     [self setLoremtext:nil];
  46.     [super viewDidUnload];
  47.     // Release any retained subviews of the main view.
  48.     // e.g. self.myOutlet = nil;
  49. }
  50.  
  51. - (void)viewWillAppear:(BOOL)animated
  52. {
  53.     [super viewWillAppear:animated];
  54.     self.Label1.text = @"This is a title";
  55.     self.Label2.text = @"Annika";
  56.  
  57.  
  58. }
  59.  
  60. - (void)viewDidAppear:(BOOL)animated
  61. {
  62.     [super viewDidAppear:animated];
  63.     self.Label1.text = @"This is a title";
  64.     self.Label2.text = @"Annika";
  65. }
  66.  
  67. - (void)viewWillDisappear:(BOOL)animated
  68. {
  69.     [super viewWillDisappear:animated];
  70. }
  71.  
  72. - (void)viewDidDisappear:(BOOL)animated
  73. {
  74.     [super viewDidDisappear:animated];
  75. }
  76.  
  77. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
  78. {
  79.     // Return YES for supported orientations
  80.     return (interfaceOrientation == UIInterfaceOrientationPortrait);
  81. }
  82.  
  83. #pragma mark - Table view data source
  84.  
  85. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  86. {
  87. #warning Potentially incomplete method implementation.
  88.     // Return the number of sections.
  89.     return 2;
  90. }
  91.  
  92. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  93. {
  94. #warning Incomplete method implementation.
  95.     // Return the number of rows in the section.
  96.     return 2;
  97. }
  98.  
  99. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  100. {
  101.     static NSString *CellIdentifier = @"Cell";
  102.    
  103.     UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  104.     if (cell == nil) {
  105.         cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
  106.     }
  107.    
  108.     // Configure the cell...
  109.    
  110.     return cell;
  111. }
  112.  
  113. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement