Assignment #5 Task #2

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

If the user is waiting for something (other than a thumbnail) to update in a view, display a UIActivityIndicatorView (spinning wheel) somewhere appropriate until it fills in (the network activity indicator in the little status bar at the very top of the screen is not an acceptable substitute for this). The user interface should be completely responsive while a wheel is spinning (e.g. the user could hit the back button or a tab and navigate away from the spinning wheel if so desired). Also, the user- interface should never “navigate” except directly in response to a user action.

For the table view controllers we setup the common-table-view-controller class to generate a spinner button and place it in the right hand corner of the toobar.
Continue reading “Assignment #5 Task #2”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Assignment #5 Task #1

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

The fifth assignment continues the application from the last assignment which create a navigation-based application to let users browse photos by looking in the most popular Flickr locations, then click on any they are interested in to see a photo of it. This assignment will fix problems with the responsiveness of the user-interface by using GCD to move blocking activity out of the main thread and by cacheing the image data received from Flickr. In addition, some maps will be added and the application will become Universal.

Your application must implement all the required tasks from the last assignment (and all the required tasks in this assignment) without doing any Flickr fetching or file system interactions in the main thread. Your user-interface should be responsive to the user at all times (i.e. the main thread should never be blocked).

Continue reading “Assignment #5 Task #1”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Assignment #4 Extra Task #1

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

Divide your list of top places into sections (in the table view sense) by country. This will require a little bit different data structure in that MVC.

To sort our places into countries we need two new properties for the data model. placesByCountry will hold the places separated into their countries. countries will just hold the names of the countries sorted alphabetically.

@property (nonatomic, strong) NSDictionary *placesByCountry;
@property (nonatomic, strong) NSArray *countries;
   ...
@synthesize placesByCountry = _placesByCountry;
@synthesize countries = _countries;

Continue reading “Assignment #4 Extra Task #1”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Assignment #4 Task #9 Addendum

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

Your application must work in both portrait and landscape orientations on the iPhone. Support for the iPad is optional (though it will be required next week, so you can save time later by implementing it now). Use appropriate platform-specific UI idioms (e.g., you must use UINavigationControllers to present the information on the iPhone).

We start by deleting everything in the iPad storyboard and copy everything from the iPhone storyboard into the iPad storyboard. Remove the segues from the table views to the photo view controller.

Drag in a split view controller and remove its master and detail view. Instead wire up the tab bar controller as master and the photo view controller as detail view. Add a bar tool to the photo view controller and create an outlet to its class. Finally setup the split view controller as initial view controller.
Continue reading “Assignment #4 Task #9 Addendum”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Assignment #4 Task #11

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

The list of recents photos should be saved in NSUserDefaults. The arrays you get back from the FlickrFetcher methods are all property lists.

Inside the photo view controller we set the setter for the photo model to save its data to NSUserDefaults. First we copy the existing list, or create an empty array if there is no entry yet. Using a block enumerator we loop through the array to see if the current photo is already there and remove it. Then we add the current photo data to the beginning of the array. If the array exceeds 20 items we delete the last one.
Continue reading “Assignment #4 Task #11”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail