How to access UITableViewCell's UITextView from the UIViewController?
I have created my own UITableViewCell with XIB file. There's an UITextView inside. Howeve开发者_如何学Cr, I don't know how to access its features and use its outlets with the UIViewController. What's the way to do it?
alt text http://cl.ly/a13e180c260e5e550b78/content
You can access it by pulling the subview out of the cell's subviews
array and casting it to UITextView
:
How you created your view hierarchy will determine the index to pass to objectAtIndex
.
UITextView *textView = (UITextView*) [cell.subviews objectAtIndex:whateverIndex];
精彩评论