0

I am working on an iPhone app. This app is having many views in which address should show in more than 3 views. Other than creating xib, is there any way to build user defined control like address with events for iPhone in xcode.

mrparx
  • 11
  • 3

1 Answers1

0

You can easily create subclass of UIView to create your own UIView control. You could also subclass UIControl if you like. Then you should implement the functionality of the control inside the created subclass.

Once you have your own UIView subclass ready, you can place it in either Storyboard or Interface Builder and choose the class of the control. Just be careful that if you subclass UIView, you also place UIView on screen. Or you can place those in code.

More information about subclassing on links below:

There is no other way of defining your own custom control in Xcode, apart from creating .xib.

Community
  • 1
  • 1
Legoless
  • 10,942
  • 7
  • 48
  • 68