├── .gitignore ├── FleaMarketGuide ├── FleaMarketGuide.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── FleaMarketGuide │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── AppIcon29x29.png │ │ │ ├── AppIcon29x29@2x.png │ │ │ ├── AppIcon29x29@3x.png │ │ │ ├── AppIcon40x40@2x.png │ │ │ ├── AppIcon40x40@3x.png │ │ │ ├── AppIcon57x57.png │ │ │ ├── AppIcon57x57@2x.png │ │ │ ├── AppIcon60x60@2x.png │ │ │ ├── AppIcon60x60@3x.png │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ └── LaunchImage@3x.png │ │ ├── guide0.imageset │ │ │ ├── Contents.json │ │ │ ├── guide0.png │ │ │ ├── guide0@2x.png │ │ │ └── guide0@3x.png │ │ ├── guide1.imageset │ │ │ ├── Contents.json │ │ │ ├── guide1.png │ │ │ ├── guide1@2x.png │ │ │ └── guide1@3x.png │ │ ├── guide2.imageset │ │ │ ├── Contents.json │ │ │ ├── guide2.png │ │ │ ├── guide2@2x.png │ │ │ └── guide2@3x.png │ │ └── guide3.imageset │ │ │ ├── Contents.json │ │ │ ├── guide3.png │ │ │ ├── guide3@2x.png │ │ │ └── guide3@3x.png │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── Classes │ │ ├── NewFeature │ │ │ ├── Controller │ │ │ │ ├── NewFeatureViewController.h │ │ │ │ └── NewFeatureViewController.m │ │ │ ├── FlowLayout │ │ │ │ ├── ALinFlowLayout.h │ │ │ │ └── ALinFlowLayout.m │ │ │ └── View │ │ │ │ ├── NewFeatureCell.h │ │ │ │ └── NewFeatureCell.m │ │ ├── ViewController.h │ │ └── ViewController.m │ ├── Info.plist │ ├── Resource │ │ ├── guide0.mp4 │ │ ├── guide1.mp4 │ │ ├── guide2.mp4 │ │ └── guide3.mp4 │ └── main.m ├── FleaMarketGuideTests │ ├── FleaMarketGuideTests.m │ └── Info.plist └── FleaMarketGuideUITests │ ├── FleaMarketGuideUITests.m │ └── Info.plist ├── FleaMarketGuideSwift ├── FleaMarketGuideSwift.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── FleaMarketGuideSwift │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── AppIcon29x29.png │ │ │ ├── AppIcon29x29@2x.png │ │ │ ├── AppIcon29x29@3x.png │ │ │ ├── AppIcon40x40@2x.png │ │ │ ├── AppIcon40x40@3x.png │ │ │ ├── AppIcon57x57.png │ │ │ ├── AppIcon57x57@2x.png │ │ │ ├── AppIcon60x60@2x.png │ │ │ ├── AppIcon60x60@3x.png │ │ │ └── Contents.json │ │ ├── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ └── LaunchImage@3x.png │ │ ├── guide0.imageset │ │ │ ├── Contents.json │ │ │ ├── guide0.png │ │ │ ├── guide0@2x.png │ │ │ └── guide0@3x.png │ │ ├── guide1.imageset │ │ │ ├── Contents.json │ │ │ ├── guide1.png │ │ │ ├── guide1@2x.png │ │ │ └── guide1@3x.png │ │ ├── guide2.imageset │ │ │ ├── Contents.json │ │ │ ├── guide2.png │ │ │ ├── guide2@2x.png │ │ │ └── guide2@3x.png │ │ └── guide3.imageset │ │ │ ├── Contents.json │ │ │ ├── guide3.png │ │ │ ├── guide3@2x.png │ │ │ └── guide3@3x.png │ ├── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── Classes │ │ ├── NewFeature │ │ │ ├── Controller │ │ │ │ └── NewFeatureViewController.swift │ │ │ ├── FlowLayout │ │ │ │ └── ALinFlowLayout.swift │ │ │ └── View │ │ │ │ └── NewFeatureCell.swift │ │ ├── Resource │ │ │ ├── guide0.mp4 │ │ │ ├── guide1.mp4 │ │ │ ├── guide2.mp4 │ │ │ └── guide3.mp4 │ │ └── ViewController.swift │ └── Info.plist ├── FleaMarketGuideSwiftTests │ ├── FleaMarketGuideSwiftTests.swift │ └── Info.plist └── FleaMarketGuideSwiftUITests │ ├── FleaMarketGuideSwiftUITests.swift │ └── Info.plist ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | # Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BB421F6A1D0D0C13005919CB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = BB421F691D0D0C13005919CB /* main.m */; }; 11 | BB421F6D1D0D0C13005919CB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = BB421F6C1D0D0C13005919CB /* AppDelegate.m */; }; 12 | BB421F751D0D0C13005919CB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BB421F741D0D0C13005919CB /* Assets.xcassets */; }; 13 | BB421F781D0D0C13005919CB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB421F761D0D0C13005919CB /* LaunchScreen.storyboard */; }; 14 | BB421F831D0D0C13005919CB /* FleaMarketGuideTests.m in Sources */ = {isa = PBXBuildFile; fileRef = BB421F821D0D0C13005919CB /* FleaMarketGuideTests.m */; }; 15 | BB421F8E1D0D0C13005919CB /* FleaMarketGuideUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = BB421F8D1D0D0C13005919CB /* FleaMarketGuideUITests.m */; }; 16 | BB421F9E1D0D0E86005919CB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BB421F9D1D0D0E86005919CB /* ViewController.m */; }; 17 | BB421FA41D0D0ED7005919CB /* guide0.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = BB421FA01D0D0ED7005919CB /* guide0.mp4 */; }; 18 | BB421FA51D0D0ED7005919CB /* guide1.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = BB421FA11D0D0ED7005919CB /* guide1.mp4 */; }; 19 | BB421FA61D0D0ED7005919CB /* guide2.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = BB421FA21D0D0ED7005919CB /* guide2.mp4 */; }; 20 | BB421FA71D0D0ED7005919CB /* guide3.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = BB421FA31D0D0ED7005919CB /* guide3.mp4 */; }; 21 | BB421FB01D0D19A4005919CB /* NewFeatureViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = BB421FAE1D0D19A4005919CB /* NewFeatureViewController.m */; }; 22 | BB421FB31D0D19CA005919CB /* NewFeatureCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BB421FB21D0D19CA005919CB /* NewFeatureCell.m */; }; 23 | BB421FB71D0D1CAF005919CB /* ALinFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = BB421FB61D0D1CAF005919CB /* ALinFlowLayout.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | BB421F7F1D0D0C13005919CB /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = BB421F5D1D0D0C13005919CB /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = BB421F641D0D0C13005919CB; 32 | remoteInfo = FleaMarketGuide; 33 | }; 34 | BB421F8A1D0D0C13005919CB /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = BB421F5D1D0D0C13005919CB /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = BB421F641D0D0C13005919CB; 39 | remoteInfo = FleaMarketGuide; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXFileReference section */ 44 | BB421F651D0D0C13005919CB /* FleaMarketGuide.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FleaMarketGuide.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | BB421F691D0D0C13005919CB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 46 | BB421F6B1D0D0C13005919CB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 47 | BB421F6C1D0D0C13005919CB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 48 | BB421F741D0D0C13005919CB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | BB421F771D0D0C13005919CB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 50 | BB421F791D0D0C13005919CB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | BB421F7E1D0D0C13005919CB /* FleaMarketGuideTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FleaMarketGuideTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | BB421F821D0D0C13005919CB /* FleaMarketGuideTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FleaMarketGuideTests.m; sourceTree = ""; }; 53 | BB421F841D0D0C13005919CB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | BB421F891D0D0C13005919CB /* FleaMarketGuideUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FleaMarketGuideUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | BB421F8D1D0D0C13005919CB /* FleaMarketGuideUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FleaMarketGuideUITests.m; sourceTree = ""; }; 56 | BB421F8F1D0D0C14005919CB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | BB421F9C1D0D0E86005919CB /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 58 | BB421F9D1D0D0E86005919CB /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 59 | BB421FA01D0D0ED7005919CB /* guide0.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = guide0.mp4; sourceTree = ""; }; 60 | BB421FA11D0D0ED7005919CB /* guide1.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = guide1.mp4; sourceTree = ""; }; 61 | BB421FA21D0D0ED7005919CB /* guide2.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = guide2.mp4; sourceTree = ""; }; 62 | BB421FA31D0D0ED7005919CB /* guide3.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = guide3.mp4; sourceTree = ""; }; 63 | BB421FAD1D0D19A4005919CB /* NewFeatureViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewFeatureViewController.h; sourceTree = ""; }; 64 | BB421FAE1D0D19A4005919CB /* NewFeatureViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewFeatureViewController.m; sourceTree = ""; }; 65 | BB421FB11D0D19CA005919CB /* NewFeatureCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NewFeatureCell.h; sourceTree = ""; }; 66 | BB421FB21D0D19CA005919CB /* NewFeatureCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NewFeatureCell.m; sourceTree = ""; }; 67 | BB421FB51D0D1CAF005919CB /* ALinFlowLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALinFlowLayout.h; sourceTree = ""; }; 68 | BB421FB61D0D1CAF005919CB /* ALinFlowLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALinFlowLayout.m; sourceTree = ""; }; 69 | /* End PBXFileReference section */ 70 | 71 | /* Begin PBXFrameworksBuildPhase section */ 72 | BB421F621D0D0C13005919CB /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | BB421F7B1D0D0C13005919CB /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | BB421F861D0D0C13005919CB /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | /* End PBXFrameworksBuildPhase section */ 94 | 95 | /* Begin PBXGroup section */ 96 | BB421F5C1D0D0C13005919CB = { 97 | isa = PBXGroup; 98 | children = ( 99 | BB421F671D0D0C13005919CB /* FleaMarketGuide */, 100 | BB421F811D0D0C13005919CB /* FleaMarketGuideTests */, 101 | BB421F8C1D0D0C13005919CB /* FleaMarketGuideUITests */, 102 | BB421F661D0D0C13005919CB /* Products */, 103 | ); 104 | sourceTree = ""; 105 | }; 106 | BB421F661D0D0C13005919CB /* Products */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | BB421F651D0D0C13005919CB /* FleaMarketGuide.app */, 110 | BB421F7E1D0D0C13005919CB /* FleaMarketGuideTests.xctest */, 111 | BB421F891D0D0C13005919CB /* FleaMarketGuideUITests.xctest */, 112 | ); 113 | name = Products; 114 | sourceTree = ""; 115 | }; 116 | BB421F671D0D0C13005919CB /* FleaMarketGuide */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | BB421F6B1D0D0C13005919CB /* AppDelegate.h */, 120 | BB421F6C1D0D0C13005919CB /* AppDelegate.m */, 121 | BB421F9F1D0D0EBF005919CB /* Resource */, 122 | BB421F9B1D0D0E86005919CB /* Classes */, 123 | BB421F681D0D0C13005919CB /* Supporting Files */, 124 | ); 125 | path = FleaMarketGuide; 126 | sourceTree = ""; 127 | }; 128 | BB421F681D0D0C13005919CB /* Supporting Files */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | BB421F741D0D0C13005919CB /* Assets.xcassets */, 132 | BB421F761D0D0C13005919CB /* LaunchScreen.storyboard */, 133 | BB421F791D0D0C13005919CB /* Info.plist */, 134 | BB421F691D0D0C13005919CB /* main.m */, 135 | ); 136 | name = "Supporting Files"; 137 | sourceTree = ""; 138 | }; 139 | BB421F811D0D0C13005919CB /* FleaMarketGuideTests */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | BB421F821D0D0C13005919CB /* FleaMarketGuideTests.m */, 143 | BB421F841D0D0C13005919CB /* Info.plist */, 144 | ); 145 | path = FleaMarketGuideTests; 146 | sourceTree = ""; 147 | }; 148 | BB421F8C1D0D0C13005919CB /* FleaMarketGuideUITests */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | BB421F8D1D0D0C13005919CB /* FleaMarketGuideUITests.m */, 152 | BB421F8F1D0D0C14005919CB /* Info.plist */, 153 | ); 154 | path = FleaMarketGuideUITests; 155 | sourceTree = ""; 156 | }; 157 | BB421F9B1D0D0E86005919CB /* Classes */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | BB421FA81D0D190D005919CB /* NewFeature */, 161 | BB421F9C1D0D0E86005919CB /* ViewController.h */, 162 | BB421F9D1D0D0E86005919CB /* ViewController.m */, 163 | ); 164 | path = Classes; 165 | sourceTree = ""; 166 | }; 167 | BB421F9F1D0D0EBF005919CB /* Resource */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | BB421FA01D0D0ED7005919CB /* guide0.mp4 */, 171 | BB421FA11D0D0ED7005919CB /* guide1.mp4 */, 172 | BB421FA21D0D0ED7005919CB /* guide2.mp4 */, 173 | BB421FA31D0D0ED7005919CB /* guide3.mp4 */, 174 | ); 175 | path = Resource; 176 | sourceTree = ""; 177 | }; 178 | BB421FA81D0D190D005919CB /* NewFeature */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | BB421FB41D0D1C99005919CB /* FlowLayout */, 182 | BB421FAC1D0D19A4005919CB /* Controller */, 183 | BB421FAF1D0D19A4005919CB /* View */, 184 | ); 185 | path = NewFeature; 186 | sourceTree = ""; 187 | }; 188 | BB421FAC1D0D19A4005919CB /* Controller */ = { 189 | isa = PBXGroup; 190 | children = ( 191 | BB421FAD1D0D19A4005919CB /* NewFeatureViewController.h */, 192 | BB421FAE1D0D19A4005919CB /* NewFeatureViewController.m */, 193 | ); 194 | path = Controller; 195 | sourceTree = ""; 196 | }; 197 | BB421FAF1D0D19A4005919CB /* View */ = { 198 | isa = PBXGroup; 199 | children = ( 200 | BB421FB11D0D19CA005919CB /* NewFeatureCell.h */, 201 | BB421FB21D0D19CA005919CB /* NewFeatureCell.m */, 202 | ); 203 | path = View; 204 | sourceTree = ""; 205 | }; 206 | BB421FB41D0D1C99005919CB /* FlowLayout */ = { 207 | isa = PBXGroup; 208 | children = ( 209 | BB421FB51D0D1CAF005919CB /* ALinFlowLayout.h */, 210 | BB421FB61D0D1CAF005919CB /* ALinFlowLayout.m */, 211 | ); 212 | path = FlowLayout; 213 | sourceTree = ""; 214 | }; 215 | /* End PBXGroup section */ 216 | 217 | /* Begin PBXNativeTarget section */ 218 | BB421F641D0D0C13005919CB /* FleaMarketGuide */ = { 219 | isa = PBXNativeTarget; 220 | buildConfigurationList = BB421F921D0D0C14005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuide" */; 221 | buildPhases = ( 222 | BB421F611D0D0C13005919CB /* Sources */, 223 | BB421F621D0D0C13005919CB /* Frameworks */, 224 | BB421F631D0D0C13005919CB /* Resources */, 225 | ); 226 | buildRules = ( 227 | ); 228 | dependencies = ( 229 | ); 230 | name = FleaMarketGuide; 231 | productName = FleaMarketGuide; 232 | productReference = BB421F651D0D0C13005919CB /* FleaMarketGuide.app */; 233 | productType = "com.apple.product-type.application"; 234 | }; 235 | BB421F7D1D0D0C13005919CB /* FleaMarketGuideTests */ = { 236 | isa = PBXNativeTarget; 237 | buildConfigurationList = BB421F951D0D0C14005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuideTests" */; 238 | buildPhases = ( 239 | BB421F7A1D0D0C13005919CB /* Sources */, 240 | BB421F7B1D0D0C13005919CB /* Frameworks */, 241 | BB421F7C1D0D0C13005919CB /* Resources */, 242 | ); 243 | buildRules = ( 244 | ); 245 | dependencies = ( 246 | BB421F801D0D0C13005919CB /* PBXTargetDependency */, 247 | ); 248 | name = FleaMarketGuideTests; 249 | productName = FleaMarketGuideTests; 250 | productReference = BB421F7E1D0D0C13005919CB /* FleaMarketGuideTests.xctest */; 251 | productType = "com.apple.product-type.bundle.unit-test"; 252 | }; 253 | BB421F881D0D0C13005919CB /* FleaMarketGuideUITests */ = { 254 | isa = PBXNativeTarget; 255 | buildConfigurationList = BB421F981D0D0C14005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuideUITests" */; 256 | buildPhases = ( 257 | BB421F851D0D0C13005919CB /* Sources */, 258 | BB421F861D0D0C13005919CB /* Frameworks */, 259 | BB421F871D0D0C13005919CB /* Resources */, 260 | ); 261 | buildRules = ( 262 | ); 263 | dependencies = ( 264 | BB421F8B1D0D0C13005919CB /* PBXTargetDependency */, 265 | ); 266 | name = FleaMarketGuideUITests; 267 | productName = FleaMarketGuideUITests; 268 | productReference = BB421F891D0D0C13005919CB /* FleaMarketGuideUITests.xctest */; 269 | productType = "com.apple.product-type.bundle.ui-testing"; 270 | }; 271 | /* End PBXNativeTarget section */ 272 | 273 | /* Begin PBXProject section */ 274 | BB421F5D1D0D0C13005919CB /* Project object */ = { 275 | isa = PBXProject; 276 | attributes = { 277 | LastUpgradeCheck = 0730; 278 | ORGANIZATIONNAME = SL; 279 | TargetAttributes = { 280 | BB421F641D0D0C13005919CB = { 281 | CreatedOnToolsVersion = 7.3.1; 282 | DevelopmentTeam = AL4GV8C88Y; 283 | }; 284 | BB421F7D1D0D0C13005919CB = { 285 | CreatedOnToolsVersion = 7.3.1; 286 | TestTargetID = BB421F641D0D0C13005919CB; 287 | }; 288 | BB421F881D0D0C13005919CB = { 289 | CreatedOnToolsVersion = 7.3.1; 290 | TestTargetID = BB421F641D0D0C13005919CB; 291 | }; 292 | }; 293 | }; 294 | buildConfigurationList = BB421F601D0D0C13005919CB /* Build configuration list for PBXProject "FleaMarketGuide" */; 295 | compatibilityVersion = "Xcode 3.2"; 296 | developmentRegion = English; 297 | hasScannedForEncodings = 0; 298 | knownRegions = ( 299 | en, 300 | Base, 301 | ); 302 | mainGroup = BB421F5C1D0D0C13005919CB; 303 | productRefGroup = BB421F661D0D0C13005919CB /* Products */; 304 | projectDirPath = ""; 305 | projectRoot = ""; 306 | targets = ( 307 | BB421F641D0D0C13005919CB /* FleaMarketGuide */, 308 | BB421F7D1D0D0C13005919CB /* FleaMarketGuideTests */, 309 | BB421F881D0D0C13005919CB /* FleaMarketGuideUITests */, 310 | ); 311 | }; 312 | /* End PBXProject section */ 313 | 314 | /* Begin PBXResourcesBuildPhase section */ 315 | BB421F631D0D0C13005919CB /* Resources */ = { 316 | isa = PBXResourcesBuildPhase; 317 | buildActionMask = 2147483647; 318 | files = ( 319 | BB421FA71D0D0ED7005919CB /* guide3.mp4 in Resources */, 320 | BB421FA51D0D0ED7005919CB /* guide1.mp4 in Resources */, 321 | BB421F781D0D0C13005919CB /* LaunchScreen.storyboard in Resources */, 322 | BB421F751D0D0C13005919CB /* Assets.xcassets in Resources */, 323 | BB421FA61D0D0ED7005919CB /* guide2.mp4 in Resources */, 324 | BB421FA41D0D0ED7005919CB /* guide0.mp4 in Resources */, 325 | ); 326 | runOnlyForDeploymentPostprocessing = 0; 327 | }; 328 | BB421F7C1D0D0C13005919CB /* Resources */ = { 329 | isa = PBXResourcesBuildPhase; 330 | buildActionMask = 2147483647; 331 | files = ( 332 | ); 333 | runOnlyForDeploymentPostprocessing = 0; 334 | }; 335 | BB421F871D0D0C13005919CB /* Resources */ = { 336 | isa = PBXResourcesBuildPhase; 337 | buildActionMask = 2147483647; 338 | files = ( 339 | ); 340 | runOnlyForDeploymentPostprocessing = 0; 341 | }; 342 | /* End PBXResourcesBuildPhase section */ 343 | 344 | /* Begin PBXSourcesBuildPhase section */ 345 | BB421F611D0D0C13005919CB /* Sources */ = { 346 | isa = PBXSourcesBuildPhase; 347 | buildActionMask = 2147483647; 348 | files = ( 349 | BB421FB01D0D19A4005919CB /* NewFeatureViewController.m in Sources */, 350 | BB421F9E1D0D0E86005919CB /* ViewController.m in Sources */, 351 | BB421FB71D0D1CAF005919CB /* ALinFlowLayout.m in Sources */, 352 | BB421FB31D0D19CA005919CB /* NewFeatureCell.m in Sources */, 353 | BB421F6D1D0D0C13005919CB /* AppDelegate.m in Sources */, 354 | BB421F6A1D0D0C13005919CB /* main.m in Sources */, 355 | ); 356 | runOnlyForDeploymentPostprocessing = 0; 357 | }; 358 | BB421F7A1D0D0C13005919CB /* Sources */ = { 359 | isa = PBXSourcesBuildPhase; 360 | buildActionMask = 2147483647; 361 | files = ( 362 | BB421F831D0D0C13005919CB /* FleaMarketGuideTests.m in Sources */, 363 | ); 364 | runOnlyForDeploymentPostprocessing = 0; 365 | }; 366 | BB421F851D0D0C13005919CB /* Sources */ = { 367 | isa = PBXSourcesBuildPhase; 368 | buildActionMask = 2147483647; 369 | files = ( 370 | BB421F8E1D0D0C13005919CB /* FleaMarketGuideUITests.m in Sources */, 371 | ); 372 | runOnlyForDeploymentPostprocessing = 0; 373 | }; 374 | /* End PBXSourcesBuildPhase section */ 375 | 376 | /* Begin PBXTargetDependency section */ 377 | BB421F801D0D0C13005919CB /* PBXTargetDependency */ = { 378 | isa = PBXTargetDependency; 379 | target = BB421F641D0D0C13005919CB /* FleaMarketGuide */; 380 | targetProxy = BB421F7F1D0D0C13005919CB /* PBXContainerItemProxy */; 381 | }; 382 | BB421F8B1D0D0C13005919CB /* PBXTargetDependency */ = { 383 | isa = PBXTargetDependency; 384 | target = BB421F641D0D0C13005919CB /* FleaMarketGuide */; 385 | targetProxy = BB421F8A1D0D0C13005919CB /* PBXContainerItemProxy */; 386 | }; 387 | /* End PBXTargetDependency section */ 388 | 389 | /* Begin PBXVariantGroup section */ 390 | BB421F761D0D0C13005919CB /* LaunchScreen.storyboard */ = { 391 | isa = PBXVariantGroup; 392 | children = ( 393 | BB421F771D0D0C13005919CB /* Base */, 394 | ); 395 | name = LaunchScreen.storyboard; 396 | sourceTree = ""; 397 | }; 398 | /* End PBXVariantGroup section */ 399 | 400 | /* Begin XCBuildConfiguration section */ 401 | BB421F901D0D0C14005919CB /* Debug */ = { 402 | isa = XCBuildConfiguration; 403 | buildSettings = { 404 | ALWAYS_SEARCH_USER_PATHS = NO; 405 | CLANG_ANALYZER_NONNULL = YES; 406 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 407 | CLANG_CXX_LIBRARY = "libc++"; 408 | CLANG_ENABLE_MODULES = YES; 409 | CLANG_ENABLE_OBJC_ARC = YES; 410 | CLANG_WARN_BOOL_CONVERSION = YES; 411 | CLANG_WARN_CONSTANT_CONVERSION = YES; 412 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 413 | CLANG_WARN_EMPTY_BODY = YES; 414 | CLANG_WARN_ENUM_CONVERSION = YES; 415 | CLANG_WARN_INT_CONVERSION = YES; 416 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 417 | CLANG_WARN_UNREACHABLE_CODE = YES; 418 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 419 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 420 | COPY_PHASE_STRIP = NO; 421 | DEBUG_INFORMATION_FORMAT = dwarf; 422 | ENABLE_STRICT_OBJC_MSGSEND = YES; 423 | ENABLE_TESTABILITY = YES; 424 | GCC_C_LANGUAGE_STANDARD = gnu99; 425 | GCC_DYNAMIC_NO_PIC = NO; 426 | GCC_NO_COMMON_BLOCKS = YES; 427 | GCC_OPTIMIZATION_LEVEL = 0; 428 | GCC_PREPROCESSOR_DEFINITIONS = ( 429 | "DEBUG=1", 430 | "$(inherited)", 431 | ); 432 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 433 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 434 | GCC_WARN_UNDECLARED_SELECTOR = YES; 435 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 436 | GCC_WARN_UNUSED_FUNCTION = YES; 437 | GCC_WARN_UNUSED_VARIABLE = YES; 438 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 439 | MTL_ENABLE_DEBUG_INFO = YES; 440 | ONLY_ACTIVE_ARCH = YES; 441 | SDKROOT = iphoneos; 442 | }; 443 | name = Debug; 444 | }; 445 | BB421F911D0D0C14005919CB /* Release */ = { 446 | isa = XCBuildConfiguration; 447 | buildSettings = { 448 | ALWAYS_SEARCH_USER_PATHS = NO; 449 | CLANG_ANALYZER_NONNULL = YES; 450 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 451 | CLANG_CXX_LIBRARY = "libc++"; 452 | CLANG_ENABLE_MODULES = YES; 453 | CLANG_ENABLE_OBJC_ARC = YES; 454 | CLANG_WARN_BOOL_CONVERSION = YES; 455 | CLANG_WARN_CONSTANT_CONVERSION = YES; 456 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 457 | CLANG_WARN_EMPTY_BODY = YES; 458 | CLANG_WARN_ENUM_CONVERSION = YES; 459 | CLANG_WARN_INT_CONVERSION = YES; 460 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 461 | CLANG_WARN_UNREACHABLE_CODE = YES; 462 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 463 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 464 | COPY_PHASE_STRIP = NO; 465 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 466 | ENABLE_NS_ASSERTIONS = NO; 467 | ENABLE_STRICT_OBJC_MSGSEND = YES; 468 | GCC_C_LANGUAGE_STANDARD = gnu99; 469 | GCC_NO_COMMON_BLOCKS = YES; 470 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 471 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 472 | GCC_WARN_UNDECLARED_SELECTOR = YES; 473 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 474 | GCC_WARN_UNUSED_FUNCTION = YES; 475 | GCC_WARN_UNUSED_VARIABLE = YES; 476 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 477 | MTL_ENABLE_DEBUG_INFO = NO; 478 | SDKROOT = iphoneos; 479 | VALIDATE_PRODUCT = YES; 480 | }; 481 | name = Release; 482 | }; 483 | BB421F931D0D0C14005919CB /* Debug */ = { 484 | isa = XCBuildConfiguration; 485 | buildSettings = { 486 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 487 | CODE_SIGN_IDENTITY = "iPhone Developer"; 488 | INFOPLIST_FILE = FleaMarketGuide/Info.plist; 489 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 490 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 491 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuide; 492 | PRODUCT_NAME = "$(TARGET_NAME)"; 493 | }; 494 | name = Debug; 495 | }; 496 | BB421F941D0D0C14005919CB /* Release */ = { 497 | isa = XCBuildConfiguration; 498 | buildSettings = { 499 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 500 | CODE_SIGN_IDENTITY = "iPhone Developer"; 501 | INFOPLIST_FILE = FleaMarketGuide/Info.plist; 502 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 503 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 504 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuide; 505 | PRODUCT_NAME = "$(TARGET_NAME)"; 506 | }; 507 | name = Release; 508 | }; 509 | BB421F961D0D0C14005919CB /* Debug */ = { 510 | isa = XCBuildConfiguration; 511 | buildSettings = { 512 | BUNDLE_LOADER = "$(TEST_HOST)"; 513 | INFOPLIST_FILE = FleaMarketGuideTests/Info.plist; 514 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 515 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuideTests; 516 | PRODUCT_NAME = "$(TARGET_NAME)"; 517 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FleaMarketGuide.app/FleaMarketGuide"; 518 | }; 519 | name = Debug; 520 | }; 521 | BB421F971D0D0C14005919CB /* Release */ = { 522 | isa = XCBuildConfiguration; 523 | buildSettings = { 524 | BUNDLE_LOADER = "$(TEST_HOST)"; 525 | INFOPLIST_FILE = FleaMarketGuideTests/Info.plist; 526 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 527 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuideTests; 528 | PRODUCT_NAME = "$(TARGET_NAME)"; 529 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FleaMarketGuide.app/FleaMarketGuide"; 530 | }; 531 | name = Release; 532 | }; 533 | BB421F991D0D0C14005919CB /* Debug */ = { 534 | isa = XCBuildConfiguration; 535 | buildSettings = { 536 | INFOPLIST_FILE = FleaMarketGuideUITests/Info.plist; 537 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 538 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuideUITests; 539 | PRODUCT_NAME = "$(TARGET_NAME)"; 540 | TEST_TARGET_NAME = FleaMarketGuide; 541 | }; 542 | name = Debug; 543 | }; 544 | BB421F9A1D0D0C14005919CB /* Release */ = { 545 | isa = XCBuildConfiguration; 546 | buildSettings = { 547 | INFOPLIST_FILE = FleaMarketGuideUITests/Info.plist; 548 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 549 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuideUITests; 550 | PRODUCT_NAME = "$(TARGET_NAME)"; 551 | TEST_TARGET_NAME = FleaMarketGuide; 552 | }; 553 | name = Release; 554 | }; 555 | /* End XCBuildConfiguration section */ 556 | 557 | /* Begin XCConfigurationList section */ 558 | BB421F601D0D0C13005919CB /* Build configuration list for PBXProject "FleaMarketGuide" */ = { 559 | isa = XCConfigurationList; 560 | buildConfigurations = ( 561 | BB421F901D0D0C14005919CB /* Debug */, 562 | BB421F911D0D0C14005919CB /* Release */, 563 | ); 564 | defaultConfigurationIsVisible = 0; 565 | defaultConfigurationName = Release; 566 | }; 567 | BB421F921D0D0C14005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuide" */ = { 568 | isa = XCConfigurationList; 569 | buildConfigurations = ( 570 | BB421F931D0D0C14005919CB /* Debug */, 571 | BB421F941D0D0C14005919CB /* Release */, 572 | ); 573 | defaultConfigurationIsVisible = 0; 574 | defaultConfigurationName = Release; 575 | }; 576 | BB421F951D0D0C14005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuideTests" */ = { 577 | isa = XCConfigurationList; 578 | buildConfigurations = ( 579 | BB421F961D0D0C14005919CB /* Debug */, 580 | BB421F971D0D0C14005919CB /* Release */, 581 | ); 582 | defaultConfigurationIsVisible = 0; 583 | defaultConfigurationName = Release; 584 | }; 585 | BB421F981D0D0C14005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuideUITests" */ = { 586 | isa = XCConfigurationList; 587 | buildConfigurations = ( 588 | BB421F991D0D0C14005919CB /* Debug */, 589 | BB421F9A1D0D0C14005919CB /* Release */, 590 | ); 591 | defaultConfigurationIsVisible = 0; 592 | defaultConfigurationName = Release; 593 | }; 594 | /* End XCConfigurationList section */ 595 | }; 596 | rootObject = BB421F5D1D0D0C13005919CB /* Project object */; 597 | } 598 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // FleaMarketGuide 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // FleaMarketGuide 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "NewFeatureViewController.h" 11 | #import "ViewController.h" 12 | 13 | @interface AppDelegate () 14 | 15 | @end 16 | 17 | @implementation AppDelegate 18 | 19 | 20 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 21 | 22 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 23 | 24 | self.window.rootViewController = [self setupNewFeature]; 25 | 26 | [self.window makeKeyAndVisible]; 27 | 28 | return YES; 29 | } 30 | 31 | - (NewFeatureViewController *)setupNewFeature 32 | { 33 | NewFeatureViewController *newFeatureVC = [[NewFeatureViewController alloc] init]; 34 | // 设置本地视频路径数组 35 | NSMutableArray *array = [NSMutableArray array]; 36 | for (int i = 0; i<4; i++) { 37 | [array addObject:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"guide%d",i] ofType:@"mp4"]]; 38 | } 39 | newFeatureVC.guideMoviePathArr = array; 40 | // 设置封面图片数组 41 | newFeatureVC.guideImagesArr = @[@"guide0", @"guide1", @"guide2", @"guide3"]; 42 | // 设置最后一个视频播放完成之后的block 43 | [newFeatureVC setLastOnePlayFinished:^{ 44 | UINavigationController *rootNav = [[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] init]]; 45 | [UIApplication sharedApplication].keyWindow.rootViewController = rootNav; 46 | }]; 47 | return newFeatureVC; 48 | } 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon29x29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon29x29.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@3x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@3x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon57x57.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon57x57@2x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "AppIcon29x29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "AppIcon29x29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "AppIcon29x29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "AppIcon40x40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "AppIcon40x40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "57x57", 35 | "idiom" : "iphone", 36 | "filename" : "AppIcon57x57.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "57x57", 41 | "idiom" : "iphone", 42 | "filename" : "AppIcon57x57@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "AppIcon60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "AppIcon60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "idiom" : "ipad", 59 | "size" : "40x40", 60 | "scale" : "1x" 61 | }, 62 | { 63 | "idiom" : "ipad", 64 | "size" : "40x40", 65 | "scale" : "2x" 66 | }, 67 | { 68 | "idiom" : "car", 69 | "size" : "60x60", 70 | "scale" : "2x" 71 | }, 72 | { 73 | "idiom" : "car", 74 | "size" : "60x60", 75 | "scale" : "3x" 76 | }, 77 | { 78 | "size" : "24x24", 79 | "idiom" : "watch", 80 | "scale" : "2x", 81 | "role" : "notificationCenter", 82 | "subtype" : "38mm" 83 | }, 84 | { 85 | "size" : "27.5x27.5", 86 | "idiom" : "watch", 87 | "scale" : "2x", 88 | "role" : "notificationCenter", 89 | "subtype" : "42mm" 90 | }, 91 | { 92 | "size" : "29x29", 93 | "idiom" : "watch", 94 | "role" : "companionSettings", 95 | "scale" : "2x" 96 | }, 97 | { 98 | "size" : "29x29", 99 | "idiom" : "watch", 100 | "role" : "companionSettings", 101 | "scale" : "3x" 102 | }, 103 | { 104 | "size" : "40x40", 105 | "idiom" : "watch", 106 | "scale" : "2x", 107 | "role" : "appLauncher", 108 | "subtype" : "38mm" 109 | }, 110 | { 111 | "size" : "86x86", 112 | "idiom" : "watch", 113 | "scale" : "2x", 114 | "role" : "quickLook", 115 | "subtype" : "38mm" 116 | }, 117 | { 118 | "size" : "98x98", 119 | "idiom" : "watch", 120 | "scale" : "2x", 121 | "role" : "quickLook", 122 | "subtype" : "42mm" 123 | } 124 | ], 125 | "info" : { 126 | "version" : 1, 127 | "author" : "xcode" 128 | } 129 | } -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "guide0.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "guide0@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "guide0@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide0.imageset/guide0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide0.imageset/guide0.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide0.imageset/guide0@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide0.imageset/guide0@2x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide0.imageset/guide0@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide0.imageset/guide0@3x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "guide1.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "guide1@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "guide1@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide1.imageset/guide1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide1.imageset/guide1.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide1.imageset/guide1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide1.imageset/guide1@2x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide1.imageset/guide1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide1.imageset/guide1@3x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "guide2.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "guide2@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "guide2@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide2.imageset/guide2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide2.imageset/guide2.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide2.imageset/guide2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide2.imageset/guide2@2x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide2.imageset/guide2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide2.imageset/guide2@3x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "guide3.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "guide3@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "guide3@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide3.imageset/guide3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide3.imageset/guide3.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide3.imageset/guide3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide3.imageset/guide3@2x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide3.imageset/guide3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Assets.xcassets/guide3.imageset/guide3@3x.png -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/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 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Classes/NewFeature/Controller/NewFeatureViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // NewFeatureViewController.h 3 | // FleaMarketGuide 4 | // 5 | // Created by Alin on 16/6/12. 6 | // Copyright © 2016年 Alin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define MS_Width [UIScreen mainScreen].bounds.size.width 12 | #define MS_Height [UIScreen mainScreen].bounds.size.height 13 | #define Key_Window [UIApplication sharedApplication].keyWindow 14 | 15 | @interface NewFeatureViewController : UICollectionViewController 16 | /** 封面图片 */ 17 | @property (nonatomic, strong) NSArray *guideImagesArr; 18 | /** 视频地址 */ 19 | @property (nonatomic, strong) NSArray *guideMoviePathArr; 20 | /** 最后一个视频播放完毕 */ 21 | @property (nonatomic, copy) void (^lastOnePlayFinished)(); 22 | @end 23 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Classes/NewFeature/Controller/NewFeatureViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // NewFeatureViewController.m 3 | // FleaMarketGuide 4 | // 5 | // Created by Alin on 16/6/12. 6 | // Copyright © 2016年 Alin. All rights reserved. 7 | // 8 | 9 | #import "NewFeatureViewController.h" 10 | #import "NewFeatureCell.h" 11 | #import "ALinFlowLayout.h" 12 | #import "ViewController.h" 13 | 14 | 15 | @interface NewFeatureViewController () 16 | /** pageControl */ 17 | @property (nonatomic, strong) UIPageControl *pageControl; 18 | /** 当前视频是否播放完成 */ 19 | @property (nonatomic, assign, getter=isMovieFinished) BOOL movieFinished; 20 | @end 21 | 22 | @implementation NewFeatureViewController 23 | 24 | static NSString * const reuseIdentifier = @"NewFeatureCell"; 25 | 26 | #pragma mark - lazy loading 27 | 28 | - (UIPageControl *)pageControl 29 | { 30 | if (!_pageControl) { 31 | CGFloat width = 120; 32 | CGFloat height = 30; 33 | CGFloat x = (MS_Width - width) * 0.5; 34 | CGFloat y = MS_Height - 30 - 20; 35 | UIPageControl *pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(x, y, width, height)]; 36 | pageControl.pageIndicatorTintColor = [UIColor lightGrayColor]; 37 | pageControl.currentPageIndicatorTintColor = [UIColor redColor]; 38 | [Key_Window addSubview:pageControl]; 39 | 40 | _pageControl = pageControl; 41 | } 42 | return _pageControl; 43 | } 44 | 45 | #pragma mark - life circle 46 | 47 | - (instancetype)init 48 | { 49 | return [super initWithCollectionViewLayout:[[ALinFlowLayout alloc] init]]; 50 | } 51 | 52 | - (void)viewDidLoad { 53 | [super viewDidLoad]; 54 | 55 | [self setup]; 56 | } 57 | 58 | - (void)viewDidAppear:(BOOL)animated 59 | { 60 | [super viewDidAppear:animated]; 61 | 62 | self.pageControl.numberOfPages = self.guideImagesArr.count; 63 | } 64 | 65 | - (void)dealloc 66 | { 67 | [self.pageControl removeFromSuperview]; 68 | self.pageControl = nil; 69 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 70 | } 71 | 72 | #pragma mark - private method 73 | 74 | - (void)setup 75 | { 76 | [self.collectionView registerClass:[NewFeatureCell class] forCellWithReuseIdentifier:reuseIdentifier]; 77 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinished) name:PlayFinishedNotify object:nil]; 78 | } 79 | 80 | - (void)movieFinished 81 | { 82 | self.movieFinished = YES; 83 | } 84 | 85 | 86 | #pragma mark 87 | 88 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { 89 | 90 | return self.guideImagesArr.count; 91 | } 92 | 93 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 94 | NewFeatureCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath]; 95 | cell.startImage = [UIImage imageNamed:self.guideImagesArr[indexPath.row]]; 96 | cell.moviePath = self.guideMoviePathArr[indexPath.row]; 97 | self.movieFinished = NO; 98 | return cell; 99 | } 100 | 101 | #pragma mark 102 | 103 | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath 104 | { 105 | if (indexPath.row == self.guideImagesArr.count - 1 && self.isMovieFinished) { 106 | if (self.lastOnePlayFinished) { 107 | self.lastOnePlayFinished(); 108 | } 109 | } 110 | } 111 | 112 | #pragma mark 113 | 114 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView 115 | { 116 | uint page = (scrollView.contentOffset.x / scrollView.bounds.size.width) + 0.5; 117 | self.pageControl.currentPage = page; 118 | } 119 | 120 | @end 121 | 122 | 123 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Classes/NewFeature/FlowLayout/ALinFlowLayout.h: -------------------------------------------------------------------------------- 1 | // 2 | // ALinFlowLayout.h 3 | // FleaMarketGuide 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ALinFlowLayout : UICollectionViewFlowLayout 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Classes/NewFeature/FlowLayout/ALinFlowLayout.m: -------------------------------------------------------------------------------- 1 | // 2 | // ALinFlowLayout.m 3 | // FleaMarketGuide 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | #import "ALinFlowLayout.h" 10 | 11 | @implementation ALinFlowLayout 12 | 13 | - (void)prepareLayout 14 | { 15 | [super prepareLayout]; 16 | 17 | self.scrollDirection = UICollectionViewScrollDirectionHorizontal; 18 | self.minimumLineSpacing = 0; 19 | self.minimumInteritemSpacing = 0; 20 | self.itemSize = self.collectionView.bounds.size; 21 | 22 | self.collectionView.showsVerticalScrollIndicator = NO; 23 | self.collectionView.showsHorizontalScrollIndicator = NO; 24 | self.collectionView.bounces = NO; 25 | self.collectionView.pagingEnabled = YES; 26 | } 27 | @end 28 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Classes/NewFeature/View/NewFeatureCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // NewFeatureCell.h 3 | // FleaMarketGuide 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define PlayFinishedNotify @"PlayFinishedNotify" 12 | 13 | @interface NewFeatureCell : UICollectionViewCell 14 | /** startImage */ 15 | @property (nonatomic, strong) UIImage * _Nonnull startImage; 16 | 17 | /** 视频路径 */ 18 | @property (nonatomic, strong) NSString * _Nonnull moviePath; 19 | @end 20 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Classes/NewFeature/View/NewFeatureCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // NewFeatureCell.m 3 | // FleaMarketGuide 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | #import "NewFeatureCell.h" 10 | #import 11 | #import 12 | 13 | 14 | @interface NewFeatureCell() 15 | /** 图片 */ 16 | @property (nonatomic, weak) UIImageView *imageView; 17 | /** movie播放器 */ 18 | @property (nonatomic, strong) MPMoviePlayerController *moviePlayer; 19 | @end 20 | 21 | @implementation NewFeatureCell 22 | 23 | #pragma mark - lazy loading 24 | 25 | - (UIImageView *)imageView 26 | { 27 | if (!_imageView) { 28 | UIImageView *imageV = [[UIImageView alloc] initWithFrame:self.moviePlayer.view.bounds]; 29 | [self.moviePlayer.view addSubview:imageV]; 30 | _imageView = imageV; 31 | } 32 | return _imageView; 33 | } 34 | 35 | - (MPMoviePlayerController *)moviePlayer 36 | { 37 | if (!_moviePlayer) { 38 | MPMoviePlayerController *player = [[MPMoviePlayerController alloc] init]; 39 | [player.view setFrame:self.contentView.bounds]; 40 | // 设置自动播放 41 | [player setShouldAutoplay:NO]; 42 | // 设置源类型, 因为新特性一般都是播放本地的小视频, 所以设置源类型为File 43 | player.movieSourceType = MPMovieSourceTypeFile; 44 | // 取消下面的控制视图: 快进/暂停等... 45 | player.controlStyle = MPMovieControlStyleNone; 46 | [self.contentView addSubview:player.view]; 47 | // 监听状态的改变 48 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerDisplayChange) name:MPMoviePlayerReadyForDisplayDidChangeNotification object:nil]; 49 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playFinished) name:MPMoviePlayerPlaybackDidFinishNotification object:nil]; 50 | _moviePlayer = player; 51 | } 52 | return _moviePlayer; 53 | } 54 | 55 | 56 | #pragma mark - private method 57 | - (void)playerDisplayChange 58 | { 59 | if (self.moviePlayer.readyForDisplay) { 60 | [self.moviePlayer.backgroundView addSubview:self.imageView]; 61 | } 62 | } 63 | 64 | - (void)playFinished 65 | { 66 | 67 | [[NSNotificationCenter defaultCenter] postNotificationName:PlayFinishedNotify object:nil]; 68 | 69 | } 70 | 71 | #pragma mark - setter 72 | 73 | - (void)setMoviePath:(NSString *)moviePath 74 | { 75 | _moviePath = [moviePath copy]; 76 | 77 | // 停止之前的播放 78 | // [self.moviePlayer stop]; 79 | self.moviePlayer.view.backgroundColor = [UIColor clearColor]; 80 | // 设置播放的路径 81 | self.moviePlayer.contentURL = [[NSURL alloc] initFileURLWithPath:moviePath]; 82 | [self.moviePlayer prepareToPlay]; 83 | 84 | [self.moviePlayer play]; 85 | } 86 | 87 | 88 | - (void)setStartImage:(UIImage *)startImage 89 | { 90 | _startImage = startImage; 91 | self.imageView.image = startImage; 92 | // self.imageView.hidden = YES; 93 | // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 94 | // self.imageView.hidden = NO; 95 | // }); 96 | } 97 | 98 | #pragma mark - lift circle 99 | 100 | - (void)dealloc 101 | { 102 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 103 | } 104 | @end 105 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Classes/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // FleaMarketGuide 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Classes/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // FleaMarketGuide 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | 21 | self.view.backgroundColor = [UIColor whiteColor]; 22 | self.navigationItem.title = @"Home Page"; 23 | 24 | 25 | } 26 | 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/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 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Resource/guide0.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Resource/guide0.mp4 -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Resource/guide1.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Resource/guide1.mp4 -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Resource/guide2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Resource/guide2.mp4 -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/Resource/guide3.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuide/FleaMarketGuide/Resource/guide3.mp4 -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuide/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // FleaMarketGuide 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuideTests/FleaMarketGuideTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FleaMarketGuideTests.m 3 | // FleaMarketGuideTests 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FleaMarketGuideTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation FleaMarketGuideTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuideTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuideUITests/FleaMarketGuideUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // FleaMarketGuideUITests.m 3 | // FleaMarketGuideUITests 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FleaMarketGuideUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation FleaMarketGuideUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /FleaMarketGuide/FleaMarketGuideUITests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BB421FC51D0D5C69005919CB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB421FC41D0D5C69005919CB /* AppDelegate.swift */; }; 11 | BB421FCC1D0D5C69005919CB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BB421FCB1D0D5C69005919CB /* Assets.xcassets */; }; 12 | BB421FCF1D0D5C69005919CB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB421FCD1D0D5C69005919CB /* LaunchScreen.storyboard */; }; 13 | BB421FDA1D0D5C69005919CB /* FleaMarketGuideSwiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB421FD91D0D5C69005919CB /* FleaMarketGuideSwiftTests.swift */; }; 14 | BB421FE51D0D5C69005919CB /* FleaMarketGuideSwiftUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB421FE41D0D5C69005919CB /* FleaMarketGuideSwiftUITests.swift */; }; 15 | BB421FF41D0D5D4D005919CB /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB421FF31D0D5D4D005919CB /* ViewController.swift */; }; 16 | BB4220031D0D5EE9005919CB /* NewFeatureViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4220021D0D5EE9005919CB /* NewFeatureViewController.swift */; }; 17 | BB4220051D0D5FA7005919CB /* ALinFlowLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4220041D0D5FA7005919CB /* ALinFlowLayout.swift */; }; 18 | BB4220071D0D62F5005919CB /* NewFeatureCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB4220061D0D62F5005919CB /* NewFeatureCell.swift */; }; 19 | BB42200D1D0D780F005919CB /* guide0.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = BB4220091D0D780F005919CB /* guide0.mp4 */; }; 20 | BB42200E1D0D780F005919CB /* guide1.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = BB42200A1D0D780F005919CB /* guide1.mp4 */; }; 21 | BB42200F1D0D780F005919CB /* guide2.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = BB42200B1D0D780F005919CB /* guide2.mp4 */; }; 22 | BB4220101D0D780F005919CB /* guide3.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = BB42200C1D0D780F005919CB /* guide3.mp4 */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | BB421FD61D0D5C69005919CB /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = BB421FB91D0D5C69005919CB /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = BB421FC01D0D5C69005919CB; 31 | remoteInfo = FleaMarketGuideSwift; 32 | }; 33 | BB421FE11D0D5C69005919CB /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = BB421FB91D0D5C69005919CB /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = BB421FC01D0D5C69005919CB; 38 | remoteInfo = FleaMarketGuideSwift; 39 | }; 40 | /* End PBXContainerItemProxy section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | BB421FC11D0D5C69005919CB /* FleaMarketGuideSwift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FleaMarketGuideSwift.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | BB421FC41D0D5C69005919CB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 45 | BB421FCB1D0D5C69005919CB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46 | BB421FCE1D0D5C69005919CB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 47 | BB421FD01D0D5C69005919CB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | BB421FD51D0D5C69005919CB /* FleaMarketGuideSwiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FleaMarketGuideSwiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | BB421FD91D0D5C69005919CB /* FleaMarketGuideSwiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FleaMarketGuideSwiftTests.swift; sourceTree = ""; }; 50 | BB421FDB1D0D5C69005919CB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | BB421FE01D0D5C69005919CB /* FleaMarketGuideSwiftUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FleaMarketGuideSwiftUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | BB421FE41D0D5C69005919CB /* FleaMarketGuideSwiftUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FleaMarketGuideSwiftUITests.swift; sourceTree = ""; }; 53 | BB421FE61D0D5C69005919CB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | BB421FF31D0D5D4D005919CB /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 55 | BB4220021D0D5EE9005919CB /* NewFeatureViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NewFeatureViewController.swift; sourceTree = ""; }; 56 | BB4220041D0D5FA7005919CB /* ALinFlowLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ALinFlowLayout.swift; sourceTree = ""; }; 57 | BB4220061D0D62F5005919CB /* NewFeatureCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NewFeatureCell.swift; sourceTree = ""; }; 58 | BB4220091D0D780F005919CB /* guide0.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = guide0.mp4; sourceTree = ""; }; 59 | BB42200A1D0D780F005919CB /* guide1.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = guide1.mp4; sourceTree = ""; }; 60 | BB42200B1D0D780F005919CB /* guide2.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = guide2.mp4; sourceTree = ""; }; 61 | BB42200C1D0D780F005919CB /* guide3.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = guide3.mp4; sourceTree = ""; }; 62 | /* End PBXFileReference section */ 63 | 64 | /* Begin PBXFrameworksBuildPhase section */ 65 | BB421FBE1D0D5C69005919CB /* Frameworks */ = { 66 | isa = PBXFrameworksBuildPhase; 67 | buildActionMask = 2147483647; 68 | files = ( 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | BB421FD21D0D5C69005919CB /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | BB421FDD1D0D5C69005919CB /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | /* End PBXFrameworksBuildPhase section */ 87 | 88 | /* Begin PBXGroup section */ 89 | BB421FB81D0D5C69005919CB = { 90 | isa = PBXGroup; 91 | children = ( 92 | BB421FC31D0D5C69005919CB /* FleaMarketGuideSwift */, 93 | BB421FD81D0D5C69005919CB /* FleaMarketGuideSwiftTests */, 94 | BB421FE31D0D5C69005919CB /* FleaMarketGuideSwiftUITests */, 95 | BB421FC21D0D5C69005919CB /* Products */, 96 | ); 97 | sourceTree = ""; 98 | }; 99 | BB421FC21D0D5C69005919CB /* Products */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | BB421FC11D0D5C69005919CB /* FleaMarketGuideSwift.app */, 103 | BB421FD51D0D5C69005919CB /* FleaMarketGuideSwiftTests.xctest */, 104 | BB421FE01D0D5C69005919CB /* FleaMarketGuideSwiftUITests.xctest */, 105 | ); 106 | name = Products; 107 | sourceTree = ""; 108 | }; 109 | BB421FC31D0D5C69005919CB /* FleaMarketGuideSwift */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | BB421FC41D0D5C69005919CB /* AppDelegate.swift */, 113 | BB421FF21D0D5D42005919CB /* Classes */, 114 | BB421FCB1D0D5C69005919CB /* Assets.xcassets */, 115 | BB421FCD1D0D5C69005919CB /* LaunchScreen.storyboard */, 116 | BB421FD01D0D5C69005919CB /* Info.plist */, 117 | ); 118 | path = FleaMarketGuideSwift; 119 | sourceTree = ""; 120 | }; 121 | BB421FD81D0D5C69005919CB /* FleaMarketGuideSwiftTests */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | BB421FD91D0D5C69005919CB /* FleaMarketGuideSwiftTests.swift */, 125 | BB421FDB1D0D5C69005919CB /* Info.plist */, 126 | ); 127 | path = FleaMarketGuideSwiftTests; 128 | sourceTree = ""; 129 | }; 130 | BB421FE31D0D5C69005919CB /* FleaMarketGuideSwiftUITests */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | BB421FE41D0D5C69005919CB /* FleaMarketGuideSwiftUITests.swift */, 134 | BB421FE61D0D5C69005919CB /* Info.plist */, 135 | ); 136 | path = FleaMarketGuideSwiftUITests; 137 | sourceTree = ""; 138 | }; 139 | BB421FF21D0D5D42005919CB /* Classes */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | BB4220081D0D780F005919CB /* Resource */, 143 | BB421FF51D0D5EC6005919CB /* NewFeature */, 144 | BB421FF31D0D5D4D005919CB /* ViewController.swift */, 145 | ); 146 | path = Classes; 147 | sourceTree = ""; 148 | }; 149 | BB421FF51D0D5EC6005919CB /* NewFeature */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | BB421FF61D0D5EC6005919CB /* Controller */, 153 | BB421FF91D0D5EC6005919CB /* FlowLayout */, 154 | BB421FFC1D0D5EC6005919CB /* View */, 155 | ); 156 | path = NewFeature; 157 | sourceTree = ""; 158 | }; 159 | BB421FF61D0D5EC6005919CB /* Controller */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | BB4220021D0D5EE9005919CB /* NewFeatureViewController.swift */, 163 | ); 164 | path = Controller; 165 | sourceTree = ""; 166 | }; 167 | BB421FF91D0D5EC6005919CB /* FlowLayout */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | BB4220041D0D5FA7005919CB /* ALinFlowLayout.swift */, 171 | ); 172 | path = FlowLayout; 173 | sourceTree = ""; 174 | }; 175 | BB421FFC1D0D5EC6005919CB /* View */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | BB4220061D0D62F5005919CB /* NewFeatureCell.swift */, 179 | ); 180 | path = View; 181 | sourceTree = ""; 182 | }; 183 | BB4220081D0D780F005919CB /* Resource */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | BB4220091D0D780F005919CB /* guide0.mp4 */, 187 | BB42200A1D0D780F005919CB /* guide1.mp4 */, 188 | BB42200B1D0D780F005919CB /* guide2.mp4 */, 189 | BB42200C1D0D780F005919CB /* guide3.mp4 */, 190 | ); 191 | path = Resource; 192 | sourceTree = ""; 193 | }; 194 | /* End PBXGroup section */ 195 | 196 | /* Begin PBXNativeTarget section */ 197 | BB421FC01D0D5C69005919CB /* FleaMarketGuideSwift */ = { 198 | isa = PBXNativeTarget; 199 | buildConfigurationList = BB421FE91D0D5C69005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuideSwift" */; 200 | buildPhases = ( 201 | BB421FBD1D0D5C69005919CB /* Sources */, 202 | BB421FBE1D0D5C69005919CB /* Frameworks */, 203 | BB421FBF1D0D5C69005919CB /* Resources */, 204 | ); 205 | buildRules = ( 206 | ); 207 | dependencies = ( 208 | ); 209 | name = FleaMarketGuideSwift; 210 | productName = FleaMarketGuideSwift; 211 | productReference = BB421FC11D0D5C69005919CB /* FleaMarketGuideSwift.app */; 212 | productType = "com.apple.product-type.application"; 213 | }; 214 | BB421FD41D0D5C69005919CB /* FleaMarketGuideSwiftTests */ = { 215 | isa = PBXNativeTarget; 216 | buildConfigurationList = BB421FEC1D0D5C69005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuideSwiftTests" */; 217 | buildPhases = ( 218 | BB421FD11D0D5C69005919CB /* Sources */, 219 | BB421FD21D0D5C69005919CB /* Frameworks */, 220 | BB421FD31D0D5C69005919CB /* Resources */, 221 | ); 222 | buildRules = ( 223 | ); 224 | dependencies = ( 225 | BB421FD71D0D5C69005919CB /* PBXTargetDependency */, 226 | ); 227 | name = FleaMarketGuideSwiftTests; 228 | productName = FleaMarketGuideSwiftTests; 229 | productReference = BB421FD51D0D5C69005919CB /* FleaMarketGuideSwiftTests.xctest */; 230 | productType = "com.apple.product-type.bundle.unit-test"; 231 | }; 232 | BB421FDF1D0D5C69005919CB /* FleaMarketGuideSwiftUITests */ = { 233 | isa = PBXNativeTarget; 234 | buildConfigurationList = BB421FEF1D0D5C69005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuideSwiftUITests" */; 235 | buildPhases = ( 236 | BB421FDC1D0D5C69005919CB /* Sources */, 237 | BB421FDD1D0D5C69005919CB /* Frameworks */, 238 | BB421FDE1D0D5C69005919CB /* Resources */, 239 | ); 240 | buildRules = ( 241 | ); 242 | dependencies = ( 243 | BB421FE21D0D5C69005919CB /* PBXTargetDependency */, 244 | ); 245 | name = FleaMarketGuideSwiftUITests; 246 | productName = FleaMarketGuideSwiftUITests; 247 | productReference = BB421FE01D0D5C69005919CB /* FleaMarketGuideSwiftUITests.xctest */; 248 | productType = "com.apple.product-type.bundle.ui-testing"; 249 | }; 250 | /* End PBXNativeTarget section */ 251 | 252 | /* Begin PBXProject section */ 253 | BB421FB91D0D5C69005919CB /* Project object */ = { 254 | isa = PBXProject; 255 | attributes = { 256 | LastSwiftUpdateCheck = 0730; 257 | LastUpgradeCheck = 0730; 258 | ORGANIZATIONNAME = SL; 259 | TargetAttributes = { 260 | BB421FC01D0D5C69005919CB = { 261 | CreatedOnToolsVersion = 7.3.1; 262 | DevelopmentTeam = AL4GV8C88Y; 263 | }; 264 | BB421FD41D0D5C69005919CB = { 265 | CreatedOnToolsVersion = 7.3.1; 266 | TestTargetID = BB421FC01D0D5C69005919CB; 267 | }; 268 | BB421FDF1D0D5C69005919CB = { 269 | CreatedOnToolsVersion = 7.3.1; 270 | TestTargetID = BB421FC01D0D5C69005919CB; 271 | }; 272 | }; 273 | }; 274 | buildConfigurationList = BB421FBC1D0D5C69005919CB /* Build configuration list for PBXProject "FleaMarketGuideSwift" */; 275 | compatibilityVersion = "Xcode 3.2"; 276 | developmentRegion = English; 277 | hasScannedForEncodings = 0; 278 | knownRegions = ( 279 | en, 280 | Base, 281 | ); 282 | mainGroup = BB421FB81D0D5C69005919CB; 283 | productRefGroup = BB421FC21D0D5C69005919CB /* Products */; 284 | projectDirPath = ""; 285 | projectRoot = ""; 286 | targets = ( 287 | BB421FC01D0D5C69005919CB /* FleaMarketGuideSwift */, 288 | BB421FD41D0D5C69005919CB /* FleaMarketGuideSwiftTests */, 289 | BB421FDF1D0D5C69005919CB /* FleaMarketGuideSwiftUITests */, 290 | ); 291 | }; 292 | /* End PBXProject section */ 293 | 294 | /* Begin PBXResourcesBuildPhase section */ 295 | BB421FBF1D0D5C69005919CB /* Resources */ = { 296 | isa = PBXResourcesBuildPhase; 297 | buildActionMask = 2147483647; 298 | files = ( 299 | BB42200F1D0D780F005919CB /* guide2.mp4 in Resources */, 300 | BB42200E1D0D780F005919CB /* guide1.mp4 in Resources */, 301 | BB4220101D0D780F005919CB /* guide3.mp4 in Resources */, 302 | BB421FCF1D0D5C69005919CB /* LaunchScreen.storyboard in Resources */, 303 | BB421FCC1D0D5C69005919CB /* Assets.xcassets in Resources */, 304 | BB42200D1D0D780F005919CB /* guide0.mp4 in Resources */, 305 | ); 306 | runOnlyForDeploymentPostprocessing = 0; 307 | }; 308 | BB421FD31D0D5C69005919CB /* Resources */ = { 309 | isa = PBXResourcesBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | ); 313 | runOnlyForDeploymentPostprocessing = 0; 314 | }; 315 | BB421FDE1D0D5C69005919CB /* Resources */ = { 316 | isa = PBXResourcesBuildPhase; 317 | buildActionMask = 2147483647; 318 | files = ( 319 | ); 320 | runOnlyForDeploymentPostprocessing = 0; 321 | }; 322 | /* End PBXResourcesBuildPhase section */ 323 | 324 | /* Begin PBXSourcesBuildPhase section */ 325 | BB421FBD1D0D5C69005919CB /* Sources */ = { 326 | isa = PBXSourcesBuildPhase; 327 | buildActionMask = 2147483647; 328 | files = ( 329 | BB421FF41D0D5D4D005919CB /* ViewController.swift in Sources */, 330 | BB4220031D0D5EE9005919CB /* NewFeatureViewController.swift in Sources */, 331 | BB4220071D0D62F5005919CB /* NewFeatureCell.swift in Sources */, 332 | BB4220051D0D5FA7005919CB /* ALinFlowLayout.swift in Sources */, 333 | BB421FC51D0D5C69005919CB /* AppDelegate.swift in Sources */, 334 | ); 335 | runOnlyForDeploymentPostprocessing = 0; 336 | }; 337 | BB421FD11D0D5C69005919CB /* Sources */ = { 338 | isa = PBXSourcesBuildPhase; 339 | buildActionMask = 2147483647; 340 | files = ( 341 | BB421FDA1D0D5C69005919CB /* FleaMarketGuideSwiftTests.swift in Sources */, 342 | ); 343 | runOnlyForDeploymentPostprocessing = 0; 344 | }; 345 | BB421FDC1D0D5C69005919CB /* Sources */ = { 346 | isa = PBXSourcesBuildPhase; 347 | buildActionMask = 2147483647; 348 | files = ( 349 | BB421FE51D0D5C69005919CB /* FleaMarketGuideSwiftUITests.swift in Sources */, 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | }; 353 | /* End PBXSourcesBuildPhase section */ 354 | 355 | /* Begin PBXTargetDependency section */ 356 | BB421FD71D0D5C69005919CB /* PBXTargetDependency */ = { 357 | isa = PBXTargetDependency; 358 | target = BB421FC01D0D5C69005919CB /* FleaMarketGuideSwift */; 359 | targetProxy = BB421FD61D0D5C69005919CB /* PBXContainerItemProxy */; 360 | }; 361 | BB421FE21D0D5C69005919CB /* PBXTargetDependency */ = { 362 | isa = PBXTargetDependency; 363 | target = BB421FC01D0D5C69005919CB /* FleaMarketGuideSwift */; 364 | targetProxy = BB421FE11D0D5C69005919CB /* PBXContainerItemProxy */; 365 | }; 366 | /* End PBXTargetDependency section */ 367 | 368 | /* Begin PBXVariantGroup section */ 369 | BB421FCD1D0D5C69005919CB /* LaunchScreen.storyboard */ = { 370 | isa = PBXVariantGroup; 371 | children = ( 372 | BB421FCE1D0D5C69005919CB /* Base */, 373 | ); 374 | name = LaunchScreen.storyboard; 375 | sourceTree = ""; 376 | }; 377 | /* End PBXVariantGroup section */ 378 | 379 | /* Begin XCBuildConfiguration section */ 380 | BB421FE71D0D5C69005919CB /* Debug */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | ALWAYS_SEARCH_USER_PATHS = NO; 384 | CLANG_ANALYZER_NONNULL = YES; 385 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 386 | CLANG_CXX_LIBRARY = "libc++"; 387 | CLANG_ENABLE_MODULES = YES; 388 | CLANG_ENABLE_OBJC_ARC = YES; 389 | CLANG_WARN_BOOL_CONVERSION = YES; 390 | CLANG_WARN_CONSTANT_CONVERSION = YES; 391 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 392 | CLANG_WARN_EMPTY_BODY = YES; 393 | CLANG_WARN_ENUM_CONVERSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 396 | CLANG_WARN_UNREACHABLE_CODE = YES; 397 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 398 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 399 | COPY_PHASE_STRIP = NO; 400 | DEBUG_INFORMATION_FORMAT = dwarf; 401 | ENABLE_STRICT_OBJC_MSGSEND = YES; 402 | ENABLE_TESTABILITY = YES; 403 | GCC_C_LANGUAGE_STANDARD = gnu99; 404 | GCC_DYNAMIC_NO_PIC = NO; 405 | GCC_NO_COMMON_BLOCKS = YES; 406 | GCC_OPTIMIZATION_LEVEL = 0; 407 | GCC_PREPROCESSOR_DEFINITIONS = ( 408 | "DEBUG=1", 409 | "$(inherited)", 410 | ); 411 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 412 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 413 | GCC_WARN_UNDECLARED_SELECTOR = YES; 414 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 415 | GCC_WARN_UNUSED_FUNCTION = YES; 416 | GCC_WARN_UNUSED_VARIABLE = YES; 417 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 418 | MTL_ENABLE_DEBUG_INFO = YES; 419 | ONLY_ACTIVE_ARCH = YES; 420 | SDKROOT = iphoneos; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | }; 423 | name = Debug; 424 | }; 425 | BB421FE81D0D5C69005919CB /* Release */ = { 426 | isa = XCBuildConfiguration; 427 | buildSettings = { 428 | ALWAYS_SEARCH_USER_PATHS = NO; 429 | CLANG_ANALYZER_NONNULL = YES; 430 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 431 | CLANG_CXX_LIBRARY = "libc++"; 432 | CLANG_ENABLE_MODULES = YES; 433 | CLANG_ENABLE_OBJC_ARC = YES; 434 | CLANG_WARN_BOOL_CONVERSION = YES; 435 | CLANG_WARN_CONSTANT_CONVERSION = YES; 436 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 437 | CLANG_WARN_EMPTY_BODY = YES; 438 | CLANG_WARN_ENUM_CONVERSION = YES; 439 | CLANG_WARN_INT_CONVERSION = YES; 440 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 441 | CLANG_WARN_UNREACHABLE_CODE = YES; 442 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 443 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 444 | COPY_PHASE_STRIP = NO; 445 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 446 | ENABLE_NS_ASSERTIONS = NO; 447 | ENABLE_STRICT_OBJC_MSGSEND = YES; 448 | GCC_C_LANGUAGE_STANDARD = gnu99; 449 | GCC_NO_COMMON_BLOCKS = YES; 450 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 451 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 452 | GCC_WARN_UNDECLARED_SELECTOR = YES; 453 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 454 | GCC_WARN_UNUSED_FUNCTION = YES; 455 | GCC_WARN_UNUSED_VARIABLE = YES; 456 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 457 | MTL_ENABLE_DEBUG_INFO = NO; 458 | SDKROOT = iphoneos; 459 | VALIDATE_PRODUCT = YES; 460 | }; 461 | name = Release; 462 | }; 463 | BB421FEA1D0D5C69005919CB /* Debug */ = { 464 | isa = XCBuildConfiguration; 465 | buildSettings = { 466 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 467 | CODE_SIGN_IDENTITY = "iPhone Developer"; 468 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 469 | INFOPLIST_FILE = FleaMarketGuideSwift/Info.plist; 470 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 471 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 472 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuideSwift; 473 | PRODUCT_NAME = "$(TARGET_NAME)"; 474 | PROVISIONING_PROFILE = ""; 475 | }; 476 | name = Debug; 477 | }; 478 | BB421FEB1D0D5C69005919CB /* Release */ = { 479 | isa = XCBuildConfiguration; 480 | buildSettings = { 481 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 482 | CODE_SIGN_IDENTITY = "iPhone Developer"; 483 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 484 | INFOPLIST_FILE = FleaMarketGuideSwift/Info.plist; 485 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 487 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuideSwift; 488 | PRODUCT_NAME = "$(TARGET_NAME)"; 489 | PROVISIONING_PROFILE = ""; 490 | }; 491 | name = Release; 492 | }; 493 | BB421FED1D0D5C69005919CB /* Debug */ = { 494 | isa = XCBuildConfiguration; 495 | buildSettings = { 496 | BUNDLE_LOADER = "$(TEST_HOST)"; 497 | INFOPLIST_FILE = FleaMarketGuideSwiftTests/Info.plist; 498 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 499 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuideSwiftTests; 500 | PRODUCT_NAME = "$(TARGET_NAME)"; 501 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FleaMarketGuideSwift.app/FleaMarketGuideSwift"; 502 | }; 503 | name = Debug; 504 | }; 505 | BB421FEE1D0D5C69005919CB /* Release */ = { 506 | isa = XCBuildConfiguration; 507 | buildSettings = { 508 | BUNDLE_LOADER = "$(TEST_HOST)"; 509 | INFOPLIST_FILE = FleaMarketGuideSwiftTests/Info.plist; 510 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 511 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuideSwiftTests; 512 | PRODUCT_NAME = "$(TARGET_NAME)"; 513 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FleaMarketGuideSwift.app/FleaMarketGuideSwift"; 514 | }; 515 | name = Release; 516 | }; 517 | BB421FF01D0D5C69005919CB /* Debug */ = { 518 | isa = XCBuildConfiguration; 519 | buildSettings = { 520 | INFOPLIST_FILE = FleaMarketGuideSwiftUITests/Info.plist; 521 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 522 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuideSwiftUITests; 523 | PRODUCT_NAME = "$(TARGET_NAME)"; 524 | TEST_TARGET_NAME = FleaMarketGuideSwift; 525 | }; 526 | name = Debug; 527 | }; 528 | BB421FF11D0D5C69005919CB /* Release */ = { 529 | isa = XCBuildConfiguration; 530 | buildSettings = { 531 | INFOPLIST_FILE = FleaMarketGuideSwiftUITests/Info.plist; 532 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 533 | PRODUCT_BUNDLE_IDENTIFIER = com.sl.FleaMarketGuideSwiftUITests; 534 | PRODUCT_NAME = "$(TARGET_NAME)"; 535 | TEST_TARGET_NAME = FleaMarketGuideSwift; 536 | }; 537 | name = Release; 538 | }; 539 | /* End XCBuildConfiguration section */ 540 | 541 | /* Begin XCConfigurationList section */ 542 | BB421FBC1D0D5C69005919CB /* Build configuration list for PBXProject "FleaMarketGuideSwift" */ = { 543 | isa = XCConfigurationList; 544 | buildConfigurations = ( 545 | BB421FE71D0D5C69005919CB /* Debug */, 546 | BB421FE81D0D5C69005919CB /* Release */, 547 | ); 548 | defaultConfigurationIsVisible = 0; 549 | defaultConfigurationName = Release; 550 | }; 551 | BB421FE91D0D5C69005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuideSwift" */ = { 552 | isa = XCConfigurationList; 553 | buildConfigurations = ( 554 | BB421FEA1D0D5C69005919CB /* Debug */, 555 | BB421FEB1D0D5C69005919CB /* Release */, 556 | ); 557 | defaultConfigurationIsVisible = 0; 558 | defaultConfigurationName = Release; 559 | }; 560 | BB421FEC1D0D5C69005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuideSwiftTests" */ = { 561 | isa = XCConfigurationList; 562 | buildConfigurations = ( 563 | BB421FED1D0D5C69005919CB /* Debug */, 564 | BB421FEE1D0D5C69005919CB /* Release */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | defaultConfigurationName = Release; 568 | }; 569 | BB421FEF1D0D5C69005919CB /* Build configuration list for PBXNativeTarget "FleaMarketGuideSwiftUITests" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | BB421FF01D0D5C69005919CB /* Debug */, 573 | BB421FF11D0D5C69005919CB /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | /* End XCConfigurationList section */ 579 | }; 580 | rootObject = BB421FB91D0D5C69005919CB /* Project object */; 581 | } 582 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // FleaMarketGuideSwift 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 17 | 18 | window = UIWindow(frame: UIScreen.mainScreen().bounds) 19 | 20 | // 配置本地视频路径和视频的封面图片 21 | var paths = [String]() 22 | var images = [UIImage]() 23 | for i in 0..<4 { 24 | paths.append(NSBundle.mainBundle().pathForResource("guide\(i)", ofType: "mp4")!) 25 | images.append(UIImage(named: "guide\(i)")!) 26 | } 27 | // 设置新特性 28 | window?.rootViewController = NewFeatureViewController(images: images, moviePaths: paths, playFinished: { [unowned self] in 29 | self.window?.rootViewController = UINavigationController(rootViewController: ViewController()) 30 | }) 31 | 32 | window?.makeKeyAndVisible() 33 | 34 | return true 35 | } 36 | 37 | } 38 | 39 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon29x29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon29x29.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon29x29@3x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon40x40@3x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon57x57.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon57x57@2x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "AppIcon29x29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "AppIcon29x29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "AppIcon29x29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "AppIcon40x40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "AppIcon40x40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "57x57", 35 | "idiom" : "iphone", 36 | "filename" : "AppIcon57x57.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "57x57", 41 | "idiom" : "iphone", 42 | "filename" : "AppIcon57x57@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "AppIcon60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "AppIcon60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "idiom" : "ipad", 59 | "size" : "40x40", 60 | "scale" : "1x" 61 | }, 62 | { 63 | "idiom" : "ipad", 64 | "size" : "40x40", 65 | "scale" : "2x" 66 | }, 67 | { 68 | "idiom" : "car", 69 | "size" : "60x60", 70 | "scale" : "2x" 71 | }, 72 | { 73 | "idiom" : "car", 74 | "size" : "60x60", 75 | "scale" : "3x" 76 | }, 77 | { 78 | "size" : "24x24", 79 | "idiom" : "watch", 80 | "scale" : "2x", 81 | "role" : "notificationCenter", 82 | "subtype" : "38mm" 83 | }, 84 | { 85 | "size" : "27.5x27.5", 86 | "idiom" : "watch", 87 | "scale" : "2x", 88 | "role" : "notificationCenter", 89 | "subtype" : "42mm" 90 | }, 91 | { 92 | "size" : "29x29", 93 | "idiom" : "watch", 94 | "role" : "companionSettings", 95 | "scale" : "2x" 96 | }, 97 | { 98 | "size" : "29x29", 99 | "idiom" : "watch", 100 | "role" : "companionSettings", 101 | "scale" : "3x" 102 | }, 103 | { 104 | "size" : "40x40", 105 | "idiom" : "watch", 106 | "scale" : "2x", 107 | "role" : "appLauncher", 108 | "subtype" : "38mm" 109 | }, 110 | { 111 | "size" : "86x86", 112 | "idiom" : "watch", 113 | "scale" : "2x", 114 | "role" : "quickLook", 115 | "subtype" : "38mm" 116 | }, 117 | { 118 | "size" : "98x98", 119 | "idiom" : "watch", 120 | "scale" : "2x", 121 | "role" : "quickLook", 122 | "subtype" : "42mm" 123 | } 124 | ], 125 | "info" : { 126 | "version" : 1, 127 | "author" : "xcode" 128 | } 129 | } -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "guide0.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "guide0@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "guide0@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide0.imageset/guide0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide0.imageset/guide0.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide0.imageset/guide0@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide0.imageset/guide0@2x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide0.imageset/guide0@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide0.imageset/guide0@3x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "guide1.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "guide1@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "guide1@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide1.imageset/guide1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide1.imageset/guide1.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide1.imageset/guide1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide1.imageset/guide1@2x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide1.imageset/guide1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide1.imageset/guide1@3x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "guide2.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "guide2@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "guide2@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide2.imageset/guide2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide2.imageset/guide2.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide2.imageset/guide2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide2.imageset/guide2@2x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide2.imageset/guide2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide2.imageset/guide2@3x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x", 6 | "filename" : "guide3.png" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "guide3@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x", 16 | "filename" : "guide3@3x.png" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide3.imageset/guide3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide3.imageset/guide3.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide3.imageset/guide3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide3.imageset/guide3@2x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide3.imageset/guide3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Assets.xcassets/guide3.imageset/guide3@3x.png -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/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 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/NewFeature/Controller/NewFeatureViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NewFeatureViewController.swift 3 | // FleaMarketGuideSwift 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | let MS_Width = UIScreen.mainScreen().bounds.size.width 12 | let MS_Height = UIScreen.mainScreen().bounds.size.height 13 | let Key_Window = UIApplication.sharedApplication().keyWindow 14 | 15 | private let reuseIdentifier = "NewFeatureCell" 16 | 17 | class NewFeatureViewController: UICollectionViewController { 18 | 19 | var guideImages: [UIImage] 20 | 21 | var guideMoviePaths: [String] 22 | 23 | var lastOnePlayFinished: ()->() 24 | 25 | // MARK: - life circle 26 | 27 | /** 28 | 构造方法 29 | 30 | - parameter images: 封面图片 31 | - parameter moviePaths: 视频地址 32 | - parameter playFinished: 最后一个视频播放完毕 33 | */ 34 | init(images:[UIImage], moviePaths:[String], playFinished: ()->()) { 35 | guideImages = images 36 | guideMoviePaths = moviePaths 37 | lastOnePlayFinished = playFinished 38 | 39 | super.init(collectionViewLayout: ALinFlowLayout()) 40 | } 41 | 42 | required init?(coder aDecoder: NSCoder) { 43 | fatalError("init(coder:) has not been implemented") 44 | } 45 | 46 | override func viewDidLoad() { 47 | super.viewDidLoad() 48 | 49 | self.collectionView!.registerClass(NewFeatureCell.self, forCellWithReuseIdentifier: reuseIdentifier) 50 | NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(NewFeatureViewController.finishedPlay), name: PlayFinishedNotify, object: nil) 51 | } 52 | 53 | override func viewDidAppear(animated: Bool) { 54 | super.viewDidAppear(animated) 55 | 56 | pageControl.numberOfPages = guideMoviePaths.count ?? 0 57 | 58 | } 59 | 60 | deinit 61 | { 62 | pageControl.removeFromSuperview() 63 | NSNotificationCenter.defaultCenter().removeObserver(self) 64 | } 65 | 66 | // MARK: - private method 67 | 68 | private var isMovieFinished = false 69 | func finishedPlay() { 70 | isMovieFinished = true 71 | } 72 | 73 | // MARK: UICollectionViewDataSource 74 | 75 | override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 76 | return guideMoviePaths.count ?? 0 77 | } 78 | 79 | override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { 80 | let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as! NewFeatureCell 81 | 82 | cell.coverImage = guideImages[indexPath.item] 83 | 84 | cell.moviePath = guideMoviePaths[indexPath.item] 85 | 86 | isMovieFinished = false 87 | return cell 88 | } 89 | 90 | // MARK: UICollectionViewDelegate 91 | override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) { 92 | if indexPath.item == guideMoviePaths.count - 1 && isMovieFinished{ 93 | lastOnePlayFinished() 94 | } 95 | } 96 | 97 | // MARK: UIScrollViewDelegate 98 | override func scrollViewDidScroll(scrollView: UIScrollView) { 99 | let page = Int(scrollView.contentOffset.x / collectionView!.bounds.width + 0.5) 100 | pageControl.currentPage = page 101 | } 102 | 103 | // MARK : - 懒加载 104 | private lazy var pageControl : UIPageControl = 105 | { 106 | let width : CGFloat = 120.0 107 | let height : CGFloat = 30.0 108 | let x : CGFloat = (MS_Width - width) * 0.5; 109 | let y : CGFloat = MS_Height - 30 - 20; 110 | let pageControl = UIPageControl(frame: CGRect(x: x, y: y, width: width, height: height)) 111 | pageControl.pageIndicatorTintColor = UIColor.lightGrayColor() 112 | pageControl.currentPageIndicatorTintColor = UIColor.redColor() 113 | Key_Window?.addSubview(pageControl) 114 | return pageControl; 115 | }() 116 | 117 | 118 | } 119 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/NewFeature/FlowLayout/ALinFlowLayout.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ALinFlowLayout.swift 3 | // FleaMarketGuideSwift 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ALinFlowLayout: UICollectionViewFlowLayout { 12 | override func prepareLayout() { 13 | super.prepareLayout() 14 | 15 | scrollDirection = .Horizontal 16 | minimumLineSpacing = 0 17 | minimumInteritemSpacing = 0 18 | itemSize = collectionView!.bounds.size 19 | 20 | collectionView!.showsVerticalScrollIndicator = false 21 | collectionView!.showsHorizontalScrollIndicator = false 22 | collectionView!.bounces = false 23 | collectionView!.pagingEnabled = true 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/NewFeature/View/NewFeatureCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NewFeatureCell.swift 3 | // FleaMarketGuideSwift 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import MediaPlayer 11 | 12 | let PlayFinishedNotify = "PlayFinishedNotify" 13 | 14 | class NewFeatureCell: UICollectionViewCell { 15 | var coverImage : UIImage? 16 | { 17 | didSet{ 18 | if let _ = coverImage { 19 | imageView.image = coverImage 20 | } 21 | 22 | } 23 | } 24 | var moviePath : String?{ 25 | didSet{ 26 | if let iPath = moviePath { 27 | moviePlayer.contentURL = NSURL(fileURLWithPath: iPath, isDirectory: false) 28 | moviePlayer.prepareToPlay() 29 | } 30 | 31 | } 32 | } 33 | 34 | override init(frame: CGRect) { 35 | super.init(frame: frame) 36 | 37 | contentView.addSubview(moviePlayer.view) 38 | moviePlayer.view.addSubview(imageView) 39 | } 40 | 41 | 42 | required init?(coder aDecoder: NSCoder) { 43 | fatalError("init(coder:) has not been implemented") 44 | } 45 | 46 | deinit 47 | { 48 | NSNotificationCenter.defaultCenter().removeObserver(self) 49 | } 50 | 51 | private lazy var imageView : UIImageView = { 52 | let imageView = UIImageView(frame:self.moviePlayer.view.bounds) 53 | return imageView 54 | }() 55 | 56 | private lazy var moviePlayer : MPMoviePlayerController = { 57 | let player = MPMoviePlayerController() 58 | player.view.frame = self.contentView.bounds 59 | // 设置自动播放 60 | player.shouldAutoplay = true 61 | // 设置源类型 62 | player.movieSourceType = .File 63 | // 取消下面的控制视图: 快进/暂停等... 64 | player.controlStyle = .None 65 | 66 | NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(NewFeatureCell.playerDisplayChange), name: MPMoviePlayerReadyForDisplayDidChangeNotification, object: nil) 67 | NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(NewFeatureCell.playFinished), name: MPMoviePlayerPlaybackDidFinishNotification, object: nil) 68 | return player 69 | 70 | }() 71 | 72 | // MARK: - private method 73 | 74 | func playerDisplayChange() 75 | { 76 | if moviePlayer.readyForDisplay { 77 | moviePlayer.backgroundView.addSubview(imageView) 78 | } 79 | } 80 | 81 | func playFinished() 82 | { 83 | NSNotificationCenter.defaultCenter().postNotificationName(PlayFinishedNotify, object: nil) 84 | } 85 | 86 | 87 | } 88 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/Resource/guide0.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/Resource/guide0.mp4 -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/Resource/guide1.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/Resource/guide1.mp4 -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/Resource/guide2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/Resource/guide2.mp4 -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/Resource/guide3.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SunLiner/FleaMarket/e41edb4bf3cc3848c9b49a16a0551bf8207b4ed9/FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/Resource/guide3.mp4 -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/Classes/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // FleaMarketGuideSwift 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | navigationItem.title = "Home Page" 16 | view.backgroundColor = UIColor.redColor() 17 | } 18 | 19 | 20 | } 21 | 22 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwift/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 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwiftTests/FleaMarketGuideSwiftTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FleaMarketGuideSwiftTests.swift 3 | // FleaMarketGuideSwiftTests 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import FleaMarketGuideSwift 11 | 12 | class FleaMarketGuideSwiftTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwiftTests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwiftUITests/FleaMarketGuideSwiftUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FleaMarketGuideSwiftUITests.swift 3 | // FleaMarketGuideSwiftUITests 4 | // 5 | // Created by ALin on 16/6/12. 6 | // Copyright © 2016年 ALin. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class FleaMarketGuideSwiftUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /FleaMarketGuideSwift/FleaMarketGuideSwiftUITests/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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 ALin 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 | ## 项目blog地址 2 | 简书blog地址 3 | 4 | ## 效果图 5 | ![咸鱼新特性](http://upload-images.jianshu.io/upload_images/1038348-8aca5e5b57b66949.gif?imageMogr2/auto-orient/strip) 6 | 7 | ## 用法 8 | OC用法: 9 | ```objc 10 | #import "NewFeatureViewController.h" 11 | ``` 12 | 13 | ```objc 14 | NewFeatureViewController *newFeatureVC = [[NewFeatureViewController alloc] init]; 15 | NSMutableArray *array = [NSMutableArray array]; 16 | for (int i = 0; i<4; i++) { 17 | [array addObject:[[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"guide%d",i] ofType:@"mp4"]]; 18 | } 19 | // 1.设置本地视频路径数组 20 | newFeatureVC.guideMoviePathArr = array; 21 | // 2.设置封面图片数组 22 | newFeatureVC.guideImagesArr = @[@"guide0", @"guide1", @"guide2", @"guide3"]; 23 | // 3.设置最后一个视频播放完成之后的block 24 | [newFeatureVC setLastOnePlayFinished:^{ 25 | UINavigationController *rootNav = [[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] init]]; 26 | [UIApplication sharedApplication].keyWindow.rootViewController = rootNav; 27 | }]; 28 | self.window.rootViewController = newFeatureVC; 29 | ``` 30 | 31 | Swift用法 32 | 33 | ```swift 34 | // 配置本地视频路径和视频的封面图片 35 | var paths = [String]() 36 | var images = [UIImage]() 37 | for i in 0..<4 { 38 | paths.append(NSBundle.mainBundle().pathForResource("guide\(i)", ofType: "mp4")!) 39 | images.append(UIImage(named: "guide\(i)")!) 40 | } 41 | // 设置rootViewController为新特性控制器 42 | window?.rootViewController = NewFeatureViewController(images: images, moviePaths: paths, playFinished: { [unowned self] in 43 | self.window?.rootViewController = UINavigationController(rootViewController: ViewController()) 44 | }) 45 | ``` 46 | --------------------------------------------------------------------------------