How to restrict the cursor minimum position in swift using caretRectForPosition method or any other method. Suppose, I have a textview with some content and if the user is trying to move the cursor before 3rd position it should not move. How's this possible? Read few articles on it but doesn't answer to my problem.