cs193p – Project #4 Assignment #4 Task #2

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

When a user clicks on a Tweet, segue to a new UITableViewController which has four sections showing the “mentions” in the Tweet: Images, URLs, Hashtags and Users. The first section displays (one per row) any images attached to the Tweet (found in the media variable in the Tweet class). The last three show the items described in Required Task 1 (again, one per row).

Add a new table view controller to story board and a new table-view-controller class which you link to the new controller. Add a segue from the tweet cell too the new controller (don’t forget to add a segue identifier).
Continue reading “cs193p – Project #4 Assignment #4 Task #2”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Project #4 Assignment #4 Task #1

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

Enhance Smashtag from lecture to highlight (in a different color for each) hashtags, urls and user screen names mentioned in the text of a Tweet (these are known as “mentions”). Note that mentions are already located for you in each Tweet by Twitter and show up as [IndexedKeyword]s in the Tweet class in the supplied Twitter code.

The tweet class provides nearly everything needed – arrays of indexed keywords. What’s left is to choose a color for the keyword type – as public properties of the cell view:

    var hashtagColor = UIColor.blueColor()
    var urlColor = UIColor.redColor()
    var userMentionsColor = UIColor.greenColor()

Continue reading “cs193p – Project #4 Assignment #4 Task #1”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #12 Dynamic Animation

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

The twelfth lecture addresses a different approach to animation, creating sets of behaviors defining how items should interact with each other and the environment.

First we create an animator inside a reference view:

var animator = UIDynamicAnimator(referenceView: UIView)

Continue reading “cs193p – Lecture #12 Dynamic Animation”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #11 Unwind Segues, Alerts, Timers, View Animation

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

The eleventh lecture is theory only, starting with detailed discussion about the final project (which might only be interesting for Stanford students).

Unwind Segue

Unwind Segues provide a way to segue back to MVCs which directly or indirectly presented the current segue.
Continue reading “cs193p – Lecture #11 Unwind Segues, Alerts, Timers, View Animation”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Lecture #10 Table View

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

Though the lecture is called table view it starts with a “bonus topic”:

UITextField

The keyboard appears when a text field becomes first responder (becomeFirstResponder) and desperadoes when it resigns to be first responder (resignFirstResponder). To know when the return key has been pressed (functextFieldShouldReturn) or when editing has ended (textFieldDidEndEditing) is controlled via delegates or target/action notifications.
Continue reading “cs193p – Lecture #10 Table View”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Project #3 Assignment #3 Extra Task #6

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

Have your Calculator react to size class changes by laying out the user-interface differently in different size class environments (i.e. buttons in a different grid layout or even add more operations in one arrangement or the other). Doing this must not break anything else!

Most likely for the first step it is best to remove all constraints. Add some new buttons (I added a tangens operation, the euler constant and two blank buttons). Arrange them into an additional column. Have fun adding back the constraints (which does not really differ from the previous assignments …)

cs193p - Project #3 Assignment #3 Extra Task #6 - Any-Any Layout
cs193p – Project #3 Assignment #3 Extra Task #6 – Any-Any Layout

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

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail

cs193p – Project #3 Assignment #3 Extra Task #5

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

Add a popover to your new MVC that reports the minimum and maximum y-value (and other stats if you wish) in the region of the graph currently being shown. This will require you to create yet another new MVC and segue to it using a popover segue. It will also require some new public API in your generic graph view to report stats about the region of the graph it has drawn.

Add a new view controller (and a new class for it) and connect it to a new bar button item of the graph-view controller. Make the segue present the new view controller as popover and give it a sensible identifier. Add a text view including some constraints (Reset to suggested constraints should work fine).
cs193p - Project #3 Assignment #3 Extra Task #5 - Popover View Controller
Continue reading “cs193p – Project #3 Assignment #3 Extra Task #5”

FacebooktwitterredditpinterestlinkedintumblrmailFacebooktwitterredditpinterestlinkedintumblrmail