0

I have .xib for common header in which there are a text field and one UIButton.

What I want to do with that is if user click on button then it should redirect to another UIViewController with textfield value.

Martin
  • 846
  • 1
  • 9
  • 23
  • xibs are generally associated with UIView subclasses and shouldn't generally be pushing/presenting. That's something that should be done by a view controller or navigation controller. – Dare Dec 12 '17 at 21:25
  • you need add a delegate to your xib class, that delegate must be implemented by the xib component container, as example can be the UIViewController that contain your xib component and when the user touch the button you must call the delegate method – Reinier Melian Dec 13 '17 at 14:49

0 Answers0