Skip to content

Instantly share code, notes, and snippets.

@kkodev kkodev/gist:9512005
Last active Aug 29, 2015

What would you like to do?
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
You can’t perform that action at this time.