I’m trying to create an iPad/iPhone app that dynamically creates menus depending on a JSON object that is returned from a RESTful API. Specifically I’m trying to show/hide a UIPickerView that I created using the interface builder. In the properties menu in the interface builder I checked the box “hidden” for that UIPickerView. I used this tutorial to create to UIPickerView. I’ve set the delegate and data source to the View Controller using the interface builder. I’d like to unhide/show the UIPickerView when a certain condition is met. So far I’ve tried the following code:
I usually build such object programmatically but I thought I’d try it this way. I’ve looking through various stackoverflow posts and doing research but I can’t seem to find something that works. I’m new to programming in Objective C. Thanks in advance any help is greatly appreciated.
.h file code
.m file code
You have two different picker views defined. One a property
Either remove the instance variable, and connect your property in interface builder, or synthesize your property with your instance variable by doing so: