cs193p – Lecture #18 – UIImagePickerController, Core Motion, and Localization

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

Lecture #18 starts by explaining how to add camera functionality (including a short demo), core motion (with demo) and localization (no demo due to lack of time).

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 “18. UIImagePickerController, Core Motion, and Localization (March 7, 2013)”.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Flattr this!

cs193p – Lecture #17 – View Animation, NSTimer, Alerts and Action Sheets

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

Lecture #17 starts with an introduction to view animations followed by a short demonstration. After an overview about timers they are incorporated in the demo, and finally alerts and action sheets – also put into the demonstration but not completely due to lack of time.

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 “17. View Animation, NSTimer, Alerts and Action Sheets (March 5, 2013)”.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Flattr this!

cs193p – Lecture #16 – Segues and Text Fields

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

Lecture #16 continues with the demo from the previous lecture, followed by an thorough introduction to modal and embed segues and text fields as well as another demo.

The code of the demos are available at Stanford and on github (photomania, kitchensink).

Slides are available on iTunes …..

The lecture is available at iTunes and is named “16. Segues and Text Fields”.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Flattr this!

cs193p – Lecture #15 – Core Location and MapKit

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

Lecture #15 provides an introduction to core location and MapKit followed by a short (not complete) demo.

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

Slides are available on iTunes …..

The lecture is available at iTunes and is named “15. Core Location and MapKit”.

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Flattr this!

cs193p – Assignment #6 Extra Task #4

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

Make one or more of your table views searchable. Check out UISearchDisplayController and UISearchBar.

Add a bar button to enable the search functionality in code and initialize it lazily:

@property (nonatomic, strong) IBOutlet UIBarButtonItem *searchButton;
...
- (UIBarButtonItem *)searchButton
{
    if (!_searchButton) {
        _searchButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSearch
                                                                      target:self
                                                                      action:@selector(searchButtonPressed:)];
                         
    }
    return _searchButton;
}

- (void)viewDidLoad
{
    ...
    self.navigationItem.rightBarButtonItem = self.searchButton;
}

Continue reading “cs193p – Assignment #6 Extra Task #4”

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Flattr this!

cs193p – Assignment #6 Extra Task #3

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

Have a row in your main table view called “All” which shows all the photos (not just the photos with a certain tag). Then have the table that appears when you click on “All” be divided into sections by tag (i.e., each section is one of the tags). The simplest way to add the “All” row is to update the information in your database a little bit rather than trying to special-case your table view code (though you will need a special case to turn on sections for that particular table of all photos since you don’t want other tables of photos to have sections). Luckily “All” is alphabetically at the top of the list of types of places, but can you think of a way to modify your schema/fetch criteria to ensure that it is always the top item in the list even if it’s not called “All” or if there were an “Abattoir” tag in the list?

Just add an additional tag for “All” to all photos. To circumvent to “Abattoir” sorting problem, name it so that it will be always be first, e.g.:

#define ALL_TAGS_STRING @"00000"
...
+ (NSSet *)tagsFromFlickrInfo:(NSDictionary *)photoDictionary
       inManagedObjectContext:(NSManagedObjectContext *)context
{
    ...
    tagStrings = [tagStrings arrayByAddingObject:ALL_TAGS_STRING];
    ...
}

Continue reading “cs193p – Assignment #6 Extra Task #3”

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Flattr this!

cs193p – Assignment #6 Extra Task #2

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

Allow users to delete photos (i.e. they no longer appear in tables). You should do it in a way that makes it so that the UIRefreshControl does not bring them back!

Deleting of cells is enabled by providing the appropriate delegate method. There delete the current photo and save the core-data document:

-  (void)tableView:(UITableView *)tableView
commitEditingStyle:(UITableViewCellEditingStyle)editingStyle
 forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        Photo *photo = [self.fetchedResultsController objectAtIndexPath:indexPath];
        [photo.managedObjectContext performBlock:^{
            [photo delete];
            [[SharedDocumentHandler sharedDocumentHandler] saveDocument];
        }];
    }
}

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

Facebooktwittergoogle_plusredditpinterestlinkedintumblrmailFacebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Flattr this!