Skip to content

Instantly share code, notes, and snippets.

@scottsappen
Last active December 19, 2015 05:09
Show Gist options
  • Save scottsappen/5901906 to your computer and use it in GitHub Desktop.
Save scottsappen/5901906 to your computer and use it in GitHub Desktop.
Rounded corners with Quartz in iOS
#import "QuartzCore/QuartzCore.h"
// Round corners using CALayer property
[[_aboutWebView layer] setCornerRadius:10];
[_aboutWebView setClipsToBounds:YES];
// Create colored border using CALayer property
[[_aboutWebView layer] setBorderColor:
[[UIColor colorWithRed:0.52 green:0.09 blue:0.07 alpha:1] CGColor]];
[[_aboutWebView layer] setBorderWidth:2.75];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment