cs193p – Assignment #6 Task #2 Part #2

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

Recreate the user-interface from last week’s assignment but rely entirely on the above-mentioned Core Data database to present it.

Copy the files for the second table-view controller from the previous project together with the image-view controller and the flicker cache class into the current project.

Change the table view controller to be a subclass of the core-data-table-view controller, and change the public property to be a Tag entity.

@interface FlickrPhotoTVC : CoreDataTableViewController
@property (nonatomic, strong) Tag *tag;

Continue reading “cs193p – Assignment #6 Task #2 Part #2”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #6 Task #2 Part #1

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

Recreate the user-interface from last week’s assignment but rely entirely on the above-mentioned Core Data database to present it.

Start by copying the content of story board for the iPhone of the previous SPoT project into the current project. Copy the class files for the first table-view controller of the first tab of the previous project together with the files for the network-activity indicator into the current project as well as the core-data-table-view controller from the demo of the lecture.

Define the table view controller as sub class of the ore-data-table-view controller:

@interface FlickrPhotoTagTVC : CoreDataTableViewController

Continue reading “cs193p – Assignment #6 Task #2 Part #1”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #6 Task #1

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

Create a Core Data-managed object database model in Xcode suitable for storing any information you queried from Flickr in the last assignment that you feel you will need to perform the rest of the Required Tasks in this assignment. Take the time to give some thought to what Entities, Attributes and Relationships your database will need before you dive in.

Following the recommendations of the assignment create a new blank universal single-view project. Create a new data model. Start by adding two new Entities “Photo” and “Tag” to hold the photos and its tags. Add a many-to-many relationship between them, because a photo can have multiple tags and a tag can have multiple photos.

The first table view should show the name of the tag and the number of photos it is associated with. Create a new string attribute for the tag entity to hold the name. The number of photos will be derived using its relationship to the photo tags.
Continue reading “cs193p – Assignment #6 Task #1”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #14 – Photomania Demo

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

Lecture #14 provides an extensive demo of Core Data.

The code of the demo is available at Stanford and on github.

Slides are available on iTunes …..

The lecture is available at iTunes and is named “14. Photomania Demo (February 21, 2013)”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #13 – Core Data Continued

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

Lecture #13 continues with Core Data, shows how to use categories to “enhance” managed objects, and explains how to use Core Data as source for table views.

Slides are available on iTunes …..

The lecture is available at iTunes and is named “13. Core Data Continued (February 19, 2013)”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #12 – Core Data

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

Lecture #12 starts with an detailed discussion about the final project (which is addressed to Stanford students only). The second half addresses Core Data and notifications.

Slides are available on iTunes …..

The lecture is available at iTunes and is named “12. Core Data (February 14, 2013)”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Assignment #5 Task #6

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

Sort all tables alphabetically (and case insensitively) except the Recents table (which should still be sorted with the most recently viewed first). A good solution to this might involve some of the array sorting methods that use blocks.

… actually the code up to this task already does sorting, but now it will be implemented using blocks.

For the tags create a new property – to do not have to resort everything every time the table needs to display a row:

@property (nonatomic, strong) NSArray *tags;
...
- (void)updatePhotosByTag
{
    ...
    self.tags = [[photosByTag allKeys] sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) {
        return [obj1 compare:obj2 options:NSCaseInsensitiveSearch];
    }];
}

Continue reading “cs193p – Assignment #5 Task #6”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail