有没有办法cornerRadius
只设置 a 的左上角和右上角UIView
?
我尝试了以下操作,但最终再也看不到视图了。
UIView*view=[[UIViewalloc]initWithFrame:frame]; CALayer*layer=[CALayerlayer]; UIBezierPath*shadowPath=[UIBezierPathbezierPathWithRoundedRect:framebyRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)cornerRadii:CGSizeMake(3.0,3.0)]; layer.shadowPath=shadowPath.CGPath; view.layer.mask=layer;