今天刚好需要添加一个圆角的view。必须先导入头文件。#import <QuartzCore/QuartzCore.h>bgView.layer.cornerRadius = cornerRadiusInPixels;//设置角度大小bgView.layer.masksToBounds = YES;bgView.opaque = NO;