Coder Social home page Coder Social logo

norimasanabeta / flickrfetcher Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 356 KB

stanfordcs193p2011Fall Lecture9-10 assignment In this assignment, you will continue working on your application that lets users browse Flickr photos. The first assignment in this series was to 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. Now you’ll fix problems with the responsiveness of your user-interface by using GCD to move blocking activity out of the main thread and by cacheing the image data you receive from Flickr. In addition, you’ll add some maps to your app and make it Universal.

Objective-C 100.00%

flickrfetcher's People

Contributors

norimasanabeta avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

flickrfetcher's Issues

RT6 annotation fitness

When a map view of photos appears on screen, its region should be set to the minimum size that fits all of its annotations (with an aesthetically-pleasing padding around them).

RT4

When the user chooses a place from the list obtained in Required Task #1, you must query Flickr again to get an array of 50 recent photos from that place and display them in a list.
Do this using the FlickrFetcher method photosInPlace:maxResults: (it returns an array of dictionaries, each of which contains info about a photo).

ExtraCredit1 thumbnail on the table cells

Add a photo's thumbnail image (FlickerFetcherPhotoFormatSquare) to every row in any table view that shows a list of photos.
Don't ask Flickr for the image data of thumbnails that never appear on screen (i.e. fetch thumbnail image data only on demand).
There's no need to cache these images(they are very small).
Obviously when a row first appears, it will not have the thumbnail image, but sometime later, when the thumbnail data comes back from Flickr (and if the row is still on screen), it should appear.
Beware Required Task 1(#13).
And consider the hint above about not calling UI methods from outside the main thread and also remember that table view cells are reused as the scroll on and off screen.

ExtraCredit2 map-style selector

Allow the user to switch between a normal map view, a satellite map view and a hybrid map view (you'll likely want to use UISegmentedControl for this).

RT6

When the user choose a photo from any list, display its image inside a scrolling view that allow the user to pan and zoom (a reasonable amount).
You obtain the URL, for a Flickr photo's image using FlickrFetcher's urlForPhoto:format:(use Large).

RT5 annotation callout

Anywhere in your application where a list of photos or places appears, give the user an option (via some UI of your choice) to view information in the list on a map instead.
Each annotation on the map should have a callout which displays the following;

a. The title of the photo or the name of the place.

b. In the case of a photo, its description (at least the first words of it, if any) and a thumbnail image (FlickrFetcherPhotoFormatSquare) of the photo. It is okey if the callout shows up initially without the thumbnail, but as soon as you are able to retrieve it from Flickr (assuming the callout is still on screen at that point), the thumbnail should appear.
Beware Required Task #1.

c. A disclosure button which brings up the full image of the chosen photo (exactly as if the user had chosen the photo from a table) or which brings up a list of photos in that place (again, exactly as if the user had chosen that place from a table).

RT3 image chache

Cache photo images viewed by the use 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 photo 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.

RT3

Anywhere a place appears in a table view in your application, the most detailed part of the location (e.g. the city name) should be the title of the table view's cell and the rest of the name of the location(e.g. state, province,country, etc.) should appear as the subtitle of the table view cell.

RT1

Use the provided FlickrFetcher class method topPlaces to get an array of the most poplar Flickr photo spots in the last day or so.
It is an array of NSDictionarys which contain information about each place.

EC1

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

RT8 check end-line yourself

Your must get your application working on a device this week.
Obviously we are not going to be able to check this, so it is on you (and the honor code) to check yourself on this required task.

RT5

Any list of photos should display the photo's title as the table view cell's title and its description as the table view cell's subtitle.
If the photo has no title, use its description as the title.
If it has no title or description, use "Unknown" as the title.

RT1 resposive UI

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).

RT8

Whenever a photo's image appears on screen, it should initially be zoomed to show as much of the photo as possible with no extra, unused space.
It is not necessary to continue to do this as the user rotates the device or zooms in and out on the photo by pinching.

RT9

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-spacific UI idioms (e.g., you must use UINavigationControllers to present the information on the iPhone).

RT4 keep memory small

Keep as little of the photo's image data in memory (i.e. RAM) as you can (i.e. don't keep strong pointers to NSData and/or UIImage objects for photos that are not on-screen). You should have at most 2 photo's image data in memory at a given time, preferably only 1 (if even 0 if none are being viewed).

RT2

Create a UITableBarController-based user-interface with two tabs. The first shows a UITableView with the list of places (in alphabetical order) obtained in Required Task #1.
The second shows a UItableView with a list of the 20 most recently viewed photos.

RT7 universal app

Your application must support both iPhone and iPad user-interface.
Use device-appropriate idioms.

RT10

The recents tab must show the list of most recently view photos in chronological order of viewing with the most recent at the top, and no duplicates in the list.
It is sufficient to only update the list each time it (re)appears on screen (i.e. in viewWillAppear:).
A photo can be uniquely identified by its "id" entry in its dictionary.

RT11

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

RT7

Make sure the photo's title is somewhere on screen whenever you are showing the photo image to the user.

RT2 spinning wheel

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.