I have a UILabel
, and what I want is that when a user clicks that UILabel
then the UIDatePicker
would open.
Any idea how to do this?
I have a UILabel
, and what I want is that when a user clicks that UILabel
then the UIDatePicker
would open.
Any idea how to do this?
Many ways to achieve
Yes you need to drop a custom UIButton with clear background on your label with same frame size then connect button with action to open date picker
In the identity inspector, try to change the default class to UIControl class, that would allow you to add IBActions to your label. But a better way will be to use a textField instead of a label and put a background image and set its border to none from the attributes inspector. i hope it helps, Cheers!!
Here is something from stackoverflow itself.