Created
October 21, 2013 17:04
-
-
Save psobko/7087265 to your computer and use it in GitHub Desktop.
UITableViewCell Seperator
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
//Remove seperator insets on iOS7 | |
[self.tableView setSeparatorInset:UIEdgeInsetsZero]; | |
//Set a custom cell seperator | |
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
... | |
cell.frame = CGRectMake(0, 0, 320, 200); | |
UIView* separatorLineView = [[UIView alloc] initWithFrame:CGRectMake(0, 200, 320, 10)]; | |
separatorLineView.backgroundColor = [UIColor whiteColor]; | |
[cell.contentView addSubview:separatorLineView]; | |
... | |
} | |
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
return 210.0f; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment