Closed edwardIshaq closed 7 years ago
Hi @edwardIshaq, as far as I know this is not possible to connect a sub view/control to an outlet on your view controller.
May I ask why you would want to connect the UITextField
from your LineField
to the searchField
outlet??
I wanted to be able to work directly and customize the uitextfield directly with having to expose all the standard IBDesignables
Edward Ashak
On Oct 28, 2015, at 12:12 PM, Morten Bøgh notifications@github.com wrote:
Hi @edwardIshaq, as far as I know this is not possible to connect a sub view/control to an outlet on your view controller.
May I ask why you would want to connect the UITextField from your LineField to the searchField outlet??
— Reply to this email directly or view it on GitHub.
@edwardIshaq How about the following: Make your textField public
@IBOutlet public var textfield: UITextField!
searchField
this way var searchField:UITextField! { return lineField?.textFeild}
First i must say that the NibDesignable class is awesome.
I've created a subclass called LineField which contains a UITextField with a line under it. when I plug in my LineField into my Storyboard, I wanted to be able to connect an IBOutlet on my UIViewController to the LineField's text field. but unfortunately that doesn't seem possible. Is there a way to do that which I'm not aware of ?
My ViewController:
TLDR: how do i connect my searchField to the LineField->textField ?