[myView.layer setCornerRadius:4.0f];//设置View圆角

[myView.layer setShadowColor:[UIColorblackColor].CGColor];//设置View的阴影颜色

[myView.layer setShadowOpacity:0.8f];//设置阴影的透明度

[myView.layersetShadowOffset:CGSizeMake(4.0, 3.0)];//设置View Shadow的偏移量

其他:

[myView setBackgroundColor:[UIColor grayColor]];

[myView.layer setOpacity:0.5f];//设置View的透明度