UIView *roundedView = [[UIView alloc] initWithFrame:CGRectMake(50,50,100,100)];
[roundedView setBackgroundColor:[UIColor redColor]];
roundedView.layer.cornerRadius = 10.0f;
[self.view addSubview:roundedView];
Each of the four corners is rounded and a higher value for cornerRadius will perform a higher degree of rounding.
roundedView.layer.cornerRadius = 30.0f;