├── .travis.yml ├── ifengNewsOrderDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── ifengNewsOrderDemo.xccheckout │ └── xcuserdata │ │ └── zer0.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings ├── xcshareddata │ └── xcschemes │ │ └── ifengNewsOrderDemo.xcscheme └── xcuserdata │ ├── lanou3g.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ ├── ifengNewsOrderDemo.xcscheme │ │ └── xcschememanagement.plist │ └── zer0.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── ifengNewsOrderDemo ├── AppDelegate.h ├── AppDelegate.m ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── OrderButton │ ├── Header.h │ ├── OrderButton.h │ ├── OrderButton.m │ ├── OrderViewController.h │ ├── OrderViewController.m │ ├── TouchView.h │ ├── TouchView.m │ ├── TouchViewModel.h │ ├── TouchViewModel.m │ ├── order_back.png │ ├── order_back_select.png │ ├── order_background.png │ ├── order_drag_move_bg.png │ ├── topnav_orderbutton.png │ └── topnav_orderbutton_selected_unselected.png ├── RootViewController.h ├── RootViewController.m ├── en.lproj │ └── InfoPlist.strings ├── ifengNewsOrderDemo-Info.plist ├── ifengNewsOrderDemo-Prefix.pch └── main.m └── ifengNewsOrderDemoTests ├── en.lproj └── InfoPlist.strings ├── ifengNewsOrderDemoTests-Info.plist └── ifengNewsOrderDemoTests.m /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | xcode_project: ifengNewsOrderDemo.xcodeproj # path to your xcodeproj folder 3 | xcode_scheme: ifengNewsOrderDemo 4 | xcode_sdk: iphonesimulator 5 | script: 6 | - xctool -project ifengNewsOrderDemo.xcodeproj -scheme ifengNewsOrderDemo -sdk iphonesimulator build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -------------------------------------------------------------------------------- /ifengNewsOrderDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C292B97E18C4299400B0440C /* order_back.png in Resources */ = {isa = PBXBuildFile; fileRef = C292B96E18C4299400B0440C /* order_back.png */; }; 11 | C292B97F18C4299400B0440C /* order_back_select.png in Resources */ = {isa = PBXBuildFile; fileRef = C292B96F18C4299400B0440C /* order_back_select.png */; }; 12 | C292B98018C4299400B0440C /* order_background.png in Resources */ = {isa = PBXBuildFile; fileRef = C292B97018C4299400B0440C /* order_background.png */; }; 13 | C292B98118C4299400B0440C /* order_drag_move_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = C292B97118C4299400B0440C /* order_drag_move_bg.png */; }; 14 | C292B98218C4299400B0440C /* OrderButton.m in Sources */ = {isa = PBXBuildFile; fileRef = C292B97318C4299400B0440C /* OrderButton.m */; }; 15 | C292B98318C4299400B0440C /* OrderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C292B97518C4299400B0440C /* OrderViewController.m */; }; 16 | C292B98418C4299400B0440C /* topnav_orderbutton.png in Resources */ = {isa = PBXBuildFile; fileRef = C292B97618C4299400B0440C /* topnav_orderbutton.png */; }; 17 | C292B98518C4299400B0440C /* topnav_orderbutton_selected_unselected.png in Resources */ = {isa = PBXBuildFile; fileRef = C292B97718C4299400B0440C /* topnav_orderbutton_selected_unselected.png */; }; 18 | C292B98618C4299400B0440C /* TouchView.m in Sources */ = {isa = PBXBuildFile; fileRef = C292B97918C4299400B0440C /* TouchView.m */; }; 19 | C292B98718C4299400B0440C /* TouchViewModel.m in Sources */ = {isa = PBXBuildFile; fileRef = C292B97B18C4299400B0440C /* TouchViewModel.m */; }; 20 | C292B98818C4299400B0440C /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C292B97D18C4299400B0440C /* RootViewController.m */; }; 21 | C2CF1D5918BDDCDA005A582B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2CF1D5818BDDCDA005A582B /* Foundation.framework */; }; 22 | C2CF1D5B18BDDCDA005A582B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2CF1D5A18BDDCDA005A582B /* CoreGraphics.framework */; }; 23 | C2CF1D5D18BDDCDA005A582B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2CF1D5C18BDDCDA005A582B /* UIKit.framework */; }; 24 | C2CF1D6318BDDCDA005A582B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C2CF1D6118BDDCDA005A582B /* InfoPlist.strings */; }; 25 | C2CF1D6518BDDCDA005A582B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C2CF1D6418BDDCDA005A582B /* main.m */; }; 26 | C2CF1D6918BDDCDA005A582B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C2CF1D6818BDDCDA005A582B /* AppDelegate.m */; }; 27 | C2CF1D6B18BDDCDA005A582B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C2CF1D6A18BDDCDA005A582B /* Images.xcassets */; }; 28 | C2CF1D7218BDDCDA005A582B /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2CF1D7118BDDCDA005A582B /* XCTest.framework */; }; 29 | C2CF1D7318BDDCDA005A582B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2CF1D5818BDDCDA005A582B /* Foundation.framework */; }; 30 | C2CF1D7418BDDCDA005A582B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2CF1D5C18BDDCDA005A582B /* UIKit.framework */; }; 31 | C2CF1D7C18BDDCDA005A582B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C2CF1D7A18BDDCDA005A582B /* InfoPlist.strings */; }; 32 | C2CF1D7E18BDDCDA005A582B /* ifengNewsOrderDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = C2CF1D7D18BDDCDA005A582B /* ifengNewsOrderDemoTests.m */; }; 33 | /* End PBXBuildFile section */ 34 | 35 | /* Begin PBXContainerItemProxy section */ 36 | C2CF1D7518BDDCDA005A582B /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = C2CF1D4D18BDDCDA005A582B /* Project object */; 39 | proxyType = 1; 40 | remoteGlobalIDString = C2CF1D5418BDDCDA005A582B; 41 | remoteInfo = ifengNewsOrderDemo; 42 | }; 43 | /* End PBXContainerItemProxy section */ 44 | 45 | /* Begin PBXFileReference section */ 46 | C292B96D18C4299400B0440C /* Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Header.h; sourceTree = ""; }; 47 | C292B96E18C4299400B0440C /* order_back.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = order_back.png; sourceTree = ""; }; 48 | C292B96F18C4299400B0440C /* order_back_select.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = order_back_select.png; sourceTree = ""; }; 49 | C292B97018C4299400B0440C /* order_background.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = order_background.png; sourceTree = ""; }; 50 | C292B97118C4299400B0440C /* order_drag_move_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = order_drag_move_bg.png; sourceTree = ""; }; 51 | C292B97218C4299400B0440C /* OrderButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderButton.h; sourceTree = ""; }; 52 | C292B97318C4299400B0440C /* OrderButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderButton.m; sourceTree = ""; }; 53 | C292B97418C4299400B0440C /* OrderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderViewController.h; sourceTree = ""; }; 54 | C292B97518C4299400B0440C /* OrderViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderViewController.m; sourceTree = ""; }; 55 | C292B97618C4299400B0440C /* topnav_orderbutton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = topnav_orderbutton.png; sourceTree = ""; }; 56 | C292B97718C4299400B0440C /* topnav_orderbutton_selected_unselected.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = topnav_orderbutton_selected_unselected.png; sourceTree = ""; }; 57 | C292B97818C4299400B0440C /* TouchView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TouchView.h; sourceTree = ""; }; 58 | C292B97918C4299400B0440C /* TouchView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TouchView.m; sourceTree = ""; }; 59 | C292B97A18C4299400B0440C /* TouchViewModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TouchViewModel.h; sourceTree = ""; }; 60 | C292B97B18C4299400B0440C /* TouchViewModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TouchViewModel.m; sourceTree = ""; }; 61 | C292B97C18C4299400B0440C /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; 62 | C292B97D18C4299400B0440C /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; 63 | C2CF1D5518BDDCDA005A582B /* ifengNewsOrderDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ifengNewsOrderDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 64 | C2CF1D5818BDDCDA005A582B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 65 | C2CF1D5A18BDDCDA005A582B /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 66 | C2CF1D5C18BDDCDA005A582B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 67 | C2CF1D6018BDDCDA005A582B /* ifengNewsOrderDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ifengNewsOrderDemo-Info.plist"; sourceTree = ""; }; 68 | C2CF1D6218BDDCDA005A582B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 69 | C2CF1D6418BDDCDA005A582B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 70 | C2CF1D6618BDDCDA005A582B /* ifengNewsOrderDemo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ifengNewsOrderDemo-Prefix.pch"; sourceTree = ""; }; 71 | C2CF1D6718BDDCDA005A582B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 72 | C2CF1D6818BDDCDA005A582B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 73 | C2CF1D6A18BDDCDA005A582B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 74 | C2CF1D7018BDDCDA005A582B /* ifengNewsOrderDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ifengNewsOrderDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 75 | C2CF1D7118BDDCDA005A582B /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 76 | C2CF1D7918BDDCDA005A582B /* ifengNewsOrderDemoTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ifengNewsOrderDemoTests-Info.plist"; sourceTree = ""; }; 77 | C2CF1D7B18BDDCDA005A582B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 78 | C2CF1D7D18BDDCDA005A582B /* ifengNewsOrderDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ifengNewsOrderDemoTests.m; sourceTree = ""; }; 79 | /* End PBXFileReference section */ 80 | 81 | /* Begin PBXFrameworksBuildPhase section */ 82 | C2CF1D5218BDDCDA005A582B /* Frameworks */ = { 83 | isa = PBXFrameworksBuildPhase; 84 | buildActionMask = 2147483647; 85 | files = ( 86 | C2CF1D5B18BDDCDA005A582B /* CoreGraphics.framework in Frameworks */, 87 | C2CF1D5D18BDDCDA005A582B /* UIKit.framework in Frameworks */, 88 | C2CF1D5918BDDCDA005A582B /* Foundation.framework in Frameworks */, 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | C2CF1D6D18BDDCDA005A582B /* Frameworks */ = { 93 | isa = PBXFrameworksBuildPhase; 94 | buildActionMask = 2147483647; 95 | files = ( 96 | C2CF1D7218BDDCDA005A582B /* XCTest.framework in Frameworks */, 97 | C2CF1D7418BDDCDA005A582B /* UIKit.framework in Frameworks */, 98 | C2CF1D7318BDDCDA005A582B /* Foundation.framework in Frameworks */, 99 | ); 100 | runOnlyForDeploymentPostprocessing = 0; 101 | }; 102 | /* End PBXFrameworksBuildPhase section */ 103 | 104 | /* Begin PBXGroup section */ 105 | C292B96C18C4299400B0440C /* OrderButton */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | C292B96D18C4299400B0440C /* Header.h */, 109 | C292B97218C4299400B0440C /* OrderButton.h */, 110 | C292B97318C4299400B0440C /* OrderButton.m */, 111 | C292B97418C4299400B0440C /* OrderViewController.h */, 112 | C292B97518C4299400B0440C /* OrderViewController.m */, 113 | C292B97818C4299400B0440C /* TouchView.h */, 114 | C292B97918C4299400B0440C /* TouchView.m */, 115 | C292B97A18C4299400B0440C /* TouchViewModel.h */, 116 | C292B97B18C4299400B0440C /* TouchViewModel.m */, 117 | C292B96E18C4299400B0440C /* order_back.png */, 118 | C292B96F18C4299400B0440C /* order_back_select.png */, 119 | C292B97018C4299400B0440C /* order_background.png */, 120 | C292B97118C4299400B0440C /* order_drag_move_bg.png */, 121 | C292B97618C4299400B0440C /* topnav_orderbutton.png */, 122 | C292B97718C4299400B0440C /* topnav_orderbutton_selected_unselected.png */, 123 | ); 124 | path = OrderButton; 125 | sourceTree = ""; 126 | }; 127 | C2CF1D4C18BDDCDA005A582B = { 128 | isa = PBXGroup; 129 | children = ( 130 | C2CF1D5E18BDDCDA005A582B /* ifengNewsOrderDemo */, 131 | C2CF1D7718BDDCDA005A582B /* ifengNewsOrderDemoTests */, 132 | C2CF1D5718BDDCDA005A582B /* Frameworks */, 133 | C2CF1D5618BDDCDA005A582B /* Products */, 134 | ); 135 | sourceTree = ""; 136 | }; 137 | C2CF1D5618BDDCDA005A582B /* Products */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | C2CF1D5518BDDCDA005A582B /* ifengNewsOrderDemo.app */, 141 | C2CF1D7018BDDCDA005A582B /* ifengNewsOrderDemoTests.xctest */, 142 | ); 143 | name = Products; 144 | sourceTree = ""; 145 | }; 146 | C2CF1D5718BDDCDA005A582B /* Frameworks */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | C2CF1D5818BDDCDA005A582B /* Foundation.framework */, 150 | C2CF1D5A18BDDCDA005A582B /* CoreGraphics.framework */, 151 | C2CF1D5C18BDDCDA005A582B /* UIKit.framework */, 152 | C2CF1D7118BDDCDA005A582B /* XCTest.framework */, 153 | ); 154 | name = Frameworks; 155 | sourceTree = ""; 156 | }; 157 | C2CF1D5E18BDDCDA005A582B /* ifengNewsOrderDemo */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | C2CF1D6718BDDCDA005A582B /* AppDelegate.h */, 161 | C2CF1D6818BDDCDA005A582B /* AppDelegate.m */, 162 | C292B97C18C4299400B0440C /* RootViewController.h */, 163 | C292B97D18C4299400B0440C /* RootViewController.m */, 164 | C292B96C18C4299400B0440C /* OrderButton */, 165 | C2CF1D6A18BDDCDA005A582B /* Images.xcassets */, 166 | C2CF1D5F18BDDCDA005A582B /* Supporting Files */, 167 | ); 168 | path = ifengNewsOrderDemo; 169 | sourceTree = ""; 170 | }; 171 | C2CF1D5F18BDDCDA005A582B /* Supporting Files */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | C2CF1D6018BDDCDA005A582B /* ifengNewsOrderDemo-Info.plist */, 175 | C2CF1D6118BDDCDA005A582B /* InfoPlist.strings */, 176 | C2CF1D6418BDDCDA005A582B /* main.m */, 177 | C2CF1D6618BDDCDA005A582B /* ifengNewsOrderDemo-Prefix.pch */, 178 | ); 179 | name = "Supporting Files"; 180 | sourceTree = ""; 181 | }; 182 | C2CF1D7718BDDCDA005A582B /* ifengNewsOrderDemoTests */ = { 183 | isa = PBXGroup; 184 | children = ( 185 | C2CF1D7D18BDDCDA005A582B /* ifengNewsOrderDemoTests.m */, 186 | C2CF1D7818BDDCDA005A582B /* Supporting Files */, 187 | ); 188 | path = ifengNewsOrderDemoTests; 189 | sourceTree = ""; 190 | }; 191 | C2CF1D7818BDDCDA005A582B /* Supporting Files */ = { 192 | isa = PBXGroup; 193 | children = ( 194 | C2CF1D7918BDDCDA005A582B /* ifengNewsOrderDemoTests-Info.plist */, 195 | C2CF1D7A18BDDCDA005A582B /* InfoPlist.strings */, 196 | ); 197 | name = "Supporting Files"; 198 | sourceTree = ""; 199 | }; 200 | /* End PBXGroup section */ 201 | 202 | /* Begin PBXNativeTarget section */ 203 | C2CF1D5418BDDCDA005A582B /* ifengNewsOrderDemo */ = { 204 | isa = PBXNativeTarget; 205 | buildConfigurationList = C2CF1D8118BDDCDA005A582B /* Build configuration list for PBXNativeTarget "ifengNewsOrderDemo" */; 206 | buildPhases = ( 207 | C2CF1D5118BDDCDA005A582B /* Sources */, 208 | C2CF1D5218BDDCDA005A582B /* Frameworks */, 209 | C2CF1D5318BDDCDA005A582B /* Resources */, 210 | ); 211 | buildRules = ( 212 | ); 213 | dependencies = ( 214 | ); 215 | name = ifengNewsOrderDemo; 216 | productName = ifengNewsOrderDemo; 217 | productReference = C2CF1D5518BDDCDA005A582B /* ifengNewsOrderDemo.app */; 218 | productType = "com.apple.product-type.application"; 219 | }; 220 | C2CF1D6F18BDDCDA005A582B /* ifengNewsOrderDemoTests */ = { 221 | isa = PBXNativeTarget; 222 | buildConfigurationList = C2CF1D8418BDDCDA005A582B /* Build configuration list for PBXNativeTarget "ifengNewsOrderDemoTests" */; 223 | buildPhases = ( 224 | C2CF1D6C18BDDCDA005A582B /* Sources */, 225 | C2CF1D6D18BDDCDA005A582B /* Frameworks */, 226 | C2CF1D6E18BDDCDA005A582B /* Resources */, 227 | ); 228 | buildRules = ( 229 | ); 230 | dependencies = ( 231 | C2CF1D7618BDDCDA005A582B /* PBXTargetDependency */, 232 | ); 233 | name = ifengNewsOrderDemoTests; 234 | productName = ifengNewsOrderDemoTests; 235 | productReference = C2CF1D7018BDDCDA005A582B /* ifengNewsOrderDemoTests.xctest */; 236 | productType = "com.apple.product-type.bundle.unit-test"; 237 | }; 238 | /* End PBXNativeTarget section */ 239 | 240 | /* Begin PBXProject section */ 241 | C2CF1D4D18BDDCDA005A582B /* Project object */ = { 242 | isa = PBXProject; 243 | attributes = { 244 | LastUpgradeCheck = 0500; 245 | ORGANIZATIONNAME = lanou3g; 246 | TargetAttributes = { 247 | C2CF1D6F18BDDCDA005A582B = { 248 | TestTargetID = C2CF1D5418BDDCDA005A582B; 249 | }; 250 | }; 251 | }; 252 | buildConfigurationList = C2CF1D5018BDDCDA005A582B /* Build configuration list for PBXProject "ifengNewsOrderDemo" */; 253 | compatibilityVersion = "Xcode 3.2"; 254 | developmentRegion = English; 255 | hasScannedForEncodings = 0; 256 | knownRegions = ( 257 | en, 258 | ); 259 | mainGroup = C2CF1D4C18BDDCDA005A582B; 260 | productRefGroup = C2CF1D5618BDDCDA005A582B /* Products */; 261 | projectDirPath = ""; 262 | projectRoot = ""; 263 | targets = ( 264 | C2CF1D5418BDDCDA005A582B /* ifengNewsOrderDemo */, 265 | C2CF1D6F18BDDCDA005A582B /* ifengNewsOrderDemoTests */, 266 | ); 267 | }; 268 | /* End PBXProject section */ 269 | 270 | /* Begin PBXResourcesBuildPhase section */ 271 | C2CF1D5318BDDCDA005A582B /* Resources */ = { 272 | isa = PBXResourcesBuildPhase; 273 | buildActionMask = 2147483647; 274 | files = ( 275 | C292B98118C4299400B0440C /* order_drag_move_bg.png in Resources */, 276 | C2CF1D6318BDDCDA005A582B /* InfoPlist.strings in Resources */, 277 | C292B97E18C4299400B0440C /* order_back.png in Resources */, 278 | C2CF1D6B18BDDCDA005A582B /* Images.xcassets in Resources */, 279 | C292B97F18C4299400B0440C /* order_back_select.png in Resources */, 280 | C292B98018C4299400B0440C /* order_background.png in Resources */, 281 | C292B98418C4299400B0440C /* topnav_orderbutton.png in Resources */, 282 | C292B98518C4299400B0440C /* topnav_orderbutton_selected_unselected.png in Resources */, 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | C2CF1D6E18BDDCDA005A582B /* Resources */ = { 287 | isa = PBXResourcesBuildPhase; 288 | buildActionMask = 2147483647; 289 | files = ( 290 | C2CF1D7C18BDDCDA005A582B /* InfoPlist.strings in Resources */, 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | }; 294 | /* End PBXResourcesBuildPhase section */ 295 | 296 | /* Begin PBXSourcesBuildPhase section */ 297 | C2CF1D5118BDDCDA005A582B /* Sources */ = { 298 | isa = PBXSourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | C292B98618C4299400B0440C /* TouchView.m in Sources */, 302 | C292B98818C4299400B0440C /* RootViewController.m in Sources */, 303 | C2CF1D6918BDDCDA005A582B /* AppDelegate.m in Sources */, 304 | C2CF1D6518BDDCDA005A582B /* main.m in Sources */, 305 | C292B98218C4299400B0440C /* OrderButton.m in Sources */, 306 | C292B98718C4299400B0440C /* TouchViewModel.m in Sources */, 307 | C292B98318C4299400B0440C /* OrderViewController.m in Sources */, 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | }; 311 | C2CF1D6C18BDDCDA005A582B /* Sources */ = { 312 | isa = PBXSourcesBuildPhase; 313 | buildActionMask = 2147483647; 314 | files = ( 315 | C2CF1D7E18BDDCDA005A582B /* ifengNewsOrderDemoTests.m in Sources */, 316 | ); 317 | runOnlyForDeploymentPostprocessing = 0; 318 | }; 319 | /* End PBXSourcesBuildPhase section */ 320 | 321 | /* Begin PBXTargetDependency section */ 322 | C2CF1D7618BDDCDA005A582B /* PBXTargetDependency */ = { 323 | isa = PBXTargetDependency; 324 | target = C2CF1D5418BDDCDA005A582B /* ifengNewsOrderDemo */; 325 | targetProxy = C2CF1D7518BDDCDA005A582B /* PBXContainerItemProxy */; 326 | }; 327 | /* End PBXTargetDependency section */ 328 | 329 | /* Begin PBXVariantGroup section */ 330 | C2CF1D6118BDDCDA005A582B /* InfoPlist.strings */ = { 331 | isa = PBXVariantGroup; 332 | children = ( 333 | C2CF1D6218BDDCDA005A582B /* en */, 334 | ); 335 | name = InfoPlist.strings; 336 | sourceTree = ""; 337 | }; 338 | C2CF1D7A18BDDCDA005A582B /* InfoPlist.strings */ = { 339 | isa = PBXVariantGroup; 340 | children = ( 341 | C2CF1D7B18BDDCDA005A582B /* en */, 342 | ); 343 | name = InfoPlist.strings; 344 | sourceTree = ""; 345 | }; 346 | /* End PBXVariantGroup section */ 347 | 348 | /* Begin XCBuildConfiguration section */ 349 | C2CF1D7F18BDDCDA005A582B /* Debug */ = { 350 | isa = XCBuildConfiguration; 351 | buildSettings = { 352 | ALWAYS_SEARCH_USER_PATHS = NO; 353 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 354 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 355 | CLANG_CXX_LIBRARY = "libc++"; 356 | CLANG_ENABLE_MODULES = YES; 357 | CLANG_ENABLE_OBJC_ARC = YES; 358 | CLANG_WARN_BOOL_CONVERSION = YES; 359 | CLANG_WARN_CONSTANT_CONVERSION = YES; 360 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 361 | CLANG_WARN_EMPTY_BODY = YES; 362 | CLANG_WARN_ENUM_CONVERSION = YES; 363 | CLANG_WARN_INT_CONVERSION = YES; 364 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 365 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 366 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 367 | COPY_PHASE_STRIP = NO; 368 | GCC_C_LANGUAGE_STANDARD = gnu99; 369 | GCC_DYNAMIC_NO_PIC = NO; 370 | GCC_OPTIMIZATION_LEVEL = 0; 371 | GCC_PREPROCESSOR_DEFINITIONS = ( 372 | "DEBUG=1", 373 | "$(inherited)", 374 | ); 375 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 378 | GCC_WARN_UNDECLARED_SELECTOR = YES; 379 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 380 | GCC_WARN_UNUSED_FUNCTION = YES; 381 | GCC_WARN_UNUSED_VARIABLE = YES; 382 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 383 | ONLY_ACTIVE_ARCH = YES; 384 | SDKROOT = iphoneos; 385 | TARGETED_DEVICE_FAMILY = "1,2"; 386 | }; 387 | name = Debug; 388 | }; 389 | C2CF1D8018BDDCDA005A582B /* Release */ = { 390 | isa = XCBuildConfiguration; 391 | buildSettings = { 392 | ALWAYS_SEARCH_USER_PATHS = NO; 393 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 394 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 395 | CLANG_CXX_LIBRARY = "libc++"; 396 | CLANG_ENABLE_MODULES = YES; 397 | CLANG_ENABLE_OBJC_ARC = YES; 398 | CLANG_WARN_BOOL_CONVERSION = YES; 399 | CLANG_WARN_CONSTANT_CONVERSION = YES; 400 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 401 | CLANG_WARN_EMPTY_BODY = YES; 402 | CLANG_WARN_ENUM_CONVERSION = YES; 403 | CLANG_WARN_INT_CONVERSION = YES; 404 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 405 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 406 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 407 | COPY_PHASE_STRIP = YES; 408 | ENABLE_NS_ASSERTIONS = NO; 409 | GCC_C_LANGUAGE_STANDARD = gnu99; 410 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 411 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 412 | GCC_WARN_UNDECLARED_SELECTOR = YES; 413 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 414 | GCC_WARN_UNUSED_FUNCTION = YES; 415 | GCC_WARN_UNUSED_VARIABLE = YES; 416 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 417 | SDKROOT = iphoneos; 418 | TARGETED_DEVICE_FAMILY = "1,2"; 419 | VALIDATE_PRODUCT = YES; 420 | }; 421 | name = Release; 422 | }; 423 | C2CF1D8218BDDCDA005A582B /* Debug */ = { 424 | isa = XCBuildConfiguration; 425 | buildSettings = { 426 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 427 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 428 | CLANG_ENABLE_OBJC_ARC = NO; 429 | CODE_SIGN_IDENTITY = "iPhone Developer"; 430 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 431 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 432 | GCC_PREFIX_HEADER = "ifengNewsOrderDemo/ifengNewsOrderDemo-Prefix.pch"; 433 | INFOPLIST_FILE = "ifengNewsOrderDemo/ifengNewsOrderDemo-Info.plist"; 434 | PRODUCT_NAME = "$(TARGET_NAME)"; 435 | PROVISIONING_PROFILE = ""; 436 | WRAPPER_EXTENSION = app; 437 | }; 438 | name = Debug; 439 | }; 440 | C2CF1D8318BDDCDA005A582B /* Release */ = { 441 | isa = XCBuildConfiguration; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 445 | CLANG_ENABLE_OBJC_ARC = NO; 446 | CODE_SIGN_IDENTITY = "iPhone Developer"; 447 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 448 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 449 | GCC_PREFIX_HEADER = "ifengNewsOrderDemo/ifengNewsOrderDemo-Prefix.pch"; 450 | INFOPLIST_FILE = "ifengNewsOrderDemo/ifengNewsOrderDemo-Info.plist"; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | PROVISIONING_PROFILE = ""; 453 | WRAPPER_EXTENSION = app; 454 | }; 455 | name = Release; 456 | }; 457 | C2CF1D8518BDDCDA005A582B /* Debug */ = { 458 | isa = XCBuildConfiguration; 459 | buildSettings = { 460 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 461 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/ifengNewsOrderDemo.app/ifengNewsOrderDemo"; 462 | FRAMEWORK_SEARCH_PATHS = ( 463 | "$(SDKROOT)/Developer/Library/Frameworks", 464 | "$(inherited)", 465 | "$(DEVELOPER_FRAMEWORKS_DIR)", 466 | ); 467 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 468 | GCC_PREFIX_HEADER = "ifengNewsOrderDemo/ifengNewsOrderDemo-Prefix.pch"; 469 | GCC_PREPROCESSOR_DEFINITIONS = ( 470 | "DEBUG=1", 471 | "$(inherited)", 472 | ); 473 | INFOPLIST_FILE = "ifengNewsOrderDemoTests/ifengNewsOrderDemoTests-Info.plist"; 474 | PRODUCT_NAME = "$(TARGET_NAME)"; 475 | TEST_HOST = "$(BUNDLE_LOADER)"; 476 | WRAPPER_EXTENSION = xctest; 477 | }; 478 | name = Debug; 479 | }; 480 | C2CF1D8618BDDCDA005A582B /* Release */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; 484 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/ifengNewsOrderDemo.app/ifengNewsOrderDemo"; 485 | FRAMEWORK_SEARCH_PATHS = ( 486 | "$(SDKROOT)/Developer/Library/Frameworks", 487 | "$(inherited)", 488 | "$(DEVELOPER_FRAMEWORKS_DIR)", 489 | ); 490 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 491 | GCC_PREFIX_HEADER = "ifengNewsOrderDemo/ifengNewsOrderDemo-Prefix.pch"; 492 | INFOPLIST_FILE = "ifengNewsOrderDemoTests/ifengNewsOrderDemoTests-Info.plist"; 493 | PRODUCT_NAME = "$(TARGET_NAME)"; 494 | TEST_HOST = "$(BUNDLE_LOADER)"; 495 | WRAPPER_EXTENSION = xctest; 496 | }; 497 | name = Release; 498 | }; 499 | /* End XCBuildConfiguration section */ 500 | 501 | /* Begin XCConfigurationList section */ 502 | C2CF1D5018BDDCDA005A582B /* Build configuration list for PBXProject "ifengNewsOrderDemo" */ = { 503 | isa = XCConfigurationList; 504 | buildConfigurations = ( 505 | C2CF1D7F18BDDCDA005A582B /* Debug */, 506 | C2CF1D8018BDDCDA005A582B /* Release */, 507 | ); 508 | defaultConfigurationIsVisible = 0; 509 | defaultConfigurationName = Release; 510 | }; 511 | C2CF1D8118BDDCDA005A582B /* Build configuration list for PBXNativeTarget "ifengNewsOrderDemo" */ = { 512 | isa = XCConfigurationList; 513 | buildConfigurations = ( 514 | C2CF1D8218BDDCDA005A582B /* Debug */, 515 | C2CF1D8318BDDCDA005A582B /* Release */, 516 | ); 517 | defaultConfigurationIsVisible = 0; 518 | defaultConfigurationName = Release; 519 | }; 520 | C2CF1D8418BDDCDA005A582B /* Build configuration list for PBXNativeTarget "ifengNewsOrderDemoTests" */ = { 521 | isa = XCConfigurationList; 522 | buildConfigurations = ( 523 | C2CF1D8518BDDCDA005A582B /* Debug */, 524 | C2CF1D8618BDDCDA005A582B /* Release */, 525 | ); 526 | defaultConfigurationIsVisible = 0; 527 | defaultConfigurationName = Release; 528 | }; 529 | /* End XCConfigurationList section */ 530 | }; 531 | rootObject = C2CF1D4D18BDDCDA005A582B /* Project object */; 532 | } 533 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo.xcodeproj/project.xcworkspace/xcshareddata/ifengNewsOrderDemo.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | CA43791F-6488-4297-93FD-B99C9C7B212F 9 | IDESourceControlProjectName 10 | ifengNewsOrderDemo 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 5BCFDD9CCC6C6A405BC81BEBA81CC4A495C3A24D 14 | https://github.com/ppt04025/ifengNewsOrderDemo.git 15 | 16 | IDESourceControlProjectPath 17 | ifengNewsOrderDemo.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 5BCFDD9CCC6C6A405BC81BEBA81CC4A495C3A24D 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/ppt04025/ifengNewsOrderDemo.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 5BCFDD9CCC6C6A405BC81BEBA81CC4A495C3A24D 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 5BCFDD9CCC6C6A405BC81BEBA81CC4A495C3A24D 36 | IDESourceControlWCCName 37 | ifengNewsOrderDemo 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo.xcodeproj/project.xcworkspace/xcuserdata/zer0.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppt04025/ifengNewsOrderDemo/816141591255f47fca3a905ed188f57fc31d1a8c/ifengNewsOrderDemo.xcodeproj/project.xcworkspace/xcuserdata/zer0.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /ifengNewsOrderDemo.xcodeproj/project.xcworkspace/xcuserdata/zer0.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo.xcodeproj/xcshareddata/xcschemes/ifengNewsOrderDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo.xcodeproj/xcuserdata/lanou3g.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 18 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo.xcodeproj/xcuserdata/lanou3g.xcuserdatad/xcschemes/ifengNewsOrderDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 75 | 76 | 77 | 78 | 84 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo.xcodeproj/xcuserdata/lanou3g.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ifengNewsOrderDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C2CF1D5418BDDCDA005A582B 16 | 17 | primary 18 | 19 | 20 | C2CF1D6F18BDDCDA005A582B 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo.xcodeproj/xcuserdata/zer0.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ifengNewsOrderDemo.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | C2CF1D5418BDDCDA005A582B 16 | 17 | primary 18 | 19 | 20 | C2CF1D6F18BDDCDA005A582B 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-26. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-26. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "RootViewController.h" 11 | 12 | 13 | @implementation AppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 18 | // Override point for customization after application launch. 19 | self.window.backgroundColor = [UIColor whiteColor]; 20 | RootViewController * root = [[RootViewController alloc] init]; 21 | [self.window setRootViewController:root]; 22 | [root release]; 23 | 24 | 25 | // NSString * string = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; 26 | // NSString * filePath = [string stringByAppendingString:@"/modelArray0.swh"]; 27 | // NSString * filePath1 = [string stringByAppendingString:@"/modelArray1.swh"]; 28 | // [[NSFileManager defaultManager] removeItemAtPath:filePath error:nil]; 29 | // [[NSFileManager defaultManager] removeItemAtPath:filePath1 error:nil]; 30 | // 31 | //如自己定制频道列表和接口须仅在首次运行时解注上面5行代码 32 | // 33 | 34 | 35 | [self.window makeKeyAndVisible]; 36 | return YES; 37 | } 38 | 39 | - (void)applicationWillResignActive:(UIApplication *)application 40 | { 41 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 42 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 43 | } 44 | 45 | - (void)applicationDidEnterBackground:(UIApplication *)application 46 | { 47 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 48 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 49 | } 50 | 51 | - (void)applicationWillEnterForeground:(UIApplication *)application 52 | { 53 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 54 | } 55 | 56 | - (void)applicationDidBecomeActive:(UIApplication *)application 57 | { 58 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 59 | } 60 | 61 | - (void)applicationWillTerminate:(UIApplication *)application 62 | { 63 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /ifengNewsOrderDemo/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Header.h 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-26. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #ifndef ifengNewsOrderDemo_Header_h 10 | #define ifengNewsOrderDemo_Header_h 11 | #define KOrderButtonFrameOriginX 257.0 12 | #define KOrderButtonFrameOriginY 20 13 | #define KOrderButtonFrameSizeX 63 14 | #define KOrderButtonFrameSizeY 45 15 | //以上是OrderButton的frame值 16 | #define KOrderButtonImage @"topnav_orderbutton.png" 17 | #define KOrderButtonImageSelected @"topnav_orderbutton_selected_unselected.png" 18 | //以上是OrderButton的背景图片 19 | #define KDefaultCountOfUpsideList 10 20 | //默认订阅频道数 21 | #define KTableStartPointX 25 22 | #define KTableStartPointY 60 23 | //已订阅的按钮起始的位置 24 | #define KButtonWidth 54 25 | #define KButtonHeight 40 26 | //按钮的大小 27 | #define KDeltaHeight 40 28 | //更多频道下面按钮的起始位置向下偏移 29 | #define KMoreChannelDeltaHeight 62 30 | //更多频道起始Y坐标向下偏移 31 | 32 | 33 | #define KChannelList @"头条",@"娱乐",@"健康",@"星座",@"社会",@"佛教",@"时事",@"时尚",@"军事",@"旅游",@"房产",@"汽车",@"港澳",@"教育",@"历史",@"文化",@"财经",@"读书",@"台湾",@"体育",@"科技",@"评论" 34 | #define KChannelUrlStringList @"http://api.3g.ifeng.com/iosNews?id=aid=SYLB10&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=YL53&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=JK36&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=XZ09&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=SH133&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=FJ31&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=XW23&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=SS78&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=JS83&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=LY67&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=FC81&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=QC45&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=GA18&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=JY90&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=LS153&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=WH25&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=CJ33&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=DS57&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=TW73&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=TY43,FOCUSTY43&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=KJ123&imgwidth=100&type=list&pagesize=20",@"http://api.3g.ifeng.com/iosNews?id=aid=PL40&imgwidth=100&type=list&pagesize=20" 35 | //频道名称和对应的请求接口 36 | #endif 37 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/OrderButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // OrderButton.h 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-27. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface OrderButton : UIButton 12 | 13 | @property (nonatomic,retain) UIViewController * vc; 14 | @property (nonatomic,retain) NSArray * titleArr; 15 | @property (nonatomic,retain) NSArray * urlStringArr; 16 | 17 | + (id)orderButtonWithViewController:(UIViewController *)vc titleArr:(NSArray *)titleArr urlStringArr:(NSArray *)urlStringArr; 18 | @end 19 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/OrderButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // OrderButton.m 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-27. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import "OrderButton.h" 10 | #import "OrderViewController.h" 11 | #import "RootViewController.h" 12 | 13 | @implementation OrderButton 14 | 15 | - (id)initWithFrame:(CGRect)frame 16 | { 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | // Initialization code 20 | } 21 | return self; 22 | } 23 | + (id)orderButtonWithViewController:(UIViewController *)vc titleArr:(NSArray *)titleArr urlStringArr:(NSArray *)urlStringArr{ 24 | OrderButton * orderButton = [OrderButton buttonWithType:UIButtonTypeCustom]; 25 | [orderButton setVc:vc]; 26 | [orderButton setTitleArr:titleArr]; 27 | [orderButton setUrlStringArr:urlStringArr]; 28 | [orderButton setImage:[UIImage imageNamed:KOrderButtonImage] forState:UIControlStateNormal]; 29 | [orderButton setImage:[UIImage imageNamed:KOrderButtonImageSelected] forState:UIControlStateHighlighted]; 30 | [orderButton setFrame:CGRectMake(KOrderButtonFrameOriginX, KOrderButtonFrameOriginY, KOrderButtonFrameSizeX, KOrderButtonFrameSizeY)]; 31 | 32 | return orderButton; 33 | 34 | } 35 | 36 | 37 | - (void)dealloc 38 | { 39 | [_vc release]; 40 | [_titleArr release]; 41 | [_urlStringArr release]; 42 | [super dealloc]; 43 | } 44 | /* 45 | // Only override drawRect: if you perform custom drawing. 46 | // An empty implementation adversely affects performance during animation. 47 | - (void)drawRect:(CGRect)rect 48 | { 49 | // Drawing code 50 | } 51 | */ 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/OrderViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // OrderViewController.h 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-27. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface OrderViewController : UIViewController 12 | { 13 | @public 14 | NSArray * _modelArr1; 15 | NSMutableArray * _viewArr1; 16 | NSMutableArray * _viewArr2; 17 | } 18 | 19 | @property (nonatomic,retain)UILabel * titleLabel; 20 | @property (nonatomic,retain)UILabel * titleLabel2; 21 | @property (nonatomic,retain)NSArray * titleArr; 22 | @property (nonatomic,retain)NSArray * urlStringArr; 23 | @property (nonatomic,retain)UIButton * backButton; 24 | @end 25 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/OrderViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // OrderViewController.m 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-27. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import "OrderViewController.h" 10 | #import "TouchViewModel.h" 11 | #import "TouchView.h" 12 | 13 | 14 | @interface OrderViewController () 15 | 16 | @end 17 | 18 | @implementation OrderViewController 19 | 20 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 21 | { 22 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 23 | if (self) { 24 | // Custom initialization 25 | } 26 | return self; 27 | } 28 | 29 | - (void)viewDidLoad 30 | { 31 | [super viewDidLoad]; 32 | // Do any additional setup after loading the view. 33 | 34 | NSString * string = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; 35 | NSString * filePath = [string stringByAppendingString:@"/modelArray0.swh"]; 36 | NSString * filePath1 = [string stringByAppendingString:@"/modelArray1.swh"]; 37 | 38 | 39 | if (![[NSFileManager defaultManager] fileExistsAtPath:filePath]) { 40 | NSArray * channelListArr = self.titleArr; 41 | NSArray * channelUrlStringListArr = self.urlStringArr; 42 | NSMutableArray * mutArr = [NSMutableArray array]; 43 | for (int i = 0; i < [channelListArr count]; i++) { 44 | NSString * title = [channelListArr objectAtIndex:i]; 45 | NSString * urlString = [channelUrlStringListArr objectAtIndex:i]; 46 | TouchViewModel * touchViewModel = [[TouchViewModel alloc] initWithTitle:title urlString:urlString]; 47 | [mutArr addObject:touchViewModel]; 48 | [touchViewModel release]; 49 | if (i == KDefaultCountOfUpsideList - 1) { 50 | NSData * data = [NSKeyedArchiver archivedDataWithRootObject:mutArr]; 51 | [data writeToFile:filePath atomically:YES]; 52 | [mutArr removeAllObjects]; 53 | } 54 | else if(i == [channelListArr count] - 1){ 55 | NSData * data = [NSKeyedArchiver archivedDataWithRootObject:mutArr]; 56 | [data writeToFile:filePath1 atomically:YES]; 57 | } 58 | 59 | } 60 | } 61 | 62 | _modelArr1 = [NSKeyedUnarchiver unarchiveObjectWithFile:filePath]; 63 | NSArray * modelArr2 = [NSKeyedUnarchiver unarchiveObjectWithFile:filePath1]; 64 | _viewArr1 = [[NSMutableArray alloc] init]; 65 | _viewArr2 = [[NSMutableArray alloc] init]; 66 | 67 | 68 | 69 | 70 | 71 | _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(110, 25, 100, 40)]; 72 | _titleLabel.text = @"我的订阅"; 73 | [_titleLabel setTextAlignment:NSTextAlignmentCenter]; 74 | [_titleLabel setTextColor:[UIColor colorWithRed:187/255.0 green:1/255.0 blue:1/255.0 alpha:1.0]]; 75 | [self.view addSubview:_titleLabel]; 76 | 77 | 78 | 79 | _titleLabel2 = [[UILabel alloc] initWithFrame:CGRectMake(110, KTableStartPointY + KButtonHeight * ([self array2StartY] - 1) + KMoreChannelDeltaHeight, 100, 20)]; 80 | _titleLabel2.text = @"更多频道"; 81 | [_titleLabel2 setFont:[UIFont systemFontOfSize:10]]; 82 | [_titleLabel2 setTextAlignment:NSTextAlignmentCenter]; 83 | [_titleLabel2 setTextColor:[UIColor grayColor]]; 84 | [self.view addSubview:_titleLabel2]; 85 | 86 | 87 | for (int i = 0; i < _modelArr1.count; i++) { 88 | TouchView * touchView = [[TouchView alloc] initWithFrame:CGRectMake(KTableStartPointX + KButtonWidth * (i%5), KTableStartPointY + KButtonHeight * (i/5), KButtonWidth, KButtonHeight)]; 89 | [touchView setBackgroundColor:[UIColor colorWithRed:210/255.0 green:210/255.0 blue:210/255.0 alpha:1.0]]; 90 | 91 | [_viewArr1 addObject:touchView]; 92 | [touchView release]; 93 | touchView->_array = _viewArr1; 94 | if (i == 0) { 95 | [touchView.label setTextColor:[UIColor colorWithRed:187/255.0 green:1/255.0 blue:1/255.0 alpha:1.0]]; 96 | } 97 | else{ 98 | 99 | [touchView.label setTextColor:[UIColor colorWithRed:99/255.0 green:99/255.0 blue:99/255.0 alpha:1.0]]; 100 | } 101 | touchView.label.text = [[_modelArr1 objectAtIndex:i] title]; 102 | [touchView.label setTextAlignment:NSTextAlignmentCenter]; 103 | [touchView setMoreChannelsLabel:_titleLabel2]; 104 | touchView->_viewArr11 = _viewArr1; 105 | touchView->_viewArr22 = _viewArr2; 106 | [touchView setTouchViewModel:[_modelArr1 objectAtIndex:i]]; 107 | 108 | [self.view addSubview:touchView]; 109 | } 110 | 111 | for (int i = 0; i < modelArr2.count; i++) { 112 | TouchView * touchView = [[TouchView alloc] initWithFrame:CGRectMake(KTableStartPointX + KButtonWidth * (i%5), KTableStartPointY + KDeltaHeight + [self array2StartY] * KButtonHeight + KButtonHeight * (i/5) , KButtonWidth, KButtonHeight)]; 113 | 114 | [touchView setBackgroundColor:[UIColor colorWithRed:210/255.0 green:210/255.0 blue:210/255.0 alpha:1.0]]; 115 | 116 | [_viewArr2 addObject:touchView]; 117 | touchView->_array = _viewArr2; 118 | 119 | touchView.label.text = [[modelArr2 objectAtIndex:i] title]; 120 | [touchView.label setTextColor:[UIColor colorWithRed:99/255.0 green:99/255.0 blue:99/255.0 alpha:1.0]]; 121 | [touchView.label setTextAlignment:NSTextAlignmentCenter]; 122 | [touchView setMoreChannelsLabel:_titleLabel2]; 123 | touchView->_viewArr11 = _viewArr1; 124 | touchView->_viewArr22 = _viewArr2; 125 | [touchView setTouchViewModel:[modelArr2 objectAtIndex:i]]; 126 | 127 | [self.view addSubview:touchView]; 128 | 129 | [touchView release]; 130 | 131 | } 132 | 133 | 134 | 135 | 136 | 137 | self.backButton = [UIButton buttonWithType:UIButtonTypeCustom]; 138 | [self.backButton setFrame:CGRectMake(self.view.bounds.size.width - 56, self.view.bounds.size.height - 44, 56, 44)]; 139 | [self.backButton setImage:[UIImage imageNamed:@"order_back.png"] forState:UIControlStateNormal]; 140 | [self.backButton setImage:[UIImage imageNamed:@"order_back_select.png"] forState:UIControlStateNormal]; 141 | [self.view addSubview:self.backButton]; 142 | } 143 | 144 | - (void)dealloc{ 145 | [_backButton release]; 146 | [_titleArr release]; 147 | [_urlStringArr release]; 148 | [_titleLabel2 release]; 149 | [_titleLabel release]; 150 | [_viewArr1 release]; 151 | [_viewArr2 release]; 152 | [super dealloc]; 153 | } 154 | 155 | 156 | - (unsigned long )array2StartY{ 157 | unsigned long y = 0; 158 | 159 | y = _modelArr1.count/5 + 2; 160 | if (_modelArr1.count%5 == 0) { 161 | y -= 1; 162 | } 163 | return y; 164 | } 165 | - (void)didReceiveMemoryWarning 166 | { 167 | [super didReceiveMemoryWarning]; 168 | // Dispose of any resources that can be recreated. 169 | } 170 | 171 | @end 172 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/TouchView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TouchView.h 3 | // TouchDemo 4 | // 5 | // Created by Zer0 on 13-10-11. 6 | // Copyright (c) 2013年 Zer0. All rights reserved. 7 | // 8 | 9 | #import 10 | @class TouchViewModel; 11 | @interface TouchView : UIImageView 12 | { 13 | CGPoint _point; 14 | CGPoint _point2; 15 | NSInteger _sign; 16 | @public 17 | 18 | NSMutableArray * _array; 19 | NSMutableArray * _viewArr11; 20 | NSMutableArray * _viewArr22; 21 | } 22 | @property (nonatomic,retain) UILabel * label; 23 | @property (nonatomic,retain) UILabel * moreChannelsLabel; 24 | @property (nonatomic,retain) TouchViewModel * touchViewModel; 25 | @end 26 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/TouchView.m: -------------------------------------------------------------------------------- 1 | // 2 | // TouchView.m 3 | // TouchDemo 4 | // 5 | // Created by Zer0 on 13-8-11. 6 | // Copyright (c) 2013年 Zer0. All rights reserved. 7 | // 8 | 9 | #import "TouchView.h" 10 | 11 | @implementation TouchView 12 | - (void)dealloc 13 | { 14 | [_label release]; 15 | [_moreChannelsLabel release]; 16 | [_touchViewModel release]; 17 | [super dealloc]; 18 | } 19 | - (id)initWithFrame:(CGRect)frame 20 | { 21 | self = [super initWithFrame:frame]; 22 | if (self) { 23 | // Initialization code 24 | self.multipleTouchEnabled = YES; 25 | self.userInteractionEnabled = YES; 26 | UILabel *l = [[UILabel alloc] initWithFrame:CGRectZero]; 27 | self.label = l; 28 | [l release]; 29 | _sign = 0; 30 | 31 | } 32 | return self; 33 | } 34 | 35 | - (void)layoutSubviews{ 36 | 37 | [self.label setFrame:CGRectMake(1, 1, KButtonWidth - 2, KButtonHeight - 2)]; 38 | [self.label setBackgroundColor:[UIColor colorWithRed:239/255.0 green:239/255.0 blue:239/255.0 alpha:1.0]]; 39 | [self addSubview:self.label]; 40 | 41 | } 42 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 43 | 44 | UITouch * touch = [touches anyObject]; 45 | 46 | _point = [touch locationInView:self]; 47 | _point2 = [touch locationInView:self.superview]; 48 | 49 | [self.superview exchangeSubviewAtIndex:[self.superview.subviews indexOfObject:self] withSubviewAtIndex:[[self.superview subviews] count] - 1]; 50 | 51 | 52 | } 53 | - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event{ 54 | 55 | } 56 | 57 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ 58 | 59 | [self.label setBackgroundColor:[UIColor colorWithRed:239/255.0 green:239/255.0 blue:239/255.0 alpha:1.0]]; 60 | [self setImage:nil]; 61 | 62 | if (_sign == 0 && ![self.label.text isEqualToString:@"头条"]) { 63 | if (_array == _viewArr11) { 64 | [_viewArr11 removeObject:self]; 65 | [_viewArr22 insertObject:self atIndex:_viewArr22.count]; 66 | _array = _viewArr22; 67 | } 68 | else if (_array == _viewArr22){ 69 | [_viewArr22 removeObject:self]; 70 | [_viewArr11 insertObject:self atIndex:_viewArr11.count]; 71 | _array = _viewArr11; 72 | } 73 | 74 | } 75 | 76 | [self animationAction]; 77 | 78 | _sign = 0; 79 | 80 | } 81 | 82 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ 83 | NSLog(@"%f,%f",self.frame.origin.x,self.frame.origin.y); 84 | 85 | _sign = 1; 86 | UITouch *touch = [touches anyObject]; 87 | CGPoint point = [touch locationInView:self.superview]; 88 | if (![self.label.text isEqualToString:@"头条"]) { 89 | [self.label setBackgroundColor:[UIColor clearColor]]; 90 | [self setImage:[UIImage imageNamed:@"order_drag_move_bg.png"]]; 91 | [self setFrame:CGRectMake( point.x - _point.x, point.y - _point.y, self.frame.size.width, self.frame.size.height)]; 92 | 93 | CGFloat newX = point.x - _point.x + KButtonWidth/2; 94 | CGFloat newY = point.y - _point.y + KButtonHeight/2; 95 | 96 | if (!CGRectContainsPoint([[_viewArr11 objectAtIndex:0] frame], CGPointMake(newX, newY)) ) { 97 | 98 | if ( _array == _viewArr22) { 99 | 100 | if ([self buttonInArrayArea1:_viewArr11 Point:point]) { 101 | 102 | int index = ((int)newX - KTableStartPointX)/KButtonWidth + (5 * (((int)newY - KTableStartPointY)/KButtonHeight)); 103 | [ _array removeObject:self]; 104 | [_viewArr11 insertObject:self atIndex:index]; 105 | _array = _viewArr11; 106 | [self animationAction1a]; 107 | [self animationAction2]; 108 | } 109 | else if (newY < KTableStartPointY + KDeltaHeight + [self array2StartY] * KButtonHeight &&![self buttonInArrayArea1:_viewArr11 Point:point]){ 110 | 111 | [ _array removeObject:self]; 112 | [_viewArr11 insertObject:self atIndex:_viewArr11.count]; 113 | _array = _viewArr11; 114 | [self animationAction2]; 115 | 116 | } 117 | else if([self buttonInArrayArea2:_viewArr22 Point:point]){ 118 | unsigned long index = ((unsigned long )(newX) - KTableStartPointX)/KButtonWidth + (5 * (((int)(newY) - [self array2StartY] * KButtonHeight - KTableStartPointY - KDeltaHeight)/KButtonHeight)); 119 | [ _array removeObject:self]; 120 | [_viewArr22 insertObject:self atIndex:index]; 121 | [self animationAction2a]; 122 | 123 | } 124 | else if(newY > KTableStartPointY + KDeltaHeight + [self array2StartY] * KButtonHeight &&![self buttonInArrayArea2:_viewArr22 Point:point]){ 125 | [ _array removeObject:self]; 126 | [_viewArr22 insertObject:self atIndex:_viewArr22.count]; 127 | [self animationAction2a]; 128 | 129 | } 130 | } 131 | else if ( _array == _viewArr11) { 132 | if ([self buttonInArrayArea1:_viewArr11 Point:point]) { 133 | int index = ((int)newX - KTableStartPointX)/KButtonWidth + (5 * (((int)(newY) - KTableStartPointY)/KButtonHeight)); 134 | [ _array removeObject:self]; 135 | [_viewArr11 insertObject:self atIndex:index]; 136 | _array = _viewArr11; 137 | 138 | [self animationAction1a]; 139 | [self animationAction2]; 140 | } 141 | else if (newY < KTableStartPointY + KDeltaHeight + [self array2StartY] * KButtonHeight &&![self buttonInArrayArea1:_viewArr11 Point:point]){ 142 | [ _array removeObject:self]; 143 | [_viewArr11 insertObject:self atIndex: _array.count]; 144 | [self animationAction1a]; 145 | [self animationAction2]; 146 | } 147 | else if([self buttonInArrayArea2:_viewArr22 Point:point]){ 148 | unsigned long index = ((unsigned long)(newX) - KTableStartPointX)/KButtonWidth + (5 * (((int)(newY) - [self array2StartY] * KButtonHeight - KDeltaHeight - KTableStartPointY)/KButtonHeight)); 149 | [ _array removeObject:self]; 150 | [_viewArr22 insertObject:self atIndex:index]; 151 | _array = _viewArr22; 152 | [self animationAction2a]; 153 | } 154 | else if(newY > KTableStartPointY + KDeltaHeight + [self array2StartY] * KButtonHeight &&![self buttonInArrayArea2:_viewArr22 Point:point]){ 155 | [ _array removeObject:self]; 156 | [_viewArr22 insertObject:self atIndex:_viewArr22.count]; 157 | _array = _viewArr22; 158 | [self animationAction2a]; 159 | 160 | } 161 | } 162 | } 163 | } 164 | } 165 | - (void)animationAction1{ 166 | for (int i = 0; i < _viewArr11.count; i++) { 167 | [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 168 | 169 | [[_viewArr11 objectAtIndex:i] setFrame:CGRectMake(KTableStartPointX + (i%5) * KButtonWidth, KTableStartPointY + (i/5)* KButtonHeight, KButtonWidth, KButtonHeight)]; 170 | } completion:^(BOOL finished){ 171 | 172 | }]; 173 | } 174 | } 175 | - (void)animationAction1a{ 176 | for (int i = 0; i < _viewArr11.count; i++) { 177 | if ([_viewArr11 objectAtIndex:i] != self) { 178 | [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 179 | 180 | [[_viewArr11 objectAtIndex:i] setFrame:CGRectMake(KTableStartPointX + (i%5) * KButtonWidth, KTableStartPointY + (i/5)* KButtonHeight, KButtonWidth, KButtonHeight)]; 181 | } completion:^(BOOL finished){ 182 | 183 | }]; 184 | } 185 | } 186 | 187 | } 188 | - (void)animationAction2{ 189 | for (int i = 0; i < _viewArr22.count; i++) { 190 | 191 | [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 192 | 193 | [[_viewArr22 objectAtIndex:i] setFrame:CGRectMake(KTableStartPointX + (i%5) * KButtonWidth, KTableStartPointY + [self array2StartY] * KButtonHeight + KDeltaHeight + (i/5)* KButtonHeight, KButtonWidth, KButtonHeight)]; 194 | 195 | } completion:^(BOOL finished){ 196 | 197 | }]; 198 | } 199 | [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 200 | 201 | [self.moreChannelsLabel setFrame:CGRectMake(self.moreChannelsLabel.frame.origin.x, KTableStartPointY + KButtonHeight * ([self array2StartY] - 1) + KMoreChannelDeltaHeight, self.moreChannelsLabel.frame.size.width, self.moreChannelsLabel.frame.size.height)]; 202 | 203 | } completion:^(BOOL finished){ 204 | 205 | }]; 206 | } 207 | - (void)animationAction2a{ 208 | for (int i = 0; i < _viewArr22.count; i++) { 209 | if ([_viewArr22 objectAtIndex:i] != self) { 210 | 211 | [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 212 | 213 | 214 | [[_viewArr22 objectAtIndex:i] setFrame:CGRectMake(KTableStartPointX + (i%5) * KButtonWidth, KTableStartPointY + [self array2StartY] * KButtonHeight + KDeltaHeight + (i/5)* KButtonHeight, KButtonWidth, KButtonHeight)]; 215 | 216 | } completion:^(BOOL finished){ 217 | }]; 218 | } 219 | 220 | } 221 | [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 222 | 223 | [self.moreChannelsLabel setFrame:CGRectMake(self.moreChannelsLabel.frame.origin.x, KTableStartPointY + KButtonHeight * ([self array2StartY] - 1) + KMoreChannelDeltaHeight, self.moreChannelsLabel.frame.size.width, self.moreChannelsLabel.frame.size.height)]; 224 | 225 | } completion:^(BOOL finished){ 226 | 227 | }]; 228 | } 229 | - (void)animationActionLabel{ 230 | 231 | } 232 | 233 | - (void)animationAction{ 234 | for (int i = 0; i < _viewArr11.count; i++) { 235 | 236 | [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 237 | 238 | [[_viewArr11 objectAtIndex:i] setFrame:CGRectMake(KTableStartPointX + (i%5) * KButtonWidth, KTableStartPointY + (i/5)* KButtonHeight, KButtonWidth, KButtonHeight)]; 239 | } completion:^(BOOL finished){ 240 | 241 | }]; 242 | } 243 | for (int i = 0; i < _viewArr22.count; i++) { 244 | [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 245 | 246 | [[_viewArr22 objectAtIndex:i] setFrame:CGRectMake(KTableStartPointX + (i%5) * KButtonWidth, KTableStartPointY + KDeltaHeight + [self array2StartY] * KButtonHeight + (i/5)* KButtonHeight, KButtonWidth, KButtonHeight)]; 247 | 248 | } completion:^(BOOL finished){ 249 | 250 | }]; 251 | } 252 | [UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 253 | 254 | [self.moreChannelsLabel setFrame:CGRectMake(self.moreChannelsLabel.frame.origin.x, KTableStartPointY + KButtonHeight * ([self array2StartY] - 1) + KMoreChannelDeltaHeight, self.moreChannelsLabel.frame.size.width, self.moreChannelsLabel.frame.size.height)]; 255 | 256 | } completion:^(BOOL finished){ 257 | 258 | }]; 259 | 260 | } 261 | 262 | - (BOOL)buttonInArrayArea1:(NSMutableArray *)arr Point:(CGPoint)point{ 263 | CGFloat newX = point.x - _point.x + KButtonWidth/2; 264 | CGFloat newY = point.y - _point.y + KButtonHeight/2; 265 | int a = arr.count%5; 266 | unsigned long b = arr.count/5; 267 | if ((newX > KTableStartPointX && newX < KTableStartPointX + 5 * KButtonWidth && newY > KTableStartPointY && newY < KTableStartPointY + b * KButtonHeight) || (newX > KTableStartPointX && newX < KTableStartPointX + a * KButtonWidth && newY > KTableStartPointY + b * KButtonHeight && newY < KTableStartPointY + (b+1) * KButtonHeight) ) { 268 | return YES; 269 | } 270 | return NO; 271 | } 272 | - (BOOL)buttonInArrayArea2:(NSMutableArray *)arr Point:(CGPoint)point{ 273 | CGFloat newX = point.x - _point.x + KButtonWidth/2; 274 | CGFloat newY = point.y - _point.y + KButtonHeight/2; 275 | int a = arr.count%5; 276 | unsigned long b = arr.count/5; 277 | if ((newX > KTableStartPointX && newX < KTableStartPointX + 5 * KButtonWidth && newY > KTableStartPointY + KDeltaHeight + [self array2StartY] * KButtonHeight && newY < KTableStartPointY + KDeltaHeight + (b + [self array2StartY]) * KButtonHeight ) || (newX > KTableStartPointX && newX < KTableStartPointX + a * KButtonWidth && newY > KTableStartPointY + KDeltaHeight + (b + [self array2StartY]) * KButtonHeight && newY < KTableStartPointY +KDeltaHeight + (b+[self array2StartY]+1) * KButtonHeight) ) { 278 | return YES; 279 | } 280 | return NO; 281 | } 282 | - (unsigned long)array2StartY{ 283 | unsigned long y = 0; 284 | 285 | y = _viewArr11.count/5 + 2; 286 | if (_viewArr11.count%5 == 0) { 287 | y -= 1; 288 | } 289 | return y; 290 | } 291 | /* 292 | // Only override drawRect: if you perform custom drawing. 293 | // An empty implementation adversely affects performance during animation. 294 | - (void)drawRect:(CGRect)rect 295 | { 296 | // Drawing code 297 | } 298 | */ 299 | 300 | @end 301 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/TouchViewModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // TouchViewModel.h 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-27. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TouchViewModel : NSObject 12 | 13 | @property (nonatomic,retain) NSString * title; 14 | @property (nonatomic,retain) NSString * urlString; 15 | - (id)initWithTitle:(NSString *)title urlString:(NSString *)urlString; 16 | @end 17 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/TouchViewModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // TouchViewModel.m 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-27. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import "TouchViewModel.h" 10 | 11 | @implementation TouchViewModel 12 | - (void)dealloc 13 | { 14 | [_title release]; 15 | [_urlString release]; 16 | [super dealloc]; 17 | } 18 | - (void)encodeWithCoder:(NSCoder *)aCoder{ 19 | [aCoder encodeObject:self.title forKey:@"title"]; 20 | [aCoder encodeObject:self.urlString forKey:@"urlString"]; 21 | } 22 | - (id)initWithCoder:(NSCoder *)aDecoder{ 23 | self = [super init]; 24 | if (self) { 25 | self.title = [aDecoder decodeObjectForKey:@"title"]; 26 | self.urlString = [aDecoder decodeObjectForKey:@"urlString"]; 27 | } 28 | return self; 29 | } 30 | - (id)initWithTitle:(NSString *)title urlString:(NSString *)urlString{ 31 | if (self = [super init]) { 32 | self.title = title; 33 | self.urlString = urlString; 34 | } 35 | return self; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/order_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppt04025/ifengNewsOrderDemo/816141591255f47fca3a905ed188f57fc31d1a8c/ifengNewsOrderDemo/OrderButton/order_back.png -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/order_back_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppt04025/ifengNewsOrderDemo/816141591255f47fca3a905ed188f57fc31d1a8c/ifengNewsOrderDemo/OrderButton/order_back_select.png -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/order_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppt04025/ifengNewsOrderDemo/816141591255f47fca3a905ed188f57fc31d1a8c/ifengNewsOrderDemo/OrderButton/order_background.png -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/order_drag_move_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppt04025/ifengNewsOrderDemo/816141591255f47fca3a905ed188f57fc31d1a8c/ifengNewsOrderDemo/OrderButton/order_drag_move_bg.png -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/topnav_orderbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppt04025/ifengNewsOrderDemo/816141591255f47fca3a905ed188f57fc31d1a8c/ifengNewsOrderDemo/OrderButton/topnav_orderbutton.png -------------------------------------------------------------------------------- /ifengNewsOrderDemo/OrderButton/topnav_orderbutton_selected_unselected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ppt04025/ifengNewsOrderDemo/816141591255f47fca3a905ed188f57fc31d1a8c/ifengNewsOrderDemo/OrderButton/topnav_orderbutton_selected_unselected.png -------------------------------------------------------------------------------- /ifengNewsOrderDemo/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-26. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RootViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/RootViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.m 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-26. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import "RootViewController.h" 10 | #import "OrderViewController.h" 11 | #import "OrderButton.h" 12 | #import "TouchView.h" 13 | 14 | @interface RootViewController () 15 | 16 | @end 17 | 18 | @implementation RootViewController 19 | 20 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 21 | { 22 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 23 | if (self) { 24 | // Custom initialization 25 | } 26 | return self; 27 | } 28 | 29 | - (void)viewDidLoad 30 | { 31 | [super viewDidLoad]; 32 | // Do any additional setup after loading the view. 33 | 34 | 35 | OrderButton * orderButton = [OrderButton orderButtonWithViewController:self titleArr:[NSArray arrayWithObjects:KChannelList, nil] urlStringArr:[NSArray arrayWithObjects:KChannelUrlStringList, nil]]; 36 | [self.view addSubview:orderButton]; 37 | [orderButton addTarget:self action:@selector(orderViewOut:) forControlEvents:UIControlEventTouchUpInside]; 38 | 39 | } 40 | - (void)orderViewOut:(id)sender{ 41 | 42 | OrderButton * orderButton = (OrderButton *)sender; 43 | if([[orderButton.vc.view subviews] count]>1){ 44 | // [[[orderButton.vc.view subviews]objectAtIndex:1] removeFromSuperview]; 45 | NSLog(@"%@",[orderButton.vc.view subviews]); 46 | } 47 | OrderViewController * orderVC = [[[OrderViewController alloc] init] autorelease]; 48 | orderVC.titleArr = orderButton.titleArr; 49 | orderVC.urlStringArr = orderButton.urlStringArr; 50 | UIView * orderView = [orderVC view]; 51 | [orderView setFrame:CGRectMake(0, - orderButton.vc.view.bounds.size.height, orderButton.vc.view.bounds.size.width, orderButton.vc.view.bounds.size.height)]; 52 | [orderView setBackgroundColor:[UIColor colorWithRed:239/255.0 green:239/255.0 blue:239/255.0 alpha:1.0]]; 53 | [orderVC.backButton addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; 54 | 55 | [self.view addSubview:orderView]; 56 | [self addChildViewController:orderVC]; 57 | [UIView animateWithDuration:0.5 delay:0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 58 | [orderView setFrame:CGRectMake(0, 0, orderButton.vc.view.bounds.size.width, orderButton.vc.view.bounds.size.height)]; 59 | 60 | } completion:^(BOOL finished){ 61 | 62 | }]; 63 | 64 | } 65 | 66 | 67 | - (void)backAction{ 68 | OrderViewController * orderVC = [self.childViewControllers objectAtIndex:0]; 69 | [UIView animateWithDuration:0.5 delay:0 options:UIViewAnimationOptionLayoutSubviews animations:^{ 70 | [orderVC.view setFrame:CGRectMake(0, - self.view.bounds.size.height, self.view.bounds.size.width, self.view.bounds.size.height)]; 71 | 72 | } completion:^(BOOL finished){ 73 | NSString * string = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; 74 | NSString * filePath = [string stringByAppendingString:@"/modelArray0.swh"]; 75 | NSString * filePath1 = [string stringByAppendingString:@"/modelArray1.swh"]; 76 | NSMutableArray * modelArr = [NSMutableArray array]; 77 | 78 | 79 | for (TouchView * touchView in orderVC->_viewArr1) { 80 | [modelArr addObject:touchView.touchViewModel]; 81 | } 82 | NSData * data = [NSKeyedArchiver archivedDataWithRootObject:modelArr]; 83 | [data writeToFile:filePath atomically:YES]; 84 | [modelArr removeAllObjects]; 85 | for (TouchView * touchView in orderVC->_viewArr2) { 86 | [modelArr addObject:touchView.touchViewModel]; 87 | } 88 | data = [NSKeyedArchiver archivedDataWithRootObject:modelArr]; 89 | [data writeToFile:filePath1 atomically:YES]; 90 | [[[self.childViewControllers objectAtIndex:0] view] removeFromSuperview]; 91 | [orderVC removeFromParentViewController]; 92 | 93 | }]; 94 | 95 | } 96 | 97 | 98 | - (void)didReceiveMemoryWarning 99 | { 100 | [super didReceiveMemoryWarning]; 101 | // Dispose of any resources that can be recreated. 102 | } 103 | 104 | @end 105 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/ifengNewsOrderDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.weird.dev.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/ifengNewsOrderDemo-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | 10 | #ifndef __IPHONE_3_0 11 | #warning "This project uses features only available in iOS SDK 3.0 and later." 12 | #endif 13 | 14 | #ifdef __OBJC__ 15 | #import 16 | #import 17 | 18 | #endif 19 | #import "Header.h" 20 | -------------------------------------------------------------------------------- /ifengNewsOrderDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ifengNewsOrderDemo 4 | // 5 | // Created by zer0 on 14-2-26. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ifengNewsOrderDemoTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ifengNewsOrderDemoTests/ifengNewsOrderDemoTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.weird.dev.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /ifengNewsOrderDemoTests/ifengNewsOrderDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ifengNewsOrderDemoTests.m 3 | // ifengNewsOrderDemoTests 4 | // 5 | // Created by zer0 on 14-2-26. 6 | // Copyright (c) 2014年 zer0. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ifengNewsOrderDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ifengNewsOrderDemoTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | --------------------------------------------------------------------------------