m_mainImgView.layer.cornerRadius = 6; m_mainImgView.layer.masksToBounds = YES; 需要引入头文件 #import <QuartzCore/QuartzCore.h>