0

I am developing an ios application that has two input fields that for entering date. I am planning to add a UIDatePicker in the following manner

[_datePicker setFrame:CGRectMake([UIScreen mainScreen].bounds.size.width-_datePicker.bounds.size.width, [UIScreen mainScreen].bounds.size.height-_datePicker.bounds.size.height, _datePicker.frame.size.width, _datePicker.frame.size.height)]; _inputText.inputView=_datePicker;

But the bigger problem is, I need it to look something like the image I have posted The planned look of the date view

How can I accomplish this?

Sidharth J Dev
  • 927
  • 1
  • 6
  • 25

1 Answers1

1

Okay... there should be a couple ways to solve this.

1)

Put a transparent (or clear colored) UIButton over the view with the date labels. You may need to make the view containing the labels change color/alpha something to indicate the button has been touched before bringing up the date picker.

2)

If the above doesn't work, try adding the view with the labels as a subview into UIButton.

Community
  • 1
  • 1
Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215