The Attractions Detail View

I’ve accomplished two things this week on the Fort Collins for Kids application.

First, I now have a view to show the details of an attraction.

It’s ugly. My list of attributes is preliminary, so spending time making it look good would not be helpful- it will likely all change. My plan is to get a basic framework in place, then consider the queries that parents will want to make on the database, and set up the attributes accordingly. Once the set of attributes is finalized, I can put together a pretty layout.

The AttractionDetailViewController is about as simple as it could be. I’ll show the interface, and leave the implementation as an exercise.

    @interface AttractionDetailViewController : UIViewController
    {   
        Attraction *attraction;
        IBOutlet UITextField *nameField;
        IBOutlet UITextField *typeField;
        IBOutlet UISwitch *insideField;
        IBOutlet UITextView *descriptionField;
        IBOutlet UITextField *linkField;
    }
    @property (nonatomic, retain) Attraction *attraction;
        - (id)initWithAttraction:(Attraction *)a;

    @end

Using a UISwitch for the Boolean inside attribute is definitely not the right user interface control. A picker view or even a table view would feel better. But again, it works for now, and I will revisit it in a future iteration.

The second thing I did was make the list of attractions editable. I’ll talk about that in my next post.