Custom TableView cell registerNib Code...
#import "ViewController.h"
#import "TableViewCell.h" //Custom TableViewCell class
@interface ViewController ()
@end
static NSString* const cellIdentifier = @"TableViewCellid";
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
self.TableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
self.TableView.estimatedRowHeight = 44.0;
self.TableView.rowHeight = UITableViewAutomaticDimension;
self.TableView.delegate = self;
self.TableView.dataSource = self;
UINib *nib= [UINib nibWithNibName:@"TableViewCell" bundle:nil];
[self.TableView registerNib:nib forCellReuseIdentifier:cellIdentifier];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
TableViewCell *cell = [self.TableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
cell = [[TableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
}
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
}
This post is so usefull and informative.keep updating with more information...
ReplyDeleteSwift Development
Swift Programing Language
This post is so helpfull and informative.keep updating with more information...
ReplyDeleteSwift Developer Course in Mumbai
Swift Developer Course in Ahmedabad
Swift Developer Course in Cochin
Swift Developer Course in Trivandrum
Swift Developer Course in Kolkata