Click here to Skip to main content
15,884,629 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
How to draw text in UITextView just like there is a method called "drawTextInRect:" in UILabel and UITextField. Should I implement it in "drawRect:" or "drawLayer:inContext:". Thank your focus and patient! Thank your focus and patient!
Posted
Updated 18-Feb-15 21:58pm
v4

1 solution

You must override drawRect. Read details in the Apple documentation. I found this simple example code.

You must call setNeedsDisplay to trigger an drawing event.
 
Share this answer
 
Comments
Elijah_Lam 20-Feb-15 11:45am    
Thank you. I'll check it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900