Describe the implementation process:
? First, create a project named: Ipad_webwiew
? Add a UIWebView with Interface builder and then associated with the corresponding code
? Add Quartzcore.framework
Code implementation:
header file:
#import <uikit/uikit.h>? #import <quartzcore/quartzcore.h>? @interface Ipad_webwiewviewcontroller:uiviewcontroller {? Iboutlet UIWebView *mywebview;? UIView *myview;?? }? @property (Nonatomic,retain) UIWebView *mywebview;? @end Code implementation: -(void) viewdidload {? [Super Viewdidload];? Add a background image to a layer:? MyView.layer.contents = (ID) [UIImage imagenamed:@ "View_bg.png"]. cgimage;? Set the border of a layer to round feet? myWebView.layer.cornerRadius = 8;? MyWebView.layer.masksToBounds = yes;//Add a colored border to the layer? MyWebView.layer.borderWidth = 5;? MyWebView.layer.borderColor = [[Uicolor colorwithred:0.52 green:0.09 blue:0.07 alpha:1] cgcolor];? }
iOS set UIView border to rounded corners