Advertisement
Guest User

Untitled

a guest
Oct 8th, 2014
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import "History&Favorites.h"
  2.  
  3. @interface History_Favorites ()
  4.  
  5. @end
  6.  
  7. @implementation History_Favorites
  8.  
  9. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  10. {
  11.    // self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  12.     if (self) {
  13.         self.title = @"History";
  14.        
  15.         self.URLs = [[[NSMutableArray alloc] init]autorelease];
  16.         [self.URLs addObjectsFromArray:@[@"first", @"second"]];
  17.     }
  18.     return self;
  19. }
  20.  
  21. - (void)viewDidLoad
  22. {
  23.     [super viewDidLoad];
  24.     // Do any additional setup after loading the view from its nib.
  25. }
  26.  
  27. - (void)didReceiveMemoryWarning
  28. {
  29.     [super didReceiveMemoryWarning];
  30.     // Dispose of any resources that can be recreated.
  31. }
  32.  
  33. -(NSInteger) numberOfSectionsInTableView:(UITableView *)tableView {
  34.     return 1;
  35. }
  36.  
  37. -(NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  38.     return [self.URLs count];
  39. }
  40.  
  41. -(UITableViewCell *) tableView:(UITableView *) tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  42.     static NSString *cellIdentifier = @"Cell";
  43.     UITableViewCell *hiddenCell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
  44.    
  45.     if (hiddenCell == nil) {
  46.         hiddenCell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]autorelease];
  47.     }
  48.     hiddenCell.textLabel.text = @"Detail"; //[self.URLs objectAtIndex:indexPath.row];
  49. //    History_Favorites *historyView = [[History_Favorites alloc]init];
  50. //    [self.navigationController pushViewController:historyView animated:YES];
  51.  
  52.     return hiddenCell;
  53. }
  54.  
  55. -(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  56.  
  57. }
  58.  
  59. - (void)dealloc {
  60.     [_tableWithBookmarks release];
  61.     [super dealloc];
  62. }
  63.  
  64. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement