My technical blog is often maliciously crawled and reproduced by rogue websites. Please move to the original article: Workshop.
Sometimes, our app forms have both single-row textField and multi-row textView. After iOS 7, the default textField is added with a border, while textView does not. In order to unify the two styles, we need to add borders to textView, and also the same border as textField!
Therefore, the following questions are involved: What is the default border color, width, and rounded corner of UITextField?
After repeat ...... The following code can be used to get better imitation results:
TextView. layer. borderColor = [[UIColor colorWithRed: 215.0/255.0 green: 215.0/255.0 blue: 215.0/255.0 alpha: 1] CGColor]; textView. layer. borderWidth = 0.6f; textView. layer. cornerRadius = 6.0f;
Leaders are absent in the past two days ...... Otherwise, "professional" designers should be able to produce more accurate results. Although the color can be obtained, I can't determine whether the border is a few pixels at zero ......