cs193p – Assignment #4 Task #3 & #7

Please note, this blog entry is from a previous course. You might want to check out the current one.

The main (non-Recents) tab must present a list containing all of the tags (FLICKR_TAGS) on all of the photos queried except the tags “cs193pspot,” “portrait” & “landscape” (note that Flickr tags come back all lower case with no special characters). The subtitle for each cell in this list should display how many photos have the corresponding tag. Capitalize the tags so they look a bit nicer in the list.

All lists should each be displayed in a UITableView.

Create a new UITableViewController sub class. The model of the controller needs two properties. An array to store the photos received from Flickr and a dictionary where those photos are sorted by its tags:

@property (nonatomic, strong) NSArray *photos; // of NSDictionary
@property (nonatomic, strong) NSDictionary *photosByTag; // of NSArray of NSDictionary

Continue reading “cs193p – Assignment #4 Task #3 & #7”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #4 Task #2

Please note, this blog entry is from a previous course. You might want to check out the current one.

Your user-interface should present a UITabBarController-based UI with two tabs, each of which contains its own navigation (i.e. UINavigationController-based) stack. One tab lets you browse (in the manner described below) all of the photos returned in the above query and another which maintains a list of the photos the user has most recently viewed in your application.

In storyboard (currently we stay with the iPhone and ignore the iPad) use the “embed-in” functionality to add a navigation view controller. Copy both view controllers. Use the “embed-in” functionality to add a tab view controller. Connect the tab view controller also to the second navigation view controller. Name and set icons accordingly:

cs193p - assignment #4 task #2
cs193p – assignment #4 task #2

The complete code is available on github.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #4 Task #1

Please note, this blog entry is from a previous course. You might want to check out the current one.

You will be using the method stanfordPhotos in the provided FlickrFetcher helper code to get an NSArray of Flickr photos of various sites on the Stanford campus. Each entry in the NSArray is an NSDictionary object with numerous entries which describe the photo (more on this below). FlickrFetcher.h has #defines for the keys.

Create a new single-view project. Because the we know already that it should also run on iPads in the near future (extra task #2 or next assignment) make it universal. Add the Flickr-API to the project by dragging in the provided files (or get them from Shutterbug). Get the API key directly from Flickr and set it in FlickrAPIKey.h.

For now – we will not use it later on – add some test code to the automatically generated view controller to see if the interface to Flickr works.

#import "FlickrFetcher.h"
...
- (void)viewDidLoad
{
    [super viewDidLoad];
    NSLog(@"%@", [FlickrFetcher stanfordPhotos]);
}

The complete code is available on github.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail