Created
November 13, 2017 05:36
-
-
Save 0x30/94d939e3ebe9b4483587e6761488dc49 to your computer and use it in GitHub Desktop.
UIScrollerView Top screen backColor
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
-(void)setTopBackgroundColor:(UIColor *)color{ | |
CGRect frame = self.bounds; | |
frame.origin.y = -CGRectGetHeight(UIScreen.mainScreen.bounds); | |
frame.size = UIScreen.mainScreen.bounds.size; | |
UIView* grayView = [UIView.alloc initWithFrame:frame]; | |
grayView.backgroundColor = color; | |
[self addSubview:grayView]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment