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
@interface CustomBrowserURLProtocol : NSURLProtocol | |
@end | |
@interface CustomBrowserURLProtocol () | |
@property (nonatomic, strong) NSURLConnection *connection; | |
@end | |
@implementation CustomBrowserURLProtocol |
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
//http://developer.android.com/reference/android/os/Build.VERSION.html | |
android.os.Build.VERSION.CODENAME //the current development codename, or the string "REL" if this is a release build. | |
android.os.Build.VERSION.INCREMENTAL //the internal value used by the underlying source control to represent this build. | |
android.os.Build.VERSION.RELEASE //the user-visible version string. |
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
CALayer *topBorder = [CALayer layer]; | |
topBorder.frame = CGRectMake(0.0f, 0.0, viewForBorder.frame.size.width, 1.0f); | |
topBorder.borderWidth = 1; | |
topBorder.borderColor = [UIColor colorWithRed:58.0/255.0 green:58.0/255.0 blue:58.0/255.0 alpha:1.0].CGColor; | |
[theView.layer addSublayer:topBorder]; |
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
// Create the colors | |
UIColor *topColor = [UIColor colorWithRed:50.0/255.0 green:50.0/255.0 blue:50.0/255.0 alpha:1.0]; | |
UIColor *bottomColor = [UIColor colorWithRed:56.0/255.0 green:56.0/255.0 blue:56.0/255.0 alpha:1.0]; | |
// Create the gradient | |
CAGradientLayer *theViewGradient = [CAGradientLayer layer]; | |
theViewGradient.colors = [NSArray arrayWithObjects: (id)topColor.CGColor, (id)bottomColor.CGColor, nil]; | |
theViewGradient.frame = theView.bounds; | |
//Add gradient to view |