Assignment #5 Task #3

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

Cache photo images viewed by the user into files in your application’s sandbox. Each photo’s image should be a separate file in the sandbox. Limit the cache to about 10MB total. When this limit is reached, the oldest photos in the cache should be evicted (deleted) to make room for new photos coming in. Your application should never query Flickr for the image data for a photo that it has in its cache (obviously). This cache should persist between application launches.

For the caching functionality we create a new class providing three public methods:

+ (FlickrCache *)cacheFor:(NSString *)folder;
- (NSURL *)urlForCachedPhoto:(NSDictionary *)photo format:(FlickrPhotoFormat)format;
- (void)cacheData:(NSData *)data ofPhoto:(NSDictionary *)photo format:(FlickrPhotoFormat)format;

Continue reading “Assignment #5 Task #3”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

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

Friday Session #5: Time Profiler

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

This weeks Friday session addresses the Time Profiler. It can be found on iTunes titled “Time Profiler (November 4, 2011)”.

In this session Alexander Chia shows when and how to use the time profiler on an example project calculation pi via a monte carlo algorithm and on a graphic calculator.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lecture #12: Persistence

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

Lecture twelve is named “12. Persistence (November 3, 2011)” and can be found at iTunes. Its slides are available at Stanford.

The first part of this lecture is designated to guidelines of the final project of the course and because it is targeted at campus students has been omitted from the iTunes stream.

The second part is devoted to persistence – the ways to save data between launchings of an application.
Continue reading “Lecture #12: Persistence”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

Lecture #11: Core Location and MapKit

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

Lecture eleven is named “11. Core Location and MapKit (November 1, 2011)” and can be found at iTunes. Its slides are available at Stanford.

The theoretical part starts with an introduction to Core Location and MapKit.

CoreLocation is a framework managing location and heading and has no user interface. Its basic object is CLLocation and contains properties like coordinate, altitude, horizontal/verticalAccuracy, timestamp, speed, course.
Continue reading “Lecture #11: Core Location and MapKit”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail