Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Really Simple Cocoa Tips (2007)

Really Simple Cocoa Tips (2007)

Yung-Luen Lan

September 13, 2007
Tweet

More Decks by Yung-Luen Lan

Other Decks in Programming

Transcript

  1. NSString, தจʁ NSString *s = @”தจ” ???? Tiger ؐෆೳṜᒬሜ... NSString

    *s = [NSString stringWithUTF8String: “தจ”]; Save: 2 hour in your life
  2. NSString, தจʁ NSString *s = @”தจ” ???? Tiger ؐෆೳṜᒬሜ... NSString

    *s = [NSString stringWithUTF8String: “தจ”]; ߋ޷త㭎๏ੋ์ࡏ Localized Resource ཫʂ Save: 2 hour in your life
  3. NSLog, தจʁ ᘃᘃṜݸఔࣜత Output ੋṫɿ #import <Cocoa/Cocoa.h> int main() {

    NSAutoreleasePool *pool = [NSAutoreleasePool new]; NSLog(@"%@", @"Hello, world."); NSLog(@"%@", [NSString stringWithUTF8String: "ੈք㟬޷"]); NSLog(@"%@", [NSString stringWithUTF8String: "͓ݩؾͰ͕͢?"]); NSLog(@"%@", [NSString stringWithUTF8String: "bonjour."]); [pool release]; return 0; }
  4. Xcode Hotkey opt shift ⌘ ? = Help ⌘ opt

    = Jump to definition / declaration = Look up in Apple Reference Library Save: 10 secs each time
  5. __MyCompanyName__ ? defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{ "ORGANIZATIONNAME" = "My

    Company";}' or edit: /Library/Application Support/Apple/Developer Tools Save: 1 mins for googling OR 4 hours of searching your HD manually