Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IPhone Get Parent View of UITextField

Tags:

I have a UITextField control and I just want to get the parent view that it is contained in. I was hoping it would be something like [MyTextField ParentView] or MyTextField.view but no go.

Any ideas?

Thanks In Advance

like image 992
IPadHackAndSlash Avatar asked Dec 16 '10 21:12

IPadHackAndSlash


1 Answers

You can use myTextField.superview. It's documented in Apple's class reference for the UIView class, which UITextField inherits from.

like image 109
Greg Avatar answered Sep 16 '22 23:09

Greg