Search code examples
swiftios8cursoruitextfielduilabel

How to insert a Cursor into UILable's Text


i need to insert a cursor in the text .. i don't want a textField (user don't type in it) .. i just need the cursor itself . so i can put it manually wherever i want .. like button's title . or UILabel ..

I tried to just type " | " between characters but this method isn't right it keeps a distance between letters like t|his .. and some other problems

is there a way that i can get the cursor . maybe a code or method . Should i make a custom controller..

hope you get it


Solution

  • UILabel is not UITextField. So you can not do it any other way if you want to add cursor in UILable's Text they you can do it by adding this " | " manually.