How to Create Custom Controls in iOS?

624 Views Asked by At

I want to create a new Control which is the combination of two UIImageViews and one UILabel. I need to implement TouchUpInsite and LongPress event for the entire Control. I mean the action would perform for any UIImageView or UILabel in the entire Control.

So, how to create this Control in objective-c and reuse it like other default Controls in iOS?

1

There are 1 best solutions below

1
Chirag kukreja On

You can Create a View of type UICONTRol and add image and label as subview.

You can take IBACTION of this view and do what ever you want to do on touch up inside.