quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

NSScreencast Episode #10 Fun with Blocks

Fun with Blocks - NSScreencast

  • block From iOS SDK 4.0
  • UIImageVIew
    • frame = self.view.bounds
    • contentMode, UIViewContentModeScaleAspectFit
    • addSubview
    • UIActivityIndicatorView
      • hideWhenStopped = YES
      • center
      • addSubview
  • load resource
    • startAnimating
    • stopAnimating
    • dispatch_async(dispatch_get_global_queue
      • DISPATCH_QUEUE_PRIORITY_BACKGROUND
      • ^ { .. }
      • dispatch_async(dispatch_get_main_queue [_indicator stopAnimating]
  • UITapGestureRecognizer
    • action@selector(method)
  • completionBlock:(void (^)(UIImage *))completionBlock
    • completionBlock:^(UIImage *image)
  • NSStringFromCGSize
  • resizeImage
    • dispatch_async(dispatch_get_global_queue
    • CGSizeMake
    • UIGraphicsBeginImageContent(newSize)
    • [image drawInRect
    • UIGraphicsGetImageFromCurrentImageContext
    • UIGraphicsEndImageContext()
    • completion(obj)
  • typedef void (^ImageCompletionBlock)(UIImage *)
    • typedef void (^Actionblock)()
  • UIAnimations
    • UIView animateWithDuration:0.5 animations:^{
      • fade alpha = 1, 0
    • CGAffineTransformMakeScale
  • bounceImage
    • scale 1.1 -> 0.9 -> 1.0