Friday, August 7, 2009

iPhone/iPodTouch App Lifecycle


NOTE: iPhone/iPodTouch applications should link to UIKit/UIKit.h (not Cocoa/Cocoa.h)

Remember: Cocoa is the desktop/Mac Framework
UIKit used for iPhone and iPod touch

NIB it up

NIB files
- specify UI components and information about object relationships

Wednesday, July 15, 2009

TMUG Meeting

I am attending the Tucson Macintosh User Group (tmug) tonight. It is being held in room 5403 of University Medical Center (UMC).

  • Tonight is hosted by President Bob Wood. Bob Wood is a 50-something bear of a man with glasses and a gray beard. (Dangerous Bob - a younger Bob Wood ... during the Eisenhower administration) - the All Powerful OZ in the for sale forum (i.e. moderator) - bob@thinkbob.com 762.0447


  • Co-Hosted by VP Ridge Prevost: another 50-something also with glasses. ridgep@aol.com, 298.7165

  • Secretary: Curt Blanchard - crblanchard@cox.net, 290.3848
  • Treasurer: Mark Jaffee - mjaffee.az@gmail.com, 299.9699
  • Member Advocate: Joyce Hardin, jrhardin@mindspring.com, 624.9644
  • Volunteer Programs: Tony Ewing, tce@ieee.org, 747.8283
  • Volunteer Web Site: Jerry Cederquist, salsa@tmug.com, 529.6593

  • Volunteer Training: John Nemerovski, john.nemo@gmail.com, 575.9596
  • Volunteer Training: Mike Peterson, mikeguru@mac.com, 325.4885
  • Membership: Marv Held, m122430@cox.net, 747.8547
  • Library: Michael Prete, michaelprete@cox.net, 325.4885
  • Publicity: Zack Williams, zdw@artisancomputer.com, 977.2973
  • Newsletter: Tom McGorray, tom@xgboy.com, 297.7878

  • Computer & Accessory Donations: Sara Matton, tmugsara@gmail.com
  • Membership Cost: $30 annually
  • ~17 people attending
  • TMUG members can get their business web-sites posted.
  • Review forum on the tmug site | Members Forum | Public Forum
  • Forum powered by Gossamar Forums
  • Learned how to import US Holidays to iCal by subscribing to site. Look HERE.
  • Bob Finley showed me a neat trick for the mac: you start typing a word and when you hit F5 (or fn-F5 on macbook pro) it will provide a popup pick list of possible words to complete the word. Thank you Bob!
  • TMUG luggage tags were handed out to all TMUG members.
  • TMUG Meeting Survey was handed out.
  • Michael
  • $273.64 HOME-GUARD (part of U.A.) for full-house surge protection. Tracy 745.3333. Apparently they put a box behind the electric meter.
  • A lady renting a VHS-to-Digital system
  • Gretchen (Bob's wife) - newest game Plants vs. Zombies demo.

    She reminds me a little bit of Martha Stewart. Need beads? Great Presentation!


  • Pages Presentation: pages is word processing an page layout. She showed us some of the neat alignment features within Pages. The Inspector has lots of settings to provide more fine-grained control.
  • Gretchen: Ooh [yuck], I never use Microsoft tools on my machine.
  • Below is a picture layout done in Pages. Pages Rocks!

  • Red River Paper : Paper types, Paper Weights, Thickness

  • Excitement and Suspense as door prizes are drawn!









Tuesday, July 14, 2009

Saving State

So, how is it that when you restart a well-designed iPhone/iPodTouch application it restores to the state it was in when you left the application?

Enter the NSUserDefaults ... a Singleton in the Apple

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

[defaults setInteger:polygonShape.numberOfSides forKey:@"numberOfSides"];


The previous section stores a number off into the NSUserDefaults area at some point. Where this is called is up to you, the developer.

Then when you restart your application you simply see if this key exists, if it does you use it if not then use some appropriate defaults.

NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];

int numberOfSides = [defaults integerForKey:@"numberOfSides"];

if(numberOfSides!=0) {

polygonShape.numberOfSides=numberOfSides;

numberOfSidesLabel.text = [NSString stringWithFormat:@"%d",numberOfSides];

}




Core Animation and iPhone Application Programming Guide

You know...every time I look up something produced by Apple I am rarely disappointed and almost always impressed.


iPhone App: Amazing Polygon App - update 4 images and transforms

The latest version of the application adds some features:
  • Image pull - from a resource file
  • Image rendering - both programmatically and using the Interface Builder
  • Image transformation - scale (size), rotation, and translation (position)
I am discovering just how excellent the Apple documentation is! UIKit, et al!