Make the +/- Button For Assignment #1 Extra Credit

Below is my solution for one of the extra credit questions from assignment #1 from Stanford’s online CS193P class. Was trying to find a way to do it and found this post, it had an ok solution but the author mentions that a better solution would be something that manipulates the string instead of multiplying the display’s doubleValue. Here is what I came up with:

– (IBAction)plusMinusButtonPressed
{
    NSString *minusSymbol = @”-“;
    if ([self.display.text characterAtIndex:0] == ‘-‘) {
        NSRange myRange = NSMakeRange(0, [self.display.text length]);
        self.display.text = [self.display.text stringByReplacingOccurrencesOfString:@”-” withString:@”” options:NSLiteralSearch range:myRange];
    } else {
        self.display.text = [minusSymbol stringByAppendingString:self.display.text];
    }
}

Chrome for iOS

Chrome for iOS was released today, here is my pros/cons list for it:


Pros
Bookmark Syncing
View open tabs on other synced systems
Swipe between tabs
New tab screen is like the desktop version of Chrome, has panels of your most visited sites
An Omnibar


Cons
No Nitro JavaScript Engine
Can’t set as system default web browser


Conclusion
If you use Chrome on the desktop this is a no-brainer, get it. The 2 cons I listed are pretty minor. Don’t really care about JavaScript running slightly faster and changing the default web browser has become less of an issue to me lately. Sparrow and Reeder have built-in web browsers, as do many other apps, so changing the default browser is almost irrelevant. Even if you don’t use Chrome on the desktop I would recommend Chrome for iOS. The UI is slick and it has an omnibar, those reasons alone are enough to move from mobile Safari.

 

iOS Resource List Gets Its Own Page

Just made a separate page to keep all of my iOS resources in one place. This seemed like a much better solution than what I had been doing. The dig through posts to find it, copy/paste, add new content routine was getting old.

DocSets: An Awesome iOS/Mac Reference

DocSets is a Universal iOS app that lets you download and easily browse Apple’s developer documentation. The sets available are for Mac OS X 10.6/10.7 and iOS 4.2/4.3/5.0/5.1 with sizes ranging from around 200MB to 500MB. DocSets also happens to be an open source project available on GitHub. So beyond all that referency-goodness you can poke around in its source code to see how it works, algebraic!

WWDC 2012 Session Videos

Apple posted the WWDC 2012 session videos a couple days ago, will have to add it to my resource list. You do have to have a developer account to view the videos but it’s free to sign up, the $100 charge is only if you want to publish to the store or test on an iOS device.

Piazza Makes CS193P on iTunes Social

Piazza must be Italian for ‘perfect timing’ because I just started working through the Stanford iOS classes last week. Piazza acts as a class message board so you can work with other people taking the class to ask questions, etc. The class will run from June 25th to August 27th, registration ends on July 6th. Here are the links to sign up for Piazzo and the class on iTunes U.