Last active
July 26, 2016 08:45
-
-
Save IvanovDeveloper/e31035011b096caf555125ff2e6fbeac to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Create cell from storyboard | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"PlayerCell"]; | |
//Create cell programmatically | |
static NSString *cellIdentifier = @"cellIdentifier"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; | |
if (cell == nil) | |
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; | |
//Create cell from xib | |
static NSString *cellIdentifier = kTicketCellReuseID; | |
TicketCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; | |
if(!cell) { | |
UINib *nib = [UINib nibWithNibName:NSStringFromClass([TicketCell class]) bundle:nil]; | |
[tableView registerNib:nib forCellReuseIdentifier:cellIdentifier]; | |
cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment