├── .gitignore
├── LICENSE
├── README.md
├── iOS动画指南
├── iOS动画指南 - 2.Layer Animations的基本使用
│ ├── layer.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── layer
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── Snip20160615_2.imageset
│ │ │ ├── Contents.json
│ │ │ └── Snip20160615_2.png
│ │ └── Snip20160615_3.imageset
│ │ │ ├── Contents.json
│ │ │ └── Snip20160615_3.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── iOS动画指南 - 3.Layer Animations的进阶使用
│ ├── 1.CAKeyframeAnimation
│ │ ├── layerAnimations.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ └── layerAnimations
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ └── Snip20160615_3.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── Snip20160615_3.png
│ │ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ │ ├── Info.plist
│ │ │ └── ViewController.swift
│ ├── 2.ShapeMask
│ │ ├── ShapeMask.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ └── ShapeMask
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── avatar-1.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── avatar-1@2x.png
│ │ │ │ └── avatar-1@3x.png
│ │ │ ├── avatar-2.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── avatar-2@2x.png
│ │ │ │ └── avatar-2@3x.png
│ │ │ └── empty.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── empty@2x.png
│ │ │ │ └── empty@3x.png
│ │ │ ├── AvatarView.swift
│ │ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ │ ├── Info.plist
│ │ │ └── ViewController.swift
│ ├── 3.GradientAnimation
│ │ ├── GradientAnimation.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ └── GradientAnimation
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets
│ │ │ └── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ │ ├── GradientLabel.swift
│ │ │ ├── Info.plist
│ │ │ └── ViewController.swift
│ ├── 4.PullToRefresh
│ │ ├── PullToRefresh.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ └── PullToRefresh
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ └── airplane.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── icon-plane@2x.png
│ │ │ │ └── icon-plane@3x.png
│ │ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ │ ├── Info.plist
│ │ │ ├── RefreshView.swift
│ │ │ └── ViewController.swift
│ └── 5.ReplicatingAnimations
│ │ ├── ReplicatingAnimations.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── ReplicatingAnimations
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── iOS动画指南 - 4.右拉的3D抽屉效果
│ ├── SideMenu.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ └── SideMenu
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── menu.imageset
│ │ │ ├── Contents.json
│ │ │ ├── menu@2x.png
│ │ │ └── menu@3x.png
│ │ ├── Base.lproj
│ │ └── LaunchScreen.storyboard
│ │ ├── ContainerViewController.swift
│ │ ├── Info.plist
│ │ ├── MainViewController.swift
│ │ ├── MenuButton.swift
│ │ ├── MenuCell.swift
│ │ ├── MenuItem.swift
│ │ └── SideMenuViewController.swift
├── iOS动画指南 - 5.下雪的粒子效果、帧动画
│ ├── 1.snowSense
│ │ ├── snowSense.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ └── snowSense
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── flake.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── snowflake1.png
│ │ │ └── flake3.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── flake3.png
│ │ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ │ ├── Info.plist
│ │ │ └── ViewController.swift
│ └── 2.penguinRun
│ │ ├── penguinRun.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── penguinRun
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ ├── bg.imageset
│ │ │ ├── Contents.json
│ │ │ ├── bg@2x.png
│ │ │ └── bg@3x.png
│ │ ├── btn-left.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn-left@2x.png
│ │ │ └── btn-left@3x.png
│ │ ├── btn-right.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn-right@2x.png
│ │ │ └── btn-right@3x.png
│ │ ├── btn-slide.imageset
│ │ │ ├── Contents.json
│ │ │ ├── btn-slide@2x.png
│ │ │ └── btn-slide@3x.png
│ │ ├── slide01.imageset
│ │ │ ├── Contents.json
│ │ │ ├── slide01@2x.png
│ │ │ └── slide01@3x.png
│ │ ├── slide02.imageset
│ │ │ ├── Contents.json
│ │ │ ├── slide02@2x.png
│ │ │ └── slide02@3x.png
│ │ ├── walk01.imageset
│ │ │ ├── Contents.json
│ │ │ ├── walk01@2x.png
│ │ │ └── walk01@3x.png
│ │ ├── walk02.imageset
│ │ │ ├── Contents.json
│ │ │ ├── walk02@2x.png
│ │ │ └── walk02@3x.png
│ │ ├── walk03.imageset
│ │ │ ├── Contents.json
│ │ │ ├── walk03@2x.png
│ │ │ └── walk03@3x.png
│ │ └── walk04.imageset
│ │ │ ├── Contents.json
│ │ │ ├── walk04@2x.png
│ │ │ └── walk04@3x.png
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── ViewController.swift
├── iOS动画指南 - 6.可以很酷的转场动画
│ ├── 1.cook
│ │ ├── 1.Cook
│ │ │ ├── Cook.xcodeproj
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace
│ │ │ │ │ └── contents.xcworkspacedata
│ │ │ └── Cook
│ │ │ │ ├── AppDelegate.swift
│ │ │ │ ├── Assets.xcassets
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── anise.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── anise.jpg
│ │ │ │ ├── basil.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── basil.jpg
│ │ │ │ ├── bg.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── bg@2x.jpg
│ │ │ │ ├── marjorana.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── marjorana.jpg
│ │ │ │ ├── rosemary.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── rosemary.jpg
│ │ │ │ └── saffron.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── saffron.jpg
│ │ │ │ ├── Base.lproj
│ │ │ │ ├── LaunchScreen.storyboard
│ │ │ │ └── Main.storyboard
│ │ │ │ ├── HerbDetailsViewController.swift
│ │ │ │ ├── HerbModel.swift
│ │ │ │ ├── Info.plist
│ │ │ │ ├── PopAnimator.swift
│ │ │ │ └── ViewController.swift
│ │ ├── 2.Cook
│ │ │ ├── Cook.xcodeproj
│ │ │ │ ├── project.pbxproj
│ │ │ │ └── project.xcworkspace
│ │ │ │ │ └── contents.xcworkspacedata
│ │ │ └── Cook
│ │ │ │ ├── AppDelegate.swift
│ │ │ │ ├── Assets.xcassets
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── Contents.json
│ │ │ │ ├── anise.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── anise.jpg
│ │ │ │ ├── basil.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── basil.jpg
│ │ │ │ ├── bg.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── bg@2x.jpg
│ │ │ │ ├── marjorana.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── marjorana.jpg
│ │ │ │ ├── rosemary.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── rosemary.jpg
│ │ │ │ └── saffron.imageset
│ │ │ │ │ ├── Contents.json
│ │ │ │ │ └── saffron.jpg
│ │ │ │ ├── Base.lproj
│ │ │ │ ├── LaunchScreen.storyboard
│ │ │ │ └── Main.storyboard
│ │ │ │ ├── HerbDetailsViewController.swift
│ │ │ │ ├── HerbModel.swift
│ │ │ │ ├── Info.plist
│ │ │ │ ├── PopAnimator.swift
│ │ │ │ └── ViewController.swift
│ │ └── 3.Cook
│ │ │ ├── Cook.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ │ └── Cook
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── anise.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── anise.jpg
│ │ │ ├── basil.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── basil.jpg
│ │ │ ├── bg.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── bg@2x.jpg
│ │ │ ├── marjorana.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── marjorana.jpg
│ │ │ ├── rosemary.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── rosemary.jpg
│ │ │ └── saffron.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── saffron.jpg
│ │ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ │ ├── HerbDetailsViewController.swift
│ │ │ ├── HerbModel.swift
│ │ │ ├── Info.plist
│ │ │ ├── PopAnimator.swift
│ │ │ └── ViewController.swift
│ └── 2.reveal
│ │ ├── 1.reveal
│ │ ├── reveal.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ └── reveal
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ └── anise.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ └── anise.jpg
│ │ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ │ ├── DetailViewController.swift
│ │ │ ├── Info.plist
│ │ │ ├── RWLogoLayer.swift
│ │ │ ├── RevealAnimator.swift
│ │ │ └── ViewController.swift
│ │ └── 2.reveal
│ │ ├── reveal.xcodeproj
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── reveal
│ │ ├── AppDelegate.swift
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── anise.imageset
│ │ │ ├── Contents.json
│ │ │ └── anise.jpg
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── DetailViewController.swift
│ │ ├── Info.plist
│ │ ├── RWLogoLayer.swift
│ │ ├── RevealAnimator.swift
│ │ └── ViewController.swift
└── iOS动画指南 - 7.简化动画实现的EasyAnimation库
│ └── EasyAnimationDemo
│ ├── EasyAnimationDemo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── EasyAnimationDemo
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ └── dog.imageset
│ │ ├── Contents.json
│ │ └── Snip20160615_3.png
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── EasyAnimation
│ ├── EAAnimationFuture.swift
│ ├── EasyAnimation.h
│ ├── EasyAnimation.swift
│ ├── Info-tvOS.plist
│ ├── Info.plist
│ └── RBBSpringAnimation
│ │ ├── LICENSE
│ │ ├── RBBBlockBasedArray.swift
│ │ ├── RBBLinearInterpolation.swift
│ │ └── RBBSpringAnimation.swift
│ ├── Info.plist
│ └── ViewController.swift
└── 设计模式(Swift)
├── 1.MVC
├── DPMVCDemo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── DPMVCDemo
│ ├── Address.swift
│ ├── AddressView.swift
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── 2.Delegation
├── Delegation.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Delegation
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── MenuViewController.swift
│ └── ViewController.swift
├── 3.Singleton
├── Singleton.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Singleton
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── 4.Memento
├── Memento.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Memento
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── 5.Strategy
├── Strategy.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Strategy
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── ViewController.swift
├── 6.Observer
├── Observer.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Observer
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ └── Contents.json
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ ├── Observable.swift
│ └── ViewController.swift
└── 7.Builder
├── Builder.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
└── Builder
├── AppDelegate.swift
├── Assets.xcassets
├── AppIcon.appiconset
│ └── Contents.json
└── Contents.json
├── Base.lproj
├── LaunchScreen.storyboard
└── Main.storyboard
├── Info.plist
└── ViewController.swift
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | .DS_Store
6 |
7 | ## Build generated
8 | build/
9 | DerivedData/
10 |
11 | ## Various settings
12 | *.pbxuser
13 | !default.pbxuser
14 | *.mode1v3
15 | !default.mode1v3
16 | *.mode2v3
17 | !default.mode2v3
18 | *.perspectivev3
19 | !default.perspectivev3
20 | xcuserdata/
21 |
22 | ## Other
23 | *.moved-aside
24 | *.xcuserstate
25 |
26 | ## Obj-C/Swift specific
27 | *.hmap
28 | *.ipa
29 | *.dSYM.zip
30 | *.dSYM
31 |
32 | ## Playgrounds
33 | timeline.xctimeline
34 | playground.xcworkspace
35 |
36 | # Swift Package Manager
37 | #
38 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
39 | # Packages/
40 | .build/
41 |
42 | # CocoaPods
43 | #
44 | # We recommend against adding the Pods directory to your .gitignore. However
45 | # you should judge for yourself, the pros and cons are mentioned at:
46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
47 | #
48 | # Pods/
49 |
50 | # Carthage
51 | #
52 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
53 | # Carthage/Checkouts
54 |
55 | Carthage/Build
56 |
57 | # fastlane
58 | #
59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
60 | # screenshots whenever they are needed.
61 | # For more information about the recommended setup visit:
62 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
63 |
64 | fastlane/report.xml
65 | fastlane/Preview.html
66 | fastlane/screenshots
67 | fastlane/test_output
68 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Dariel
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DemoCode
2 | #### Blog Demo Code
3 |
4 | * iOS动画指南 - 2.Layer Animations的基本使用
5 | * iOS动画指南 - 3.Layer Animations的进阶使用
6 | * iOS动画指南 - 4.右拉的3D抽屉效果
7 | * iOS动画指南 - 5.下雪的粒子效果、帧动画
8 | * iOS动画指南 - 6.可以很酷的转场动画
9 | * iOS动画指南 - 7.简化动画实现的EasyAnimation库
10 |
11 |
12 |
13 | * 设计模式(Swift) - 1.MVC和代理
14 | * 设计模式(Swift) - 2.单例模式、备忘录模式和策略模式
15 | * 设计模式(Swift) - 3.观察者模式、建造者模式
16 |
17 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer/Assets.xcassets/Snip20160615_2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "Snip20160615_2.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer/Assets.xcassets/Snip20160615_2.imageset/Snip20160615_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer/Assets.xcassets/Snip20160615_2.imageset/Snip20160615_2.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer/Assets.xcassets/Snip20160615_3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "Snip20160615_3.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer/Assets.xcassets/Snip20160615_3.imageset/Snip20160615_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer/Assets.xcassets/Snip20160615_3.imageset/Snip20160615_3.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 2.Layer Animations的基本使用/layer/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/1.CAKeyframeAnimation/layerAnimations.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/1.CAKeyframeAnimation/layerAnimations/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // layerAnimations
4 | //
5 | // Created by Dariel on 16/6/21.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
18 | return true
19 | }
20 |
21 | func applicationWillResignActive(application: UIApplication) {
22 |
23 | }
24 |
25 | func applicationDidEnterBackground(application: UIApplication) {
26 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
27 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
28 | }
29 |
30 | func applicationWillEnterForeground(application: UIApplication) {
31 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
32 | }
33 |
34 | func applicationDidBecomeActive(application: UIApplication) {
35 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
36 | }
37 |
38 | func applicationWillTerminate(application: UIApplication) {
39 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
40 | }
41 |
42 |
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/1.CAKeyframeAnimation/layerAnimations/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/1.CAKeyframeAnimation/layerAnimations/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/1.CAKeyframeAnimation/layerAnimations/Assets.xcassets/Snip20160615_3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "Snip20160615_3.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/1.CAKeyframeAnimation/layerAnimations/Assets.xcassets/Snip20160615_3.imageset/Snip20160615_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/1.CAKeyframeAnimation/layerAnimations/Assets.xcassets/Snip20160615_3.imageset/Snip20160615_3.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/1.CAKeyframeAnimation/layerAnimations/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/1.CAKeyframeAnimation/layerAnimations/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/1.CAKeyframeAnimation/layerAnimations/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/avatar-1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "avatar-1@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "avatar-1@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/avatar-1.imageset/avatar-1@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/avatar-1.imageset/avatar-1@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/avatar-1.imageset/avatar-1@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/avatar-1.imageset/avatar-1@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/avatar-2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "avatar-2@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "avatar-2@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/avatar-2.imageset/avatar-2@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/avatar-2.imageset/avatar-2@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/avatar-2.imageset/avatar-2@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/avatar-2.imageset/avatar-2@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/empty.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "empty@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "empty@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/empty.imageset/empty@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/empty.imageset/empty@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/empty.imageset/empty@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Assets.xcassets/empty.imageset/empty@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/2.ShapeMask/ShapeMask/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/3.GradientAnimation/GradientAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/3.GradientAnimation/GradientAnimation/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/3.GradientAnimation/GradientAnimation/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/3.GradientAnimation/GradientAnimation/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/3.GradientAnimation/GradientAnimation/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/3.GradientAnimation/GradientAnimation/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // GradientAnimation
4 | //
5 | // Created by Dariel on 16/6/22.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | let label = GradientLabel()
17 | label.center = view.center
18 | label.bounds = CGRect(x: 0, y: 0, width: 239, height: 44)
19 | label.text = "> 滑动来解锁"
20 |
21 | view.addSubview(label)
22 | view.backgroundColor = UIColor.darkGrayColor()
23 | }
24 |
25 | override func didReceiveMemoryWarning() {
26 | super.didReceiveMemoryWarning()
27 | // Dispose of any resources that can be recreated.
28 | }
29 |
30 |
31 | }
32 |
33 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/4.PullToRefresh/PullToRefresh.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/4.PullToRefresh/PullToRefresh/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/4.PullToRefresh/PullToRefresh/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/4.PullToRefresh/PullToRefresh/Assets.xcassets/airplane.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "icon-plane@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "icon-plane@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/4.PullToRefresh/PullToRefresh/Assets.xcassets/airplane.imageset/icon-plane@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/4.PullToRefresh/PullToRefresh/Assets.xcassets/airplane.imageset/icon-plane@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/4.PullToRefresh/PullToRefresh/Assets.xcassets/airplane.imageset/icon-plane@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/4.PullToRefresh/PullToRefresh/Assets.xcassets/airplane.imageset/icon-plane@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/4.PullToRefresh/PullToRefresh/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/4.PullToRefresh/PullToRefresh/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/5.ReplicatingAnimations/ReplicatingAnimations.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/5.ReplicatingAnimations/ReplicatingAnimations/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/5.ReplicatingAnimations/ReplicatingAnimations/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/5.ReplicatingAnimations/ReplicatingAnimations/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 3.Layer Animations的进阶使用/5.ReplicatingAnimations/ReplicatingAnimations/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/Assets.xcassets/menu.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "menu@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "menu@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/Assets.xcassets/menu.imageset/menu@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/Assets.xcassets/menu.imageset/menu@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/Assets.xcassets/menu.imageset/menu@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/Assets.xcassets/menu.imageset/menu@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/MainViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // SideMenu
4 | //
5 | // Created by Dariel on 16/7/10.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class MainViewController: UIViewController {
12 |
13 | var menuItem: MenuItem! {
14 | didSet {
15 | navigationItem.title = menuItem.title
16 | view.backgroundColor = menuItem.color
17 | symbol.text = menuItem.symbol
18 | }
19 | }
20 |
21 | var menuButton: MenuButton!
22 | override func viewDidLoad() {
23 | super.viewDidLoad()
24 | menuButton = MenuButton()
25 |
26 | view.addSubview(symbol)
27 | symbol.center = self.view.center
28 |
29 | menuButton.tapHandler = {
30 | if let containerVC = self.navigationController?.parentViewController as? ContainerViewController {
31 | containerVC.toggleSideMenu()
32 | }
33 | }
34 | navigationItem.leftBarButtonItem = UIBarButtonItem(customView: menuButton)
35 | menuItem = MenuItem.sharedItems.first!
36 | }
37 |
38 | lazy var symbol: UILabel = {
39 | let symbol = UILabel()
40 | symbol.font = UIFont.systemFontOfSize(140)
41 | symbol.frame.size = CGSize(width: 144, height: 168)
42 | symbol.textAlignment = .Center
43 | return symbol
44 | }()
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/MenuButton.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MenuButton.swift
3 | // SideMenu
4 | //
5 | // Created by Dariel on 16/7/13.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class MenuButton: UIView {
12 |
13 | var imageView: UIImageView!
14 | var tapHandler: (()->())?
15 |
16 | override func didMoveToSuperview() {
17 |
18 | frame = CGRect(x: 0, y: 0, width: 20.0, height: 20.0)
19 | imageView = UIImageView(image: UIImage(named: "menu"))
20 | imageView.userInteractionEnabled = true
21 | imageView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: Selector("didTap")))
22 | addSubview(imageView)
23 |
24 | }
25 |
26 | func didTap() {
27 | tapHandler?()
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 4.右拉的3D抽屉效果/SideMenu/MenuCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MenuCell.swift
3 | // SideMenu
4 | //
5 | // Created by Dariel on 16/7/13.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class MenuCell: UITableViewCell {
12 |
13 | override func awakeFromNib() {
14 | super.awakeFromNib()
15 | // Initialization code
16 | }
17 |
18 | override func setSelected(selected: Bool, animated: Bool) {
19 | super.setSelected(selected, animated: animated)
20 |
21 | // Configure the view for the selected state
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense/Assets.xcassets/flake.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "snowflake1.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense/Assets.xcassets/flake.imageset/snowflake1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense/Assets.xcassets/flake.imageset/snowflake1.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense/Assets.xcassets/flake3.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "flake3.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense/Assets.xcassets/flake3.imageset/flake3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense/Assets.xcassets/flake3.imageset/flake3.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/1.snowSense/snowSense/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/bg.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "bg@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "bg@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/bg.imageset/bg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/bg.imageset/bg@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/bg.imageset/bg@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/bg.imageset/bg@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-left.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn-left@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn-left@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-left.imageset/btn-left@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-left.imageset/btn-left@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-left.imageset/btn-left@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-left.imageset/btn-left@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-right.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn-right@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn-right@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-right.imageset/btn-right@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-right.imageset/btn-right@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-right.imageset/btn-right@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-right.imageset/btn-right@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-slide.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "btn-slide@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "btn-slide@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-slide.imageset/btn-slide@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-slide.imageset/btn-slide@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-slide.imageset/btn-slide@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/btn-slide.imageset/btn-slide@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/slide01.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "slide01@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "slide01@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/slide01.imageset/slide01@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/slide01.imageset/slide01@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/slide01.imageset/slide01@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/slide01.imageset/slide01@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/slide02.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "slide02@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "slide02@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/slide02.imageset/slide02@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/slide02.imageset/slide02@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/slide02.imageset/slide02@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/slide02.imageset/slide02@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk01.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "walk01@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "walk01@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk01.imageset/walk01@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk01.imageset/walk01@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk01.imageset/walk01@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk01.imageset/walk01@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk02.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "walk02@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "walk02@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk02.imageset/walk02@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk02.imageset/walk02@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk02.imageset/walk02@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk02.imageset/walk02@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk03.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "walk03@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "walk03@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk03.imageset/walk03@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk03.imageset/walk03@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk03.imageset/walk03@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk03.imageset/walk03@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk04.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "walk04@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "walk04@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk04.imageset/walk04@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk04.imageset/walk04@2x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk04.imageset/walk04@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Assets.xcassets/walk04.imageset/walk04@3x.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 5.下雪的粒子效果、帧动画/2.penguinRun/penguinRun/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationLandscapeLeft
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/anise.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "anise.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/anise.imageset/anise.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/anise.imageset/anise.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/basil.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "basil.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/basil.imageset/basil.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/basil.imageset/basil.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/bg.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "bg@2x.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/bg.imageset/bg@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/bg.imageset/bg@2x.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/marjorana.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "marjorana.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/marjorana.imageset/marjorana.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/marjorana.imageset/marjorana.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/rosemary.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "rosemary.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/rosemary.imageset/rosemary.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/rosemary.imageset/rosemary.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/saffron.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "saffron.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/saffron.imageset/saffron.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Assets.xcassets/saffron.imageset/saffron.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/HerbDetailsViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HerbDetailsViewController.swift
3 | // Cook
4 | //
5 | // Created by Dariel on 16/7/24.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class HerbDetailsViewController: UIViewController {
12 |
13 | var herb: HerbModel!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 |
18 | bgImage.image = UIImage(named: herb.image)
19 | view.addSubview(bgImage)
20 | view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: Selector("actionClose:")))
21 |
22 | }
23 |
24 | override func preferredStatusBarStyle() -> UIStatusBarStyle {
25 | return .LightContent
26 | }
27 |
28 | func actionClose(tap: UITapGestureRecognizer) {
29 | presentingViewController?.dismissViewControllerAnimated(true, completion: nil)
30 | }
31 | lazy var bgImage: UIImageView = {
32 | let bg = UIImageView()
33 | bg.frame = self.view.bounds
34 | return bg
35 | }()
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/HerbModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HerbModel.swift
3 | // Cook
4 | //
5 | // Created by Dariel on 16/7/24.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | struct HerbModel {
10 | let name: String
11 | let image: String
12 |
13 | static func all() -> [HerbModel] {
14 |
15 | return [
16 | HerbModel(name: "Saffron", image: "saffron.jpg"),
17 | HerbModel(name:"Basil", image: "basil.jpg"),
18 | HerbModel(name: "Marjoram", image: "marjorana.jpg"),
19 | HerbModel(name: "Rosemary", image: "rosemary.jpg"),
20 | HerbModel(name: "Anise", image: "anise.jpg")
21 | ]
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/1.Cook/Cook/PopAnimator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PopAnimator.swift
3 | // Cook
4 | //
5 | // Created by Dariel on 16/7/25.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | // 遵守协议
12 | class PopAnimator: NSObject, UIViewControllerAnimatedTransitioning {
13 |
14 | let duration = 1.0
15 | var presenting = true
16 | var originFrame = CGRect.zero
17 |
18 |
19 | // 动画持续时间
20 | func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {
21 | return duration
22 | }
23 |
24 | //
25 | func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
26 |
27 | // 获得容器
28 | let containerView = transitionContext.containerView()!
29 | // 获得目标view
30 | // viewForKey 获取新的和老的控制器的view
31 | // viewControllerForKey 获取新的和老的控制器
32 | let toView = transitionContext.viewForKey(UITransitionContextToViewKey)!
33 |
34 |
35 | containerView.addSubview(toView)
36 | toView.alpha = 0.0
37 |
38 | UIView.animateWithDuration(duration, animations: { () -> Void in
39 | toView.alpha = 1.0
40 | }) { (_) -> Void in
41 | // 转场动画完成
42 | transitionContext.completeTransition(true)
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/anise.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "anise.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/anise.imageset/anise.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/anise.imageset/anise.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/basil.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "basil.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/basil.imageset/basil.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/basil.imageset/basil.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/bg.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "bg@2x.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/bg.imageset/bg@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/bg.imageset/bg@2x.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/marjorana.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "marjorana.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/marjorana.imageset/marjorana.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/marjorana.imageset/marjorana.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/rosemary.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "rosemary.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/rosemary.imageset/rosemary.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/rosemary.imageset/rosemary.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/saffron.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "saffron.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/saffron.imageset/saffron.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Assets.xcassets/saffron.imageset/saffron.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/HerbDetailsViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HerbDetailsViewController.swift
3 | // Cook
4 | //
5 | // Created by Dariel on 16/7/24.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class HerbDetailsViewController: UIViewController {
12 |
13 | var herb: HerbModel!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 |
18 | bgImage.image = UIImage(named: herb.image)
19 | view.addSubview(bgImage)
20 | view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: Selector("actionClose:")))
21 |
22 | }
23 |
24 | override func preferredStatusBarStyle() -> UIStatusBarStyle {
25 | return .LightContent
26 | }
27 |
28 | func actionClose(tap: UITapGestureRecognizer) {
29 | presentingViewController?.dismissViewControllerAnimated(true, completion: nil)
30 | }
31 | lazy var bgImage: UIImageView = {
32 | let bg = UIImageView()
33 | bg.frame = self.view.bounds
34 | return bg
35 | }()
36 |
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/HerbModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HerbModel.swift
3 | // Cook
4 | //
5 | // Created by Dariel on 16/7/24.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | struct HerbModel {
10 | let name: String
11 | let image: String
12 |
13 | static func all() -> [HerbModel] {
14 |
15 | return [
16 | HerbModel(name: "Saffron", image: "saffron.jpg"),
17 | HerbModel(name:"Basil", image: "basil.jpg"),
18 | HerbModel(name: "Marjoram", image: "marjorana.jpg"),
19 | HerbModel(name: "Rosemary", image: "rosemary.jpg"),
20 | HerbModel(name: "Anise", image: "anise.jpg")
21 | ]
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/2.Cook/Cook/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/anise.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "anise.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/anise.imageset/anise.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/anise.imageset/anise.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/basil.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "basil.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/basil.imageset/basil.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/basil.imageset/basil.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/bg.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "bg@2x.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/bg.imageset/bg@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/bg.imageset/bg@2x.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/marjorana.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "marjorana.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/marjorana.imageset/marjorana.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/marjorana.imageset/marjorana.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/rosemary.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "rosemary.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/rosemary.imageset/rosemary.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/rosemary.imageset/rosemary.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/saffron.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "saffron.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/saffron.imageset/saffron.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Assets.xcassets/saffron.imageset/saffron.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/HerbDetailsViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HerbDetailsViewController.swift
3 | // Cook
4 | //
5 | // Created by Dariel on 16/7/24.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class HerbDetailsViewController: UIViewController {
12 |
13 | var herb: HerbModel!
14 | var containerView: UIView!
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 | containerView = view
19 | bgImage.image = UIImage(named: herb.image)
20 | view.addSubview(bgImage)
21 | view.addGestureRecognizer(UITapGestureRecognizer(target: self, action: Selector("actionClose:")))
22 |
23 | }
24 |
25 | override func preferredStatusBarStyle() -> UIStatusBarStyle {
26 | return .LightContent
27 | }
28 |
29 | func actionClose(tap: UITapGestureRecognizer) {
30 | presentingViewController?.dismissViewControllerAnimated(true, completion: nil)
31 | }
32 | lazy var bgImage: UIImageView = {
33 | let bg = UIImageView()
34 | bg.frame = self.view.bounds
35 | return bg
36 | }()
37 |
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/HerbModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // HerbModel.swift
3 | // Cook
4 | //
5 | // Created by Dariel on 16/7/24.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | struct HerbModel {
10 | let name: String
11 | let image: String
12 |
13 | static func all() -> [HerbModel] {
14 |
15 | return [
16 | HerbModel(name: "Saffron", image: "saffron.jpg"),
17 | HerbModel(name:"Basil", image: "basil.jpg"),
18 | HerbModel(name: "Marjoram", image: "marjorana.jpg"),
19 | HerbModel(name: "Rosemary", image: "rosemary.jpg"),
20 | HerbModel(name: "Anise", image: "anise.jpg")
21 | ]
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/1.cook/3.Cook/Cook/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/1.reveal/reveal.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/1.reveal/reveal/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/1.reveal/reveal/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/1.reveal/reveal/Assets.xcassets/anise.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "anise.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/1.reveal/reveal/Assets.xcassets/anise.imageset/anise.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/1.reveal/reveal/Assets.xcassets/anise.imageset/anise.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/1.reveal/reveal/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/1.reveal/reveal/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/1.reveal/reveal/DetailViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DetailViewController.swift
3 | // reveal
4 | //
5 | // Created by Dariel on 16/7/26.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class DetailViewController: UIViewController {
12 |
13 | let maskLayer: CAShapeLayer = RWLogoLayer.logoLayer()
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 | navigationItem.title = "DETAILVC"
17 | view.backgroundColor = UIColor.whiteColor()
18 |
19 | view.addSubview(bgImage)
20 | view.addSubview(descLabel)
21 | descLabel.sizeToFit()
22 | descLabel.center = view.center
23 |
24 |
25 | maskLayer.position = CGPoint(x: view.layer.bounds.size.width/2, y: view.layer.bounds.size.height/2)
26 | view.layer.mask = maskLayer
27 | }
28 |
29 | override func viewDidAppear(animated: Bool) {
30 | super.viewDidAppear(animated)
31 |
32 | view.layer.mask = nil
33 | }
34 |
35 |
36 | lazy var descLabel : UILabel = {
37 | let label = UILabel()
38 | label.text = "DetailViewController"
39 | label.textColor = UIColor.cyanColor()
40 | label.font = UIFont.systemFontOfSize(30)
41 | return label
42 | }()
43 |
44 | lazy var bgImage: UIImageView = {
45 | let bg = UIImageView()
46 | bg.image = UIImage(named: "anise")
47 | bg.frame = self.view.bounds
48 | return bg
49 | }()
50 | }
51 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/1.reveal/reveal/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/1.reveal/reveal/RWLogoLayer.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RWLogoLayer.swift
3 | // reveal
4 | //
5 | // Created by Dariel on 16/7/26.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class RWLogoLayer {
12 |
13 | class func logoLayer() -> CAShapeLayer {
14 | let layer = CAShapeLayer()
15 | layer.geometryFlipped = true
16 |
17 | let bezier = UIBezierPath()
18 | bezier.moveToPoint(CGPoint(x: 0.0, y: 0.0))
19 | bezier.addCurveToPoint(CGPoint(x: 0.0, y: 66.97), controlPoint1:CGPoint(x: 0.0, y: 0.0), controlPoint2:CGPoint(x: 0.0, y: 57.06))
20 | bezier.addCurveToPoint(CGPoint(x: 16.0, y: 39.0), controlPoint1: CGPoint(x: 27.68, y: 66.97), controlPoint2:CGPoint(x: 42.35, y: 52.75))
21 | bezier.addCurveToPoint(CGPoint(x: 26.0, y: 17.0), controlPoint1: CGPoint(x: 17.35, y: 35.41), controlPoint2:CGPoint(x: 26, y: 17))
22 | bezier.addLineToPoint(CGPoint(x: 38.0, y: 34.0))
23 | bezier.addLineToPoint(CGPoint(x: 49.0, y: 17.0))
24 | bezier.addLineToPoint(CGPoint(x: 67.0, y: 51.27))
25 | bezier.addLineToPoint(CGPoint(x: 67.0, y: 0.0))
26 | bezier.addLineToPoint(CGPoint(x: 0.0, y: 0.0))
27 | bezier.closePath()
28 |
29 | layer.path = bezier.CGPath
30 | layer.bounds = CGPathGetBoundingBox(layer.path)
31 |
32 | return layer
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/2.reveal/reveal.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/2.reveal/reveal/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/2.reveal/reveal/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/2.reveal/reveal/Assets.xcassets/anise.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "anise.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/2.reveal/reveal/Assets.xcassets/anise.imageset/anise.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/2.reveal/reveal/Assets.xcassets/anise.imageset/anise.jpg
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/2.reveal/reveal/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/2.reveal/reveal/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/2.reveal/reveal/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 6.可以很酷的转场动画/2.reveal/2.reveal/reveal/RWLogoLayer.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RWLogoLayer.swift
3 | // reveal
4 | //
5 | // Created by Dariel on 16/7/26.
6 | // Copyright © 2016年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class RWLogoLayer {
12 |
13 | class func logoLayer() -> CAShapeLayer {
14 | let layer = CAShapeLayer()
15 | layer.geometryFlipped = true
16 |
17 | //the RW bezier
18 | let bezier = UIBezierPath()
19 | bezier.moveToPoint(CGPoint(x: 0.0, y: 0.0))
20 | bezier.addCurveToPoint(CGPoint(x: 0.0, y: 66.97), controlPoint1:CGPoint(x: 0.0, y: 0.0), controlPoint2:CGPoint(x: 0.0, y: 57.06))
21 | bezier.addCurveToPoint(CGPoint(x: 16.0, y: 39.0), controlPoint1: CGPoint(x: 27.68, y: 66.97), controlPoint2:CGPoint(x: 42.35, y: 52.75))
22 | bezier.addCurveToPoint(CGPoint(x: 26.0, y: 17.0), controlPoint1: CGPoint(x: 17.35, y: 35.41), controlPoint2:CGPoint(x: 26, y: 17))
23 | bezier.addLineToPoint(CGPoint(x: 38.0, y: 34.0))
24 | bezier.addLineToPoint(CGPoint(x: 49.0, y: 17.0))
25 | bezier.addLineToPoint(CGPoint(x: 67.0, y: 51.27))
26 | bezier.addLineToPoint(CGPoint(x: 67.0, y: 0.0))
27 | bezier.addLineToPoint(CGPoint(x: 0.0, y: 0.0))
28 | bezier.closePath()
29 |
30 | //create a shape layer
31 | layer.path = bezier.CGPath
32 | layer.bounds = CGPathGetBoundingBox(layer.path)
33 |
34 | return layer
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | }
43 | ],
44 | "info" : {
45 | "version" : 1,
46 | "author" : "xcode"
47 | }
48 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/Assets.xcassets/dog.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "Snip20160615_3.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/Assets.xcassets/dog.imageset/Snip20160615_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DarielChen/DemoCode/086131e8ba99bbb7d51760516b184c60720f5ace/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/Assets.xcassets/dog.imageset/Snip20160615_3.png
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/EasyAnimation/EasyAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // EasyAnimation.h
3 | // EasyAnimation
4 | //
5 | // Created by Ian Ynda-Hummel on 8/26/15.
6 | // Copyright (c) 2015 EasyAnimation. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for EasyAnimation.
12 | FOUNDATION_EXPORT double EasyAnimationVersionNumber;
13 |
14 | //! Project version string for EasyAnimation.
15 | FOUNDATION_EXPORT const unsigned char EasyAnimationVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/EasyAnimation/Info-tvOS.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.1
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/EasyAnimation/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0.1
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/EasyAnimation/RBBSpringAnimation/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 Robert Böhnke.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7 | the Software, and to permit persons to whom the Software is furnished to do so,
8 | subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
19 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/EasyAnimation/RBBSpringAnimation/RBBBlockBasedArray.swift:
--------------------------------------------------------------------------------
1 | //
2 | // RBBSpringAnimation.h
3 | // RBBAnimation
4 | //
5 | // Created by Robert Böhnke on 10/14/13.
6 | // Copyright (c) 2013 Robert Böhnke. All rights reserved.
7 | //
8 |
9 | //
10 | // RBBBlockBasedArray.swift
11 | //
12 | // Swift intepretation of the Objective-C original by Marin Todorov
13 | // Copyright (c) 2015-2016 Underplot ltd. All rights reserved.
14 | //
15 |
16 | import Foundation
17 |
18 | typealias RBBBlockBasedArrayBlock = (Int) -> Any
19 |
20 | class RBBBlockBasedArray: NSArray {
21 |
22 | private var countBlockBased: Int = 0
23 | private var block: RBBBlockBasedArrayBlock? = nil
24 |
25 | //can't do custom init because it's declared in an NSArray extension originally
26 | //and can't override it from here in Swift 1.2; need to do initialization from an ordinary method
27 |
28 | func setCount(_ count: Int, block: @escaping RBBBlockBasedArrayBlock) {
29 | self.countBlockBased = count;
30 | self.block = block
31 | }
32 |
33 | override var count: Int {
34 | return countBlockBased
35 | }
36 |
37 | //will crash if block is not set
38 |
39 | override func object(at index: Int) -> Any {
40 | return block!(index)
41 | }
42 |
43 | func asAnys() -> [Any] {
44 | return map {$0 as Any}
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/iOS动画指南/iOS动画指南 - 7.简化动画实现的EasyAnimation库/EasyAnimationDemo/EasyAnimationDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/设计模式(Swift)/1.MVC/DPMVCDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/设计模式(Swift)/1.MVC/DPMVCDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/设计模式(Swift)/1.MVC/DPMVCDemo/Address.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Address.swift
3 | // DPMVCDemo
4 | //
5 | // Created by Dariel on 2018/4/22.
6 | // Copyright © 2018年 Dariel. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public struct Address {
12 |
13 | public var street: String
14 | public var city: String
15 | public var state: String
16 | public var zipCode: String
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/设计模式(Swift)/1.MVC/DPMVCDemo/AddressView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AddressView.swift
3 | // DPMVCDemo
4 | //
5 | // Created by Dariel on 2018/4/22.
6 | // Copyright © 2018年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public final class AddressView: UIView {
12 |
13 | @IBOutlet weak var streetTextField: UITextField!
14 | @IBOutlet weak var cityTextField: UITextField!
15 | @IBOutlet weak var stateTextField: UITextField!
16 | @IBOutlet weak var zipCodeTextField: UITextField!
17 |
18 | @IBOutlet weak var addressLabel: UILabel!
19 | }
20 |
21 |
22 |
--------------------------------------------------------------------------------
/设计模式(Swift)/1.MVC/DPMVCDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/设计模式(Swift)/1.MVC/DPMVCDemo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/设计模式(Swift)/1.MVC/DPMVCDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/设计模式(Swift)/1.MVC/DPMVCDemo/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // DPMVCDemo
4 | //
5 | // Created by Dariel on 2018/4/22.
6 | // Copyright © 2018年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class AddressViewController: UIViewController {
12 |
13 | // MARK: - Properties
14 | public var address: Address? {
15 | didSet {
16 | updateViewFromAddress()
17 | }
18 | }
19 |
20 | public var addressView: AddressView! { // 关联view
21 | guard isViewLoaded else {
22 | return nil
23 | }
24 | return view as! AddressView
25 | }
26 |
27 | // MARK: - View Lifecycle
28 | public override func viewDidLoad() {
29 | super.viewDidLoad()
30 |
31 | }
32 |
33 | private func updateViewFromAddress() {
34 |
35 | if let address = address {
36 | addressView.addressLabel.text = "street: "+address.street+"\ncity: "+address.city+"\nstate: "+address.state+"\nzipCode: "+address.zipCode
37 | }else {
38 | addressView.addressLabel.text = "地址为空"
39 | }
40 | }
41 |
42 | // MARK: - Actions
43 | @IBAction public func updateAddressFromView(_ sender: AnyObject) {
44 |
45 | guard let street = addressView.streetTextField.text, street.count > 0,
46 | let city = addressView.cityTextField.text, city.count > 0,
47 | let state = addressView.stateTextField.text, state.count > 0,
48 | let zipCode = addressView.zipCodeTextField.text, zipCode.count > 0
49 | else {
50 | return
51 | }
52 | address = Address(street: street, city: city,
53 | state: state, zipCode: zipCode)
54 | }
55 |
56 | @IBAction func clearAddressFromView(_ sender: Any) {
57 |
58 | address = nil
59 | }
60 | }
61 |
62 |
--------------------------------------------------------------------------------
/设计模式(Swift)/2.Delegation/Delegation.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/设计模式(Swift)/2.Delegation/Delegation.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/设计模式(Swift)/2.Delegation/Delegation/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/设计模式(Swift)/2.Delegation/Delegation/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/设计模式(Swift)/2.Delegation/Delegation/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/设计模式(Swift)/2.Delegation/Delegation/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Delegation
4 | //
5 | // Created by Dariel on 2018/4/25.
6 | // Copyright © 2018年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | @IBOutlet weak var chooseLabel: UILabel!
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 |
18 | }
19 |
20 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
21 | guard let viewController = segue.destination as? MenuViewController else { return }
22 |
23 | viewController.delegate = self;
24 | }
25 | }
26 |
27 | extension ViewController: MenuViewControllerDelegate {
28 |
29 | func menuViewController(_ menuViewController: MenuViewController, didSelectItemAtIndex index: Int, chooseItem item: String) {
30 |
31 | chooseLabel.text = item
32 | }
33 |
34 | func didSelectItemAtIndex(_ index: Int) {
35 |
36 | print(index)
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/设计模式(Swift)/3.Singleton/Singleton.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/设计模式(Swift)/3.Singleton/Singleton.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/设计模式(Swift)/3.Singleton/Singleton/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/设计模式(Swift)/3.Singleton/Singleton/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/设计模式(Swift)/3.Singleton/Singleton/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/设计模式(Swift)/3.Singleton/Singleton/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/设计模式(Swift)/3.Singleton/Singleton/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Singleton
4 | //
5 | // Created by Dariel on 2018/4/30.
6 | // Copyright © 2018年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | let s1 = MySingleton.shared
17 | let s2 = MySingleton.shared
18 | // let s3 = MySingleton() // 报错
19 |
20 |
21 | dc.address(o: s1)
22 | dc.address(o: s2)
23 |
24 | }
25 |
26 | }
27 |
28 |
29 | final public class MySingleton {
30 | static let shared = MySingleton()
31 | private init() {}
32 | }
33 |
34 |
35 | public struct dc {
36 |
37 | public static func log(_ message: T, file: NSString = #file, method: String = #function, line: Int = #line) {
38 | #if DEBUG
39 | print("\(file.pathComponents.last!):\(method)[\(line)]: \(message)")
40 | #endif
41 | }
42 |
43 | public static func address(o: T, file: NSString = #file, method: String = #function, line: Int = #line) {
44 | log(String.init(format: "%018p", unsafeBitCast(o, to: Int.self)), file: file, method: method, line:line)
45 | }
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/设计模式(Swift)/4.Memento/Memento.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/设计模式(Swift)/4.Memento/Memento.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/设计模式(Swift)/4.Memento/Memento/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/设计模式(Swift)/4.Memento/Memento/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/设计模式(Swift)/4.Memento/Memento/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/设计模式(Swift)/4.Memento/Memento/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/设计模式(Swift)/5.Strategy/Strategy.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/设计模式(Swift)/5.Strategy/Strategy.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/设计模式(Swift)/5.Strategy/Strategy/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/设计模式(Swift)/5.Strategy/Strategy/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/设计模式(Swift)/5.Strategy/Strategy/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/设计模式(Swift)/5.Strategy/Strategy/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/设计模式(Swift)/6.Observer/Observer.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/设计模式(Swift)/6.Observer/Observer.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/设计模式(Swift)/6.Observer/Observer/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/设计模式(Swift)/6.Observer/Observer/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/设计模式(Swift)/6.Observer/Observer/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/设计模式(Swift)/6.Observer/Observer/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/设计模式(Swift)/6.Observer/Observer/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // Observer
4 | //
5 | // Created by Dariel on 2018/5/7.
6 | // Copyright © 2018年 Dariel. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ViewController: UIViewController {
12 |
13 | var kvoObserver: NSKeyValueObservation?
14 | var observer: Observer?
15 |
16 |
17 | let user = User(name: "Made")
18 | let kvoUser = KVOUser(name: "Dariel")
19 |
20 |
21 | override func viewDidLoad() {
22 | super.viewDidLoad()
23 |
24 | kvoObserver = kvoUser.observe(\.name, options: [.initial, .new]) {
25 | (user, change) in
26 | print("User's name is \(user.name)")
27 | }
28 |
29 | // swift4中KVO不需要移除了,观察者是弱引用
30 |
31 | observer = Observer()
32 | user.name.addObserver(observer!, options: [.new]) {
33 | name, change in
34 | print("name:\(name), change:\(change)")
35 | }
36 |
37 | }
38 |
39 | override func touchesBegan(_ touches: Set, with event: UIEvent?) {
40 |
41 | // kvoUser.name = "John"
42 | user.name.value = "Amel"
43 |
44 | }
45 |
46 | }
47 |
48 | @objcMembers public class KVOUser: NSObject {
49 | // @objcMembers 给每个属性添加 @objc 关键词
50 |
51 | dynamic var name: String
52 |
53 | public init(name: String) {
54 | self.name = name
55 | }
56 | }
57 |
58 |
59 | public class User {
60 | public let name: Observable
61 | public init(name: String) {
62 | self.name = Observable(name)
63 | }
64 | }
65 | public class Observer {}
66 |
67 |
--------------------------------------------------------------------------------
/设计模式(Swift)/7.Builder/Builder.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/设计模式(Swift)/7.Builder/Builder.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/设计模式(Swift)/7.Builder/Builder/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/设计模式(Swift)/7.Builder/Builder/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/设计模式(Swift)/7.Builder/Builder/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/设计模式(Swift)/7.Builder/Builder/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------