我尝试用阴影给我,UITextView
就像我为我做的那样,UIView
但它不起作用.
试试这段代码:
txtView.layer.cornerRadius = txtView.frame.size.height/2; txtView.clipsToBounds = NO; txtView.layer.shadowOpacity=0.4; txtView.layer.shadowOffset = CGSizeMake(3, 3);
txtView.layer.cornerRadius = txtView.frame.size.height/2 txtView.clipsToBounds = false txtView.layer.shadowOpacity=0.4 txtView.layer.shadowOffset = CGSizeMake(3, 3)
我希望它对你有用.