quattro_4 scribble

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

NSScreencast Episode #31 Posting Multi-part Forms with AFNetworking

Posting Multi-part Forms with AFNetworking - NSScreencast

  • server app on heroku
    • cafe latte image app
    • activeadmin
  • +ボタンの実装
    • rightBarButton
    • addItem:(id)sender
    • itemCreated:(NSNotification *)notification
  • storyboard
    • tableview Crouped, Table View Section
      • Cell style (Basic, Right
      • Selection Style none ...
    • Handle cell on storyboard, delete, duplicate
    • Text View (for Comment)
  • Storyboadは一つのコントローラーに一つ使っても良い
    • UIStoryboard = storyBoardWithName
    • id vc = instanciateInitialViewController
    • self.navigationController pushViewController animated:YES
  • StaticTableView
    • viewDidLoad, viewDidUnload
    • tableView didSelectRowAtIndexPath
      • reuseIdentifier isEqualToString:@"someCell"
  • link field and code
    • set CustomClass
    • ^ドラッグ
  • imagePickerController
    • <UIImagePickerControllerDelegate, UINavigationBarDelegate>
    • didFinishPickingMediaWithInfo
    • UIImagePickereControllerEditedImage
    • save:(id)sender
      • latte.location = self.locationTextField.text, author, comment, photoData
      • saveWithProgress completion
        • self.navigationController popViewControllerAnimated:YES
      • Dismiss keyboard [self.view editEditing:YES]
    • ProgressView
  • MultiPartForm
    • submit data in saveWithProgress
    • NSDictionary = @{}
      • @"latte[location]" =
    • AFHTTPRequestOperation multipartFormRequestWithMethod:@"POST" path parameters
      • constructingBodyWithBloack id
      • appendPartWithFileData name fileName mimeType:@"image/png"
    • setUploadProgressBlock
      • long long totalBytesWritten
    • setCompletionBlockWithSuccess failure
      • operation.response.statusCode == 200 || ... 201
      • updateFromJSON:updatedLatte
      • completionBlock(YES, nil) (NO, nil) , (NO, error)
    • [operate start] =>
      • BLAPIClient enqueueHTTPRequest