I have got a UITableView, and I want to capture the visible portion of it, and put it into a UIImage. Any way of doing this?
EDIT
Self-answered below
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.
Thanks for the replies. All of the answers would work with a UIView, but not with a UITableView – at least not when the table has scrolled. When scrolled, the captured image would appear black or transparent. I had tried similar solutions as the ones below before. I guess people assumed the answer was obvious, and that’s why I was down-voted – for being naughty enough to ask such an obvious question.
Anyway, the real solution is that you have to use the table’s contentOffset: