I want to draw text in CGContext. I draw text when I write it from string. But I want to prompt the user this text. How can I do?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can do it using UIAlertView:
Handle the ‘OK’ button press:
The method
setString:of your custom view should set its NSString ivar and call[self setNeedsDisplay]or – if you know the frame where the string is drawn – better call[self setNeedsDisplayInRect:stringFrame].