All for iOS - a site of support of programs for iPhone and iPad
Search
Search text*
Enter text to search
Archive

Review forios.ru on alexa.com
Random user
arseniypetrov
arseniypetrov
Male
Who is online
nobody
1

takru.com

SOCPUBLIC.COM - заработок в интернете!

Прибыль каждые 10 минут!

Rounded Corners on UIWebview

Rounded Corners on UIWebview

What follows is an example of a webview that displays HTML from a file in the application bundle. The trick is to access the CALayer of the view and set the corner radius as well as the border width and color: 


// This is required in order to access the CALayer properties #import // Create UIWebview UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(5, 20, 310, 220)]; // Round corners using CALayer property [[webView layer] setCornerRadius:10]; [webView setClipsToBounds:YES]; // Create colored border using CALayer property [[webView layer] setBorderColor: [[UIColor colorWithRed:0.52 green:0.09 blue:0.07 alpha:1] CGColor]]; [[webView layer] setBorderWidth:2.75]; [[self view] addSubview:webView]; ... [webView release];