Disable blinking cursor in UITextField?

前端 未结 10 1109
日久生厌
日久生厌 2020-12-24 06:31

I\'ve followed the instructions here and succesfully set up a UITextField that gets updated with a UIDatePicker. However the cursor in the UITextField is blinking, which see

10条回答
  •  北海茫月
    2020-12-24 07:04

    Subclass UITextfield and Override the - (CGRect)caretRectForPosition:(UITextPosition *)position method and return CGRectZero.

    - (CGRect)caretRectForPosition:(UITextPosition *)position {
        return CGRectZero;
    }
    

提交回复
热议问题