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

Superando barreiras no desenvolvimento iOS

Superando barreiras no desenvolvimento iOS

Palestra apresentada no DevCamp 2013.

Marcelo

May 11, 2013
Tweet

More Decks by Marcelo

Other Decks in Programming

Transcript

  1. Objective-C + (void)sendAsynchronousRequest:(NSURLRequest *)request queue:(NSOperationQueue*) queue completionHandler:(void (^)(NSURLResponse*, NSData*, NSError*))

    handler [NSURLConnection sendAsynchronousRequest:req queue:queue completionHandler:^(NSURLResponse *resp, NSData *data, NSError *err) { NSLog(@"%@", [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]); }];
  2. home.view.frame = self.view.frame; [[home view] setFrame:[[self view] frame]]; Para acessar

    propriedades, usa-se dot notation. Métodos são chamados com colchetes. Dot Notation
  3. NSDictionary *palestrante = [NSDictionary dictionaryWithObjectsAndKeys:@"Marcelo", @"nome", @"Palmeiras", @"time", nil]; NSString

    *nome = [palestrante objectForKey:@"nome"]; NSArray *numeros = [NSArray arrayWithObjects:[NSNumber numberWithInt:1], [NSNumber numberWithInt:2], nil]; NSNumber *um = [numeros objectAtIndex:0]; NSDictionary *palestrante = @{@"nome": @"Marcelo", @"time": @"Palmeiras"}; NSString *nome = palestrante[@"nome"]; NSArray *numeros = @[@1, @2]; NSNumber *um = numeros[0]; Literals http://clang.llvm.org/docs/ObjectiveCLiterals.html
  4. Xcode •Ruim, mas já foi pior! •Modinha nova: plugins ✓ColorSense-for-Xcode

    ✓KSImageNamed-Xcode http://mneorr.github.io/Alcatraz/
  5. Links •https://developer.apple.com/ •http://www.raywenderlich.com/ •https://github.com/github/objective-c-conventions •http://informalprotocol.com/2012/10/declaring-blocks-in-objective-c/ •http://iosdevweekly.com/ •http://nshipster.com/ •http://amattn.com/2011/12/07/arc_best_practices.html •http://dannysu.com/2012/07/30/automatic-reference-counting-on-ios/ •http://www.mikeash.com/pyblog/friday-qa-2011-09-30-automatic-reference-

    counting.html •http://conradstoll.com/blog/2013/1/19/blocks-operations-and-retain-cycles.html •https://speakerdeck.com/marcelofabri/e-se-eu-tivesse-um-delorean-tdc-2012 •http://www.raywenderlich.com/21987/top-10-most-useful-ios-libraries-to-know-and- love •http://www.raywenderlich.com/31166/25-ios-app-performance-tips-tricks