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

A library for saving children

yashigani
December 14, 2013

A library for saving children

Introduction of Stop-Walking-iPhone (https://github.com/yashigani/Stop-Walking-iPhone).

Sample code(UIKit Dynamics): https://github.com/yashigani/UIKitDynamics-Sample

yashigani

December 14, 2013
Tweet

More Decks by yashigani

Other Decks in Programming

Transcript

  1. Stop-Walking-iPhone • It is a library that showing warning on

    app when texting while walking with iPhone • Powered by M7 • https://github.com/yashigani/Stop-Walking-iPhone
  2. Easy to use • Install by CocoaPods • Include default

    settings, default pictures • Of course can use original setting or resources • Should add one line code to enable
  3. Fun • Rich interface • Physical interaction • Like a

    Tweetbot 3 • Suppress bad impression • Pretty icons • Demo
  4. iOS 7 Design Standard • By Hiroaki Ogino (Chief Designer

    at Fenrir Inc.) • Flat design on iOS 7 • UI/UX • Not only designer. For anyone engage in iOS • Buy now!
  5. CMMotionActivityManager __weak __typeof(self) wself = self; CMMotionActivityManager *manager = [CMMotionActivityManager

    new]; NSOperationQueue *queue = NSOperationQueue.mainQueue; [manager startActivityUpdatesToQueue:queue withHandler:^(CMMotionActivity *activity) { [wself handleActivity:activity]; }];
  6. CMMotionActivity • Container motion data • Type of motion •

    stationary/walking/running/automotive • Metadata for motion • startDate • confidence
  7. Can access historical data • M7 always storing Activity on

    your device • Can get historical data • queryStepCountStartingFrom:to:toQueue:withHand ler: • queryActivityStartingFromDate:toDate:toQueue:wit hHandler: • Apps using M7 shouldn’t need move background
  8. UIKit Dynamics • Real-world inspired animation and interaction • Easy

    to use • Improve quality on custom UI parts with animation • Demo
  9. Hook animations • Can’t hook animation state • Not enough

    UIDynamicAnimatorDelegate • Use UICollisionBehaviorDelegate • Don’t calculate speed and duration
  10. UICollisionBehavior • One of predefined behavior • Easy to understand

    • Boundary • Can create bigger than reference view • Path • NSBezierPath
  11. Hook animation by collision • Create boundary bigger than screen

    • Disappear view when handled become collision
  12. Conclusion • Don’t texting while walking • M7 and CMMotionActivityManager

    • Hook animations on UIKit Dynamics • Include Stop-Walking-iPhone your App :)
  13. YSViewer • Image viewer library like Tweetbot 3 • https://github.com/

    yashigani/YSViewer • Install by CocoaPods • Free to use • Today
  14. Credits • Jonathan Adami: http://www.flickr.com/photos/ jonathanadami/7953963856/ • Charles LeBlanc: http://www.flickr.com/photos/

    httpoldmaisonblogspotcom/7070786787/ • Robert Couse-Baker: http://www.flickr.com/photos/ 29233640@N07/5535961307/ • jan zuppinger: http://www.flickr.com/photos/ pieceoplastic/8293895852/ • Wang Alive: http://www.flickr.com/photos/wang_alive/ 8044415103/