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

Além do Flat Design: O que mudou no iOS 7

Marcelo
September 28, 2013

Além do Flat Design: O que mudou no iOS 7

Todo mundo está falando do visual do iOS 7. Mas existe muito mais a ser explorado: novas APIs, mudanças de comportamento em APIs existentes e até novos frameworks. Descubra todo esse novo mundo nessa palestra!

Palestra apresentada originalmente no NSNull, em Campinas (28/09/2013).

Marcelo

September 28, 2013
Tweet

More Decks by Marcelo

Other Decks in Programming

Transcript

  1. 4 NSData(NSDataBase64Encoding) - (id)initWithBase64EncodedString:(NSString *)base64String options:(NSDataBase64DecodingOptions)options; - (NSString *)base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)options; -

    (id)initWithBase64EncodedData:(NSData *)base64Data options:(NSDataBase64DecodingOptions)options; - (NSData *)base64EncodedDataWithOptions:(NSDataBase64EncodingOptions)options; - (id)initWithBase64Encoding:(NSString *)base64String; - (NSString *)base64Encoding;
  2. 6 [UIImage -renderingMode] - (UIImage *)imageWithRenderingMode:(UIImageRenderingMode)renderingMode; typedef NS_ENUM(NSInteger, UIImageRenderingMode) {

    UIImageRenderingModeAutomatic, UIImageRenderingModeAlwaysOriginal, UIImageRenderingModeAlwaysTemplate };
  3. 7 JavaScriptCore JSContext *context = [[JSContext alloc] init]; JSValue *result

    = [context evaluateScript:@"2 + 2"]; NSLog(@"2 + 2 = %d", [result toInt32]); (JavaScript sem UIWebView!) WWDC 2013 #615: Integrating JavaScript into Native Apps
  4. 8 Descobrir se AirPlay está disponível (MPVolumeView) @property (nonatomic, readonly)

    BOOL wirelessRoutesAvailable; @property (nonatomic, readonly) BOOL wirelessRouteActive; NSString *const MPVolumeViewWirelessRoutesAvailableDidChangeNotification; NSString *const MPVolumeViewWirelessRouteActiveDidChangeNotification;
  5. 9 Descobrir tipo de rede de celular (CTTelephonyNetworkInfo) @property (nonatomic,

    readonly) NSString* currentRadioAccessTechnology; NSString * const CTRadioAccessTechnologyDidChangeNotification;
  6. 9 NSString * const CTRadioAccessTechnologyGPRS; NSString * const CTRadioAccessTechnologyEdge; NSString

    * const CTRadioAccessTechnologyWCDMA; NSString * const CTRadioAccessTechnologyHSDPA; NSString * const CTRadioAccessTechnologyHSUPA; NSString * const CTRadioAccessTechnologyCDMA1x; NSString * const CTRadioAccessTechnologyCDMAEVDORev0; NSString * const CTRadioAccessTechnologyCDMAEVDORevA; NSString * const CTRadioAccessTechnologyCDMAEVDORevB; NSString * const CTRadioAccessTechnologyeHRPD; NSString * const CTRadioAccessTechnologyLTE;
  7. AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc] init]; NSString *str = @"A

    palestra do Marcelo é a mais legal do NSNull!"; AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:str]; utterance.rate = AVSpeechUtteranceMaximumSpeechRate / 5.0f; [synthesizer speakUtterance:utterance]; https://gist.github.com/marcelofabri/6665076 12
  8. 15 -(UIImage *)blurredSnapshot { UIGraphicsBeginImageContextWithOptions(self.bounds.size, NO, self.window.screen.scale); [self drawViewHierarchyInRect:self.frame afterScreenUpdates:NO];

    UIImage *snapshotImage = UIGraphicsGetImageFromCurrentImageContext(); UIImage *blurredSnapshotImage = [snapshotImage applyLightEffect]; UIGraphicsEndImageContext(); return blurredSnapshotImage; }
  9. Status bar por ViewController 19 UIViewControllerBasedStatusBarAppearance = NO no plist

    para desativar @property(nonatomic,assign) BOOL modalPresentationCapturesStatusBarAppearance; - (UIStatusBarStyle)preferredStatusBarStyle; - (BOOL)prefersStatusBarHidden; - (UIViewController *)childViewControllerForStatusBarStyle; - (UIViewController *)childViewControllerForStatusBarHidden;
  10. A morte dos identificadores únicos 21 -[UIDevice uniqueIdentifier] removido MAC

    address retorna sempre 02:00:00:00:00:00 (afeta ODIN1) +[UIPasteboard pasteboardWithName:create:] e +[UIPasteboard pasteboardWithUniqueName] não são mais compartilhados (afeta OpenUDID)
  11. Cores do sistema depracted 22 + (UIColor *)viewFlipsideBackgroundColor NS_DEPRECATED_IOS(2_0, 7_0);

    + (UIColor *)scrollViewTexturedBackgroundColor NS_DEPRECATED_IOS(3_2, 7_0); + (UIColor *)underPageBackgroundColor NS_DEPRECATED_IOS(5_0, 7_0);
  12. Próximos Passos •View Controllers são sempre full screen •Nova validação

    de recibos (IAP) •Mudanças do MapKit •Transições de View Controllers •iBeacons •Text Kit •Modules •64 bits
  13. Próximos Passos •What’s New in iOS 7 •iOS SDK Release

    Notes for iOS 7 •iOS 6.1 to iOS 7.0 API Differences •iOS 7 : NSHipster •Essential iOS 7 Developer’s Guide •iOS7-Sampler •Custom UIViewController Transitions •Wrestling with Status Bars and Navigation Bars on iOS 7 •iOS 7 by Tutorials