cs193p – Lecture #11 – Multithreading and Persistence

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

Lecture #11 continues with multi threading and provides more insight into Grand Central Dispatch. It shows how to use refresh control, activity indicators and the network activity indicator. … incorporating all of that in Shutterbug …

The second half of the lecture addresses persistence, using archiving, SQLite and/or the file system.

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 “11. Multithreading and Persistence (February 12, 2013)”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #10 – iPad and Blocks

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

Lecture #10 introduces tool bars, pop overs and split views (which are demonstrated adjusting Shutterbug for the iPad) and finishes with blocks and multi threading including the new (iOS6) refresh-control feature.

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 “10. iPad and Blocks (February 7, 2013)”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #9 – Scroll View and Table View

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

Lecture #9 starts with an update concerning the view-controller lifecycle. Where pre-Autolayout you would have used viewWillAppear: for geometry based initialization, you should now use viewDidLayoutSubviews: because the first is called only when a view appears on screen and the later each time the bounds of of self.view change.

This is followed by a thorough introduction to scroll and table views. The second half of the lecture demonstrates both by populating a table view with information of photos from Flickr and to display them in a scroll view.

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 “9. Scroll View and Table View (February 5, 2013)”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #8 – Autolayout and Navigation

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

Lecture #8 starts with a discussion on auto layout and shows (slides only) how to adjust the current non-auto layout of the card playing game:

… fixed withs are bad!

… constraints defining distances should be Default or 0 … (use snapping to guidelines) …

… constraints can have priorities from 0 to 1000 – 1000 means mandatory …

… purple constraints are mandatory, blue ones are user constraints …

… content hugging shrinks the size of the surrounding frame to its contents …

… the actual layout (portrait vs landscape) can be tested directly in story board using the attribute inspector of a controller in storybaord …

Continue reading “cs193p – Lecture #8 – Autolayout and Navigation”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #7 – Collection View and Protocols

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

Lecture #7 handles protocols, collection views – again – with an extensive demo.

… lots about protocols and its usage …

UICollectionsViews are new in IOS6. They are assemblies of UICollectionViewCells arranged e.g. by UICollectionViewFlowLayout.

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 “7. Collection View and Protocols (January 29, 2013)”.

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #6 – Views and Gestures

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

Lecture #6 covers views and gestures and shows how to use them in a extensive demo at the end of the lecture:

The hierarchy of views is most often constructed in storyboard but it can be done also:

- (void)addSubview:(UIView*)aView;
- (void)removeFromSuperview;

A view can be accessed from a view controller using its:

@property (strong, nonatomic) UIView *view

Continue reading “cs193p – Lecture #6 – Views and Gestures”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #5 – View Controller Lifecycle and Multiple MVCs

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

Lecture #5 covers the view-controller life cycle and multiple MVCs and finishes with another demo of the Matchismo card game.

viewDidLoad is a good place to hold setup code – but has not geometry set yet.
viewWillAppear is for geometry-related initialization, lazy execution and late updating.

“A view gets loaded only once, but can appear and disappear a lot.”

viewWillDisAppear is suitable to “remember” and “clean up”.
view{Will,Did}LayoutSubviews is suitable to react to geometry changes.

Autorotation is controlled by shouldAutorotate
Continue reading “cs193p – Lecture #5 – View Controller Lifecycle and Multiple MVCs”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail