skip to main |
skip to sidebar
UIView programmatically with rounded corners
#import <QuartzCore/QuartzCore.h>
int leftBorder = 20;
int topBorder = 35;
int width = 150;
int height = 160;
UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(leftBorder, topBorder, width, height)];
myView.layer.cornerRadius = 10;
myView.backgroundColor = [UIColor redColor];
[self.view addSubview:myView];
Loading
0 comments:
Post a Comment