Created
November 11, 2015 09:04
-
-
Save bestimmaa/1bff5f473ea9c01de923 to your computer and use it in GitHub Desktop.
iOS Custom UITableViewCell Seperator
This file contains 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
// Use a custom seperator of full width | |
UIView *lineView = [[UIView alloc] init]; | |
lineView.backgroundColor = kColorSeperator; | |
lineView.translatesAutoresizingMaskIntoConstraints = NO; | |
[self.contentView addSubview:lineView]; | |
[lineView autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self.contentView]; | |
[lineView autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:self.contentView]; | |
[lineView autoMatchDimension:ALDimensionWidth toDimension:ALDimensionWidth ofView:self]; | |
[lineView addConstraint:[NSLayoutConstraint constraintWithItem:lineView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:nil attribute:NSLayoutAttributeHeight multiplier:1.0 constant:1]]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment