1
我有一個UIWebView並使用QuartzCore爲其添加一些樣式。但是當我執行時:UIWebView銳角
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(10, 10, self.view.bounds.size.width-20.0, self.view.bounds.size.height-30.0)];
NSString *urlAddress = @"http://www.google.com/";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
webView.layer.cornerRadius = 10;
webView.layer.borderColor = [UIColor whiteColor].CGColor;
webView.layer.borderWidth = 3.0f;
[self.view addSubview:webView];
我得到一個圓的視圖,但內容是銳利的。有一種方法來roundend中的WebView
工程,太棒了!併爲我解決問題!感謝graver – Kuba