I want to have border around my textview; for that, I did the following:
textView.layer.borderWidth = 5.0f;
textView.layer.borderColor = [UIColor grayColor];
I am getting the following warning:
warning: passing argument 1 of 'setBorderColor:' from incompatible pointer type
Update1 : my border is not visible
Your problem is that -[CALayer setBorderColor:]
takes an object of type CGColorRef
. What you need to do is convert your color object to conform:
textView.layer.borderColor = [UIColor grayColor].CGColor;
I hope that helped!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With