Last active
August 29, 2015 13:57
-
-
Save kkodev/9512005 to your computer and use it in GitHub Desktop.
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
if (!self.lineLayer.superlayer) | |
[self.layer addSublayer:self.lineLayer]; | |
CGFloat height = 1.0f / [UIScreen mainScreen].scale; | |
self.lineLayer.frame = CGRectMake(0.0, CGRectGetHeight(self.bounds) - height, CGRectGetWidth(self.bounds), height); | |
#pragma mark - Lazy loading | |
- (CALayer *)lineLayer { | |
if (!self->_lineLayer) { | |
CALayer *lineLayer = [[CALayer alloc] init]; | |
lineLayer.backgroundColor = [UIColor colorWithWhite:0.8f alpha:1.0f].CGColor; | |
self->_lineLayer = lineLayer; | |
} | |
return self->_lineLayer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment