Session 7
adapting to data

Session Materials

Lecture 7 Slides
Resources

@modules

WWDC 2013 – Session 205 and 404
http://stackoverflow.com/questions/18947516/import-vs-import-ios-7
http://www.raywenderlich.com/49850/whats-new-in-objective-c-and-foundation-in-ios-7
http://clang.llvm.org/docs/Modules.html#module-map-language
NSDateFormatter
http://oleb.net/blog/2011/11/working-with-date-and-time-in-cocoa-part-2/

working-with-date-and-time-in-cocoa-part-2
Apple Documentation “Archives and Serializations Programming Guide”

Apple Developer Documentation

UISplitViewController
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISplitViewController_class/index.html#//apple_ref/occ/instp/UISplitViewController/displayMode

UIWebView
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIWebView_Class/index.html

NSUserDefaults
https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/

Singletons

https://developer.apple.com/library/ios/documentation/General/Conceptual/DevPedia-CocoaCore/Singleton.html
http://www.objc.io/issue-13/singletons.html

UISplitViewController

WWDC Session 216
https://developer.apple.com/videos/wwdc/2014/

Blocks
http://amattn.com/p/objective_c_blocks_summary_syntax_best_practices.html

Objective C Blocks: Summary, Syntax & Best Practices
Assignment

In this assignment you will update your RSS reader from assignment 6 to make it more feature rich.

Added Features

Add a settings bundle to you application. You should have an option that inverts the colors of the MasterViewController for a night reading mode. You application should check at launch time how to decorate the cells accordingly.

Add a custom splash screen between the default loading screen. This screen should indicate the application is downloading new data. Once the data is loaded, it should fade away and present the MasterViewController.

Tip: See GitHub Issue #149 for suggestions on implemented the Splash Screen
Save the last viewed article in NSUserDefaults and preload it in the UIWebVeb when the app is launched.

Use Appearance Proxy to customize the color and font of your navigation and tab bars.

Make the application Universal by using an adaptive Storyboard. You should use iOS8’s Master-Detail approach to doing this.

Tip: If you use the Xcode template, this should happen almost automatically. The default behavior provides the adaptive layout that we want. You may just need to check the contraints on your views to provide different values between Regular and Compact size classes.
Add an image of a star on the DetailViewController to let the users know they are reading a favorite article. Use Adaptive Layout techniques to ensure that the star can be seen at all times.

Create a custom UIView that functions as a loading screen that appears whenever UIWebView is loading content. Use UIActivityIndicator in the interface. You should use the UIWebView delegate methods to monitor the loading progress (See Figure 1).

Figure 1. Add heads-up-display to indicate to the user that content is downloading.
Figure 1. Add heads-up-display to indicate to the user that content is downloading.
Persist the user’s favorite articles to disk by implementing NSCoding protocols on a custom data class.

Implement table view cells auto-resizing for the MasterViewController.

Implement Dynamic Type by using the system fonts. You should register for notifications from the device so that you application will respond and adjust text size without relaunching.

The application should use the Social.framework to send a tweet about the current article displayed in the web view.

Functionality

The application should launch to a splash screen that indicates data is downloading. Handle the case if no network connection is available.

The users last read article should be preloaded in the UIWebView.

When a user taps on an article, it should load in the web view. The user should be informed that something is loading.

The user can save their favorite articles.

Tapping on the Bookmark button should present a popover style view controller with a table of favorite articles. The user should be allowed to delete articles from the list.

Tapping on article should dismiss the popover and load the article into the webview. A star image should appear somewhere over the article to show it is a favorite article.

The application’s UISplitViewController functionality should work correctly for every device:

In portrait, only the DetailViewController should show and display a button in the navigation bar to show the MasterViewController.
In landscape orientation, both view controllers should be visible.
If the user enables larger fonts in accessibility, the application should respond appropriately (without relaunch).

Grading

The application should compile with no errors or warnings and perform all described behaviors. If the app does not compile you will receive a 0. Feel free to explore additional enhancements to improve the appearance or functionality of the application.

The 10th point will be awarded to students who are able to show the popover on iPhone that is not full screen. See Figure 2.

Figure 2. Show a popover without full screen presentation on the iPhone for the 10th point.
Figure 2. Show a popover without full screen presentation on the iPhone for the 10th point.
Due Date

Assignment 7 is due February 23rd, 2015 at 5:29pm. Use the assignment repo username-MPCS51030-Winter-2015-Assignment-7 to submit your assignment.

In addition, please email one page final project proposal form.

Advertisements