Skip to content

Instantly share code, notes, and snippets.

@Bavitharan
Created May 22, 2019 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bavitharan/7c4509b1d8cf6ba1af6edf06e670aac9 to your computer and use it in GitHub Desktop.
Save Bavitharan/7c4509b1d8cf6ba1af6edf06e670aac9 to your computer and use it in GitHub Desktop.
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
fruits = @[@"Apple",@"Mango",@"Orange"];
// Do any additional setup after loading the view.
}
- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return fruits.count;
}
- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
cell.textLabel.text = fruits[indexPath.row];
return cell;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment