I am a complete newbie in Swift, so excuse me if it may be a dumb question. I am trying to implement a way so that the content in the picker changes depending on which button is clicked. For example, let say there are two buttons "Months" and "Years". If I click Months button, I want a picker to appear with all it's content. But once I click Years button, I would like the same picker to appear with all the years instead (vice versa).
Is there a way to do this without creating a new UIPicker?
I tried creating a boolean flag to change some return values for pickerView functions, but it wouldn't work.
Thank You!