diff --git a/Meizi.xcodeproj/project.pbxproj b/Meizi.xcodeproj/project.pbxproj index 5627dbe..4b51d69 100644 --- a/Meizi.xcodeproj/project.pbxproj +++ b/Meizi.xcodeproj/project.pbxproj @@ -7,93 +7,67 @@ objects = { /* Begin PBXBuildFile section */ - 7D4349DD1A4964BA00C9C674 /* SettingTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D4349DC1A4964BA00C9C674 /* SettingTableViewController.m */; }; - 7D5504058B5E44FAC2D9E252 /* libPods-Meizi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8051BBDCA3CAA5AB86BBC999 /* libPods-Meizi.a */; }; - 7DA9F4DA1A455B2E007BAEDF /* SideBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DA9F4D91A455B2E007BAEDF /* SideBarViewController.m */; }; - 7DA9F4E31A457716007BAEDF /* MainCollectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DA9F4E21A457716007BAEDF /* MainCollectionViewController.m */; }; - 7DA9F4E91A45A953007BAEDF /* ImageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DA9F4E81A45A953007BAEDF /* ImageCell.m */; }; - 7DA9F5271A45CD31007BAEDF /* NetworkUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DA9F5261A45CD31007BAEDF /* NetworkUtil.m */; }; - 7DA9F5311A4625B8007BAEDF /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DA9F5301A4625B8007BAEDF /* RootViewController.m */; }; - 7DAE07E71A70169900A6E315 /* MJRefresh.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 7DAE07D71A70169900A6E315 /* MJRefresh.bundle */; }; - 7DAE07E81A70169900A6E315 /* MJRefreshBaseView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DAE07DA1A70169900A6E315 /* MJRefreshBaseView.m */; }; - 7DAE07E91A70169900A6E315 /* MJRefreshConst.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DAE07DC1A70169900A6E315 /* MJRefreshConst.m */; }; - 7DAE07EA1A70169900A6E315 /* MJRefreshFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DAE07DE1A70169900A6E315 /* MJRefreshFooterView.m */; }; - 7DAE07EB1A70169900A6E315 /* MJRefreshHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DAE07E01A70169900A6E315 /* MJRefreshHeaderView.m */; }; - 7DAE07EC1A70169900A6E315 /* UIScrollView+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DAE07E21A70169900A6E315 /* UIScrollView+MJExtension.m */; }; - 7DAE07ED1A70169900A6E315 /* UIScrollView+MJRefresh.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DAE07E41A70169900A6E315 /* UIScrollView+MJRefresh.m */; }; - 7DAE07EE1A70169900A6E315 /* UIView+MJExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DAE07E61A70169900A6E315 /* UIView+MJExtension.m */; }; - 7DDA49331A39FC9C00DEFFD5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DDA49321A39FC9C00DEFFD5 /* main.m */; }; - 7DDA49361A39FC9C00DEFFD5 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DDA49351A39FC9C00DEFFD5 /* AppDelegate.m */; }; - 7DDA493F1A39FC9C00DEFFD5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7DDA493D1A39FC9C00DEFFD5 /* Main.storyboard */; }; - 7DDA49411A39FC9C00DEFFD5 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7DDA49401A39FC9C00DEFFD5 /* Images.xcassets */; }; - 7DDA49501A39FC9C00DEFFD5 /* MeiziTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7DDA494F1A39FC9C00DEFFD5 /* MeiziTests.m */; }; + 7D00B60A1AD43B950069D18E /* LeftMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D00B6091AD43B950069D18E /* LeftMenuViewController.m */; }; + 7D93B84F1ACFD7CF00453452 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D93B84E1ACFD7CF00453452 /* main.m */; }; + 7D93B8521ACFD7CF00453452 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D93B8511ACFD7CF00453452 /* AppDelegate.m */; }; + 7D93B8581ACFD7CF00453452 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7D93B8561ACFD7CF00453452 /* Main.storyboard */; }; + 7D93B85A1ACFD7CF00453452 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7D93B8591ACFD7CF00453452 /* Images.xcassets */; }; + 7D93B8691ACFD7CF00453452 /* MeiziTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D93B8681ACFD7CF00453452 /* MeiziTests.m */; }; + 7D93B8791ACFDA8600453452 /* Network.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D93B8781ACFDA8600453452 /* Network.m */; }; + 7D93B87C1ACFDD2900453452 /* Meizi.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D93B87B1ACFDD2900453452 /* Meizi.m */; }; + 7D93B87F1ACFEA2700453452 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D93B87E1ACFEA2700453452 /* MainViewController.m */; }; + 7D93B8821ACFED2600453452 /* MeiziCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D93B8811ACFED2600453452 /* MeiziCell.m */; }; + E07A9DDEC7193BA0132EB02F /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 77EACF44A594DBA190E5C5FF /* libPods.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 7DDA494A1A39FC9C00DEFFD5 /* PBXContainerItemProxy */ = { + 7D93B8631ACFD7CF00453452 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 7DDA49251A39FC9C00DEFFD5 /* Project object */; + containerPortal = 7D93B8411ACFD7CF00453452 /* Project object */; proxyType = 1; - remoteGlobalIDString = 7DDA492C1A39FC9C00DEFFD5; + remoteGlobalIDString = 7D93B8481ACFD7CF00453452; remoteInfo = Meizi; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 51F1F86A06680DA69546F3CE /* Pods-Meizi.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meizi.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Meizi/Pods-Meizi.debug.xcconfig"; sourceTree = ""; }; - 7D4349DB1A4964BA00C9C674 /* SettingTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingTableViewController.h; sourceTree = ""; }; - 7D4349DC1A4964BA00C9C674 /* SettingTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingTableViewController.m; sourceTree = ""; }; - 7DA9F4D81A455B2E007BAEDF /* SideBarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SideBarViewController.h; sourceTree = ""; }; - 7DA9F4D91A455B2E007BAEDF /* SideBarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SideBarViewController.m; sourceTree = ""; }; - 7DA9F4E11A457716007BAEDF /* MainCollectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainCollectionViewController.h; sourceTree = ""; }; - 7DA9F4E21A457716007BAEDF /* MainCollectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainCollectionViewController.m; sourceTree = ""; }; - 7DA9F4E71A45A953007BAEDF /* ImageCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageCell.h; sourceTree = ""; }; - 7DA9F4E81A45A953007BAEDF /* ImageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageCell.m; sourceTree = ""; }; - 7DA9F5251A45CD31007BAEDF /* NetworkUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkUtil.h; sourceTree = ""; }; - 7DA9F5261A45CD31007BAEDF /* NetworkUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NetworkUtil.m; sourceTree = ""; }; - 7DA9F5281A45D33F007BAEDF /* Meizi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Meizi.h; sourceTree = ""; }; - 7DA9F52F1A4625B8007BAEDF /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; - 7DA9F5301A4625B8007BAEDF /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = ""; }; - 7DAE07D71A70169900A6E315 /* MJRefresh.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = MJRefresh.bundle; sourceTree = ""; }; - 7DAE07D81A70169900A6E315 /* MJRefresh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MJRefresh.h; sourceTree = ""; }; - 7DAE07D91A70169900A6E315 /* MJRefreshBaseView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MJRefreshBaseView.h; sourceTree = ""; }; - 7DAE07DA1A70169900A6E315 /* MJRefreshBaseView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MJRefreshBaseView.m; sourceTree = ""; }; - 7DAE07DB1A70169900A6E315 /* MJRefreshConst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MJRefreshConst.h; sourceTree = ""; }; - 7DAE07DC1A70169900A6E315 /* MJRefreshConst.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MJRefreshConst.m; sourceTree = ""; }; - 7DAE07DD1A70169900A6E315 /* MJRefreshFooterView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MJRefreshFooterView.h; sourceTree = ""; }; - 7DAE07DE1A70169900A6E315 /* MJRefreshFooterView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MJRefreshFooterView.m; sourceTree = ""; }; - 7DAE07DF1A70169900A6E315 /* MJRefreshHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MJRefreshHeaderView.h; sourceTree = ""; }; - 7DAE07E01A70169900A6E315 /* MJRefreshHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MJRefreshHeaderView.m; sourceTree = ""; }; - 7DAE07E11A70169900A6E315 /* UIScrollView+MJExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+MJExtension.h"; sourceTree = ""; }; - 7DAE07E21A70169900A6E315 /* UIScrollView+MJExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+MJExtension.m"; sourceTree = ""; }; - 7DAE07E31A70169900A6E315 /* UIScrollView+MJRefresh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIScrollView+MJRefresh.h"; sourceTree = ""; }; - 7DAE07E41A70169900A6E315 /* UIScrollView+MJRefresh.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIScrollView+MJRefresh.m"; sourceTree = ""; }; - 7DAE07E51A70169900A6E315 /* UIView+MJExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+MJExtension.h"; sourceTree = ""; }; - 7DAE07E61A70169900A6E315 /* UIView+MJExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+MJExtension.m"; sourceTree = ""; }; - 7DDA492D1A39FC9C00DEFFD5 /* Meizi.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meizi.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 7DDA49311A39FC9C00DEFFD5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 7DDA49321A39FC9C00DEFFD5 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 7DDA49341A39FC9C00DEFFD5 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 7DDA49351A39FC9C00DEFFD5 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 7DDA493E1A39FC9C00DEFFD5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 7DDA49401A39FC9C00DEFFD5 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 7DDA49491A39FC9C00DEFFD5 /* MeiziTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeiziTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 7DDA494E1A39FC9C00DEFFD5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 7DDA494F1A39FC9C00DEFFD5 /* MeiziTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MeiziTests.m; sourceTree = ""; }; - 8051BBDCA3CAA5AB86BBC999 /* libPods-Meizi.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Meizi.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - C37A8097E2E03511376A2AE2 /* Pods-Meizi.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Meizi.release.xcconfig"; path = "Pods/Target Support Files/Pods-Meizi/Pods-Meizi.release.xcconfig"; sourceTree = ""; }; + 24BB35E908950D1B8B54B819 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + 43966589E761DE4F7CE925C0 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + 77EACF44A594DBA190E5C5FF /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 7D00B6081AD43B950069D18E /* LeftMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LeftMenuViewController.h; sourceTree = ""; }; + 7D00B6091AD43B950069D18E /* LeftMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LeftMenuViewController.m; sourceTree = ""; }; + 7D465E5D1AD03D5F00D68ED7 /* PrefixHeader.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = ""; }; + 7D93B8491ACFD7CF00453452 /* Meizi.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Meizi.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7D93B84D1ACFD7CF00453452 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7D93B84E1ACFD7CF00453452 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 7D93B8501ACFD7CF00453452 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 7D93B8511ACFD7CF00453452 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 7D93B8571ACFD7CF00453452 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 7D93B8591ACFD7CF00453452 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 7D93B8621ACFD7CF00453452 /* MeiziTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MeiziTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 7D93B8671ACFD7CF00453452 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7D93B8681ACFD7CF00453452 /* MeiziTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MeiziTests.m; sourceTree = ""; }; + 7D93B8761ACFDA1F00453452 /* Constant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Constant.h; sourceTree = ""; }; + 7D93B8771ACFDA8600453452 /* Network.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Network.h; sourceTree = ""; }; + 7D93B8781ACFDA8600453452 /* Network.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Network.m; sourceTree = ""; }; + 7D93B87A1ACFDD2900453452 /* Meizi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Meizi.h; sourceTree = ""; }; + 7D93B87B1ACFDD2900453452 /* Meizi.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Meizi.m; sourceTree = ""; }; + 7D93B87D1ACFEA2700453452 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; + 7D93B87E1ACFEA2700453452 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; + 7D93B8801ACFED2600453452 /* MeiziCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MeiziCell.h; sourceTree = ""; }; + 7D93B8811ACFED2600453452 /* MeiziCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MeiziCell.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 7DDA492A1A39FC9C00DEFFD5 /* Frameworks */ = { + 7D93B8461ACFD7CF00453452 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7D5504058B5E44FAC2D9E252 /* libPods-Meizi.a in Frameworks */, + E07A9DDEC7193BA0132EB02F /* libPods.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7DDA49461A39FC9C00DEFFD5 /* Frameworks */ = { + 7D93B85F1ACFD7CF00453452 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -103,186 +77,137 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 7161E0DF84F966AB233A57F6 /* Pods */ = { + 62894ABC69E3FA73693CBE1C /* Frameworks */ = { isa = PBXGroup; children = ( - 51F1F86A06680DA69546F3CE /* Pods-Meizi.debug.xcconfig */, - C37A8097E2E03511376A2AE2 /* Pods-Meizi.release.xcconfig */, + 77EACF44A594DBA190E5C5FF /* libPods.a */, ); - name = Pods; - sourceTree = ""; - }; - 7D4349DA1A49649200C9C674 /* Setting */ = { - isa = PBXGroup; - children = ( - 7D4349DB1A4964BA00C9C674 /* SettingTableViewController.h */, - 7D4349DC1A4964BA00C9C674 /* SettingTableViewController.m */, - ); - name = Setting; - sourceTree = ""; - }; - 7DA9F5201A45B438007BAEDF /* Controllers */ = { - isa = PBXGroup; - children = ( - 7DA9F52F1A4625B8007BAEDF /* RootViewController.h */, - 7DA9F5301A4625B8007BAEDF /* RootViewController.m */, - 7DA9F5221A45B4A8007BAEDF /* SideBar */, - 7DA9F5231A45B4B9007BAEDF /* MainView */, - 7D4349DA1A49649200C9C674 /* Setting */, - ); - name = Controllers; - sourceTree = ""; - }; - 7DA9F5211A45B442007BAEDF /* Views */ = { - isa = PBXGroup; - children = ( - 7DA9F4E71A45A953007BAEDF /* ImageCell.h */, - 7DA9F4E81A45A953007BAEDF /* ImageCell.m */, - ); - name = Views; + name = Frameworks; sourceTree = ""; }; - 7DA9F5221A45B4A8007BAEDF /* SideBar */ = { + 7D93B8401ACFD7CF00453452 = { isa = PBXGroup; children = ( - 7DA9F4D81A455B2E007BAEDF /* SideBarViewController.h */, - 7DA9F4D91A455B2E007BAEDF /* SideBarViewController.m */, + 7D93B84B1ACFD7CF00453452 /* Meizi */, + 7D93B8651ACFD7CF00453452 /* MeiziTests */, + 7D93B84A1ACFD7CF00453452 /* Products */, + C6919C82553A09D6334AA21F /* Pods */, + 62894ABC69E3FA73693CBE1C /* Frameworks */, ); - name = SideBar; sourceTree = ""; }; - 7DA9F5231A45B4B9007BAEDF /* MainView */ = { + 7D93B84A1ACFD7CF00453452 /* Products */ = { isa = PBXGroup; children = ( - 7DA9F4E11A457716007BAEDF /* MainCollectionViewController.h */, - 7DA9F4E21A457716007BAEDF /* MainCollectionViewController.m */, + 7D93B8491ACFD7CF00453452 /* Meizi.app */, + 7D93B8621ACFD7CF00453452 /* MeiziTests.xctest */, ); - name = MainView; + name = Products; sourceTree = ""; }; - 7DA9F5241A45CD0D007BAEDF /* Util */ = { + 7D93B84B1ACFD7CF00453452 /* Meizi */ = { isa = PBXGroup; children = ( - 7DA9F5281A45D33F007BAEDF /* Meizi.h */, - 7DA9F5251A45CD31007BAEDF /* NetworkUtil.h */, - 7DA9F5261A45CD31007BAEDF /* NetworkUtil.m */, + 7D93B8501ACFD7CF00453452 /* AppDelegate.h */, + 7D93B8511ACFD7CF00453452 /* AppDelegate.m */, + 7D93B8721ACFD9CE00453452 /* Util */, + 7D93B8751ACFD9E400453452 /* View */, + 7D93B8741ACFD9DE00453452 /* Model */, + 7D93B8731ACFD9D900453452 /* Controller */, + 7D93B8561ACFD7CF00453452 /* Main.storyboard */, + 7D93B8591ACFD7CF00453452 /* Images.xcassets */, + 7D93B84C1ACFD7CF00453452 /* Supporting Files */, ); - name = Util; + path = Meizi; sourceTree = ""; }; - 7DAE07D51A70169900A6E315 /* Vendor */ = { + 7D93B84C1ACFD7CF00453452 /* Supporting Files */ = { isa = PBXGroup; children = ( - 7DAE07D61A70169900A6E315 /* MJRefresh */, + 7D93B84D1ACFD7CF00453452 /* Info.plist */, + 7D93B84E1ACFD7CF00453452 /* main.m */, + 7D465E5D1AD03D5F00D68ED7 /* PrefixHeader.pch */, ); - path = Vendor; - sourceTree = ""; - }; - 7DAE07D61A70169900A6E315 /* MJRefresh */ = { - isa = PBXGroup; - children = ( - 7DAE07D71A70169900A6E315 /* MJRefresh.bundle */, - 7DAE07D81A70169900A6E315 /* MJRefresh.h */, - 7DAE07D91A70169900A6E315 /* MJRefreshBaseView.h */, - 7DAE07DA1A70169900A6E315 /* MJRefreshBaseView.m */, - 7DAE07DB1A70169900A6E315 /* MJRefreshConst.h */, - 7DAE07DC1A70169900A6E315 /* MJRefreshConst.m */, - 7DAE07DD1A70169900A6E315 /* MJRefreshFooterView.h */, - 7DAE07DE1A70169900A6E315 /* MJRefreshFooterView.m */, - 7DAE07DF1A70169900A6E315 /* MJRefreshHeaderView.h */, - 7DAE07E01A70169900A6E315 /* MJRefreshHeaderView.m */, - 7DAE07E11A70169900A6E315 /* UIScrollView+MJExtension.h */, - 7DAE07E21A70169900A6E315 /* UIScrollView+MJExtension.m */, - 7DAE07E31A70169900A6E315 /* UIScrollView+MJRefresh.h */, - 7DAE07E41A70169900A6E315 /* UIScrollView+MJRefresh.m */, - 7DAE07E51A70169900A6E315 /* UIView+MJExtension.h */, - 7DAE07E61A70169900A6E315 /* UIView+MJExtension.m */, - ); - path = MJRefresh; + name = "Supporting Files"; sourceTree = ""; }; - 7DDA49241A39FC9C00DEFFD5 = { + 7D93B8651ACFD7CF00453452 /* MeiziTests */ = { isa = PBXGroup; children = ( - 7DDA492F1A39FC9C00DEFFD5 /* Meizi */, - 7DDA494C1A39FC9C00DEFFD5 /* MeiziTests */, - 7DDA492E1A39FC9C00DEFFD5 /* Products */, - 7161E0DF84F966AB233A57F6 /* Pods */, - 822378B5847EBC5A9A1176FA /* Frameworks */, + 7D93B8681ACFD7CF00453452 /* MeiziTests.m */, + 7D93B8661ACFD7CF00453452 /* Supporting Files */, ); + path = MeiziTests; sourceTree = ""; }; - 7DDA492E1A39FC9C00DEFFD5 /* Products */ = { + 7D93B8661ACFD7CF00453452 /* Supporting Files */ = { isa = PBXGroup; children = ( - 7DDA492D1A39FC9C00DEFFD5 /* Meizi.app */, - 7DDA49491A39FC9C00DEFFD5 /* MeiziTests.xctest */, + 7D93B8671ACFD7CF00453452 /* Info.plist */, ); - name = Products; + name = "Supporting Files"; sourceTree = ""; }; - 7DDA492F1A39FC9C00DEFFD5 /* Meizi */ = { + 7D93B8721ACFD9CE00453452 /* Util */ = { isa = PBXGroup; children = ( - 7DDA49341A39FC9C00DEFFD5 /* AppDelegate.h */, - 7DDA49351A39FC9C00DEFFD5 /* AppDelegate.m */, - 7DDA49401A39FC9C00DEFFD5 /* Images.xcassets */, - 7DDA493D1A39FC9C00DEFFD5 /* Main.storyboard */, - 7DAE07D51A70169900A6E315 /* Vendor */, - 7DA9F5241A45CD0D007BAEDF /* Util */, - 7DA9F5211A45B442007BAEDF /* Views */, - 7DA9F5201A45B438007BAEDF /* Controllers */, - 7DDA49301A39FC9C00DEFFD5 /* Supporting Files */, + 7D93B8761ACFDA1F00453452 /* Constant.h */, + 7D93B8771ACFDA8600453452 /* Network.h */, + 7D93B8781ACFDA8600453452 /* Network.m */, ); - path = Meizi; + name = Util; sourceTree = ""; }; - 7DDA49301A39FC9C00DEFFD5 /* Supporting Files */ = { + 7D93B8731ACFD9D900453452 /* Controller */ = { isa = PBXGroup; children = ( - 7DDA49311A39FC9C00DEFFD5 /* Info.plist */, - 7DDA49321A39FC9C00DEFFD5 /* main.m */, + 7D00B6081AD43B950069D18E /* LeftMenuViewController.h */, + 7D00B6091AD43B950069D18E /* LeftMenuViewController.m */, + 7D93B87D1ACFEA2700453452 /* MainViewController.h */, + 7D93B87E1ACFEA2700453452 /* MainViewController.m */, ); - name = "Supporting Files"; + name = Controller; sourceTree = ""; }; - 7DDA494C1A39FC9C00DEFFD5 /* MeiziTests */ = { + 7D93B8741ACFD9DE00453452 /* Model */ = { isa = PBXGroup; children = ( - 7DDA494F1A39FC9C00DEFFD5 /* MeiziTests.m */, - 7DDA494D1A39FC9C00DEFFD5 /* Supporting Files */, + 7D93B87A1ACFDD2900453452 /* Meizi.h */, + 7D93B87B1ACFDD2900453452 /* Meizi.m */, ); - path = MeiziTests; + name = Model; sourceTree = ""; }; - 7DDA494D1A39FC9C00DEFFD5 /* Supporting Files */ = { + 7D93B8751ACFD9E400453452 /* View */ = { isa = PBXGroup; children = ( - 7DDA494E1A39FC9C00DEFFD5 /* Info.plist */, + 7D93B8801ACFED2600453452 /* MeiziCell.h */, + 7D93B8811ACFED2600453452 /* MeiziCell.m */, ); - name = "Supporting Files"; + name = View; sourceTree = ""; }; - 822378B5847EBC5A9A1176FA /* Frameworks */ = { + C6919C82553A09D6334AA21F /* Pods */ = { isa = PBXGroup; children = ( - 8051BBDCA3CAA5AB86BBC999 /* libPods-Meizi.a */, + 24BB35E908950D1B8B54B819 /* Pods.debug.xcconfig */, + 43966589E761DE4F7CE925C0 /* Pods.release.xcconfig */, ); - name = Frameworks; + name = Pods; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - 7DDA492C1A39FC9C00DEFFD5 /* Meizi */ = { + 7D93B8481ACFD7CF00453452 /* Meizi */ = { isa = PBXNativeTarget; - buildConfigurationList = 7DDA49531A39FC9C00DEFFD5 /* Build configuration list for PBXNativeTarget "Meizi" */; + buildConfigurationList = 7D93B86C1ACFD7CF00453452 /* Build configuration list for PBXNativeTarget "Meizi" */; buildPhases = ( - 9D7F45B8DE3ED3DDC6D857FF /* Check Pods Manifest.lock */, - 7DDA49291A39FC9C00DEFFD5 /* Sources */, - 7DDA492A1A39FC9C00DEFFD5 /* Frameworks */, - 7DDA492B1A39FC9C00DEFFD5 /* Resources */, - 7895D17B79D31C0FEF1DA0D9 /* Copy Pods Resources */, + 30B4BF70FF517833B8A8ECBF /* Check Pods Manifest.lock */, + 7D93B8451ACFD7CF00453452 /* Sources */, + 7D93B8461ACFD7CF00453452 /* Frameworks */, + 7D93B8471ACFD7CF00453452 /* Resources */, + 152ED65C4E3F94F23828D1F8 /* Copy Pods Resources */, ); buildRules = ( ); @@ -290,46 +215,46 @@ ); name = Meizi; productName = Meizi; - productReference = 7DDA492D1A39FC9C00DEFFD5 /* Meizi.app */; + productReference = 7D93B8491ACFD7CF00453452 /* Meizi.app */; productType = "com.apple.product-type.application"; }; - 7DDA49481A39FC9C00DEFFD5 /* MeiziTests */ = { + 7D93B8611ACFD7CF00453452 /* MeiziTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 7DDA49561A39FC9C00DEFFD5 /* Build configuration list for PBXNativeTarget "MeiziTests" */; + buildConfigurationList = 7D93B86F1ACFD7CF00453452 /* Build configuration list for PBXNativeTarget "MeiziTests" */; buildPhases = ( - 7DDA49451A39FC9C00DEFFD5 /* Sources */, - 7DDA49461A39FC9C00DEFFD5 /* Frameworks */, - 7DDA49471A39FC9C00DEFFD5 /* Resources */, + 7D93B85E1ACFD7CF00453452 /* Sources */, + 7D93B85F1ACFD7CF00453452 /* Frameworks */, + 7D93B8601ACFD7CF00453452 /* Resources */, ); buildRules = ( ); dependencies = ( - 7DDA494B1A39FC9C00DEFFD5 /* PBXTargetDependency */, + 7D93B8641ACFD7CF00453452 /* PBXTargetDependency */, ); name = MeiziTests; productName = MeiziTests; - productReference = 7DDA49491A39FC9C00DEFFD5 /* MeiziTests.xctest */; + productReference = 7D93B8621ACFD7CF00453452 /* MeiziTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - 7DDA49251A39FC9C00DEFFD5 /* Project object */ = { + 7D93B8411ACFD7CF00453452 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0610; + LastUpgradeCheck = 0620; ORGANIZATIONNAME = Sunnyyoung; TargetAttributes = { - 7DDA492C1A39FC9C00DEFFD5 = { - CreatedOnToolsVersion = 6.1.1; + 7D93B8481ACFD7CF00453452 = { + CreatedOnToolsVersion = 6.2; }; - 7DDA49481A39FC9C00DEFFD5 = { - CreatedOnToolsVersion = 6.1.1; - TestTargetID = 7DDA492C1A39FC9C00DEFFD5; + 7D93B8611ACFD7CF00453452 = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 7D93B8481ACFD7CF00453452; }; }; }; - buildConfigurationList = 7DDA49281A39FC9C00DEFFD5 /* Build configuration list for PBXProject "Meizi" */; + buildConfigurationList = 7D93B8441ACFD7CF00453452 /* Build configuration list for PBXProject "Meizi" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -337,29 +262,28 @@ en, Base, ); - mainGroup = 7DDA49241A39FC9C00DEFFD5; - productRefGroup = 7DDA492E1A39FC9C00DEFFD5 /* Products */; + mainGroup = 7D93B8401ACFD7CF00453452; + productRefGroup = 7D93B84A1ACFD7CF00453452 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 7DDA492C1A39FC9C00DEFFD5 /* Meizi */, - 7DDA49481A39FC9C00DEFFD5 /* MeiziTests */, + 7D93B8481ACFD7CF00453452 /* Meizi */, + 7D93B8611ACFD7CF00453452 /* MeiziTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - 7DDA492B1A39FC9C00DEFFD5 /* Resources */ = { + 7D93B8471ACFD7CF00453452 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 7DDA493F1A39FC9C00DEFFD5 /* Main.storyboard in Resources */, - 7DDA49411A39FC9C00DEFFD5 /* Images.xcassets in Resources */, - 7DAE07E71A70169900A6E315 /* MJRefresh.bundle in Resources */, + 7D93B8581ACFD7CF00453452 /* Main.storyboard in Resources */, + 7D93B85A1ACFD7CF00453452 /* Images.xcassets in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7DDA49471A39FC9C00DEFFD5 /* Resources */ = { + 7D93B8601ACFD7CF00453452 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -369,7 +293,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 7895D17B79D31C0FEF1DA0D9 /* Copy Pods Resources */ = { + 152ED65C4E3F94F23828D1F8 /* Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -381,10 +305,10 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Meizi/Pods-Meizi-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 9D7F45B8DE3ED3DDC6D857FF /* Check Pods Manifest.lock */ = { + 30B4BF70FF517833B8A8ECBF /* Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -402,51 +326,43 @@ /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - 7DDA49291A39FC9C00DEFFD5 /* Sources */ = { + 7D93B8451ACFD7CF00453452 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 7DAE07EA1A70169900A6E315 /* MJRefreshFooterView.m in Sources */, - 7DAE07EE1A70169900A6E315 /* UIView+MJExtension.m in Sources */, - 7DAE07EC1A70169900A6E315 /* UIScrollView+MJExtension.m in Sources */, - 7DA9F4E31A457716007BAEDF /* MainCollectionViewController.m in Sources */, - 7DA9F4E91A45A953007BAEDF /* ImageCell.m in Sources */, - 7DAE07ED1A70169900A6E315 /* UIScrollView+MJRefresh.m in Sources */, - 7DA9F5311A4625B8007BAEDF /* RootViewController.m in Sources */, - 7DDA49361A39FC9C00DEFFD5 /* AppDelegate.m in Sources */, - 7DAE07E91A70169900A6E315 /* MJRefreshConst.m in Sources */, - 7DAE07EB1A70169900A6E315 /* MJRefreshHeaderView.m in Sources */, - 7D4349DD1A4964BA00C9C674 /* SettingTableViewController.m in Sources */, - 7DDA49331A39FC9C00DEFFD5 /* main.m in Sources */, - 7DAE07E81A70169900A6E315 /* MJRefreshBaseView.m in Sources */, - 7DA9F5271A45CD31007BAEDF /* NetworkUtil.m in Sources */, - 7DA9F4DA1A455B2E007BAEDF /* SideBarViewController.m in Sources */, + 7D93B87C1ACFDD2900453452 /* Meizi.m in Sources */, + 7D93B8521ACFD7CF00453452 /* AppDelegate.m in Sources */, + 7D93B8791ACFDA8600453452 /* Network.m in Sources */, + 7D93B87F1ACFEA2700453452 /* MainViewController.m in Sources */, + 7D00B60A1AD43B950069D18E /* LeftMenuViewController.m in Sources */, + 7D93B8821ACFED2600453452 /* MeiziCell.m in Sources */, + 7D93B84F1ACFD7CF00453452 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7DDA49451A39FC9C00DEFFD5 /* Sources */ = { + 7D93B85E1ACFD7CF00453452 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 7DDA49501A39FC9C00DEFFD5 /* MeiziTests.m in Sources */, + 7D93B8691ACFD7CF00453452 /* MeiziTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 7DDA494B1A39FC9C00DEFFD5 /* PBXTargetDependency */ = { + 7D93B8641ACFD7CF00453452 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 7DDA492C1A39FC9C00DEFFD5 /* Meizi */; - targetProxy = 7DDA494A1A39FC9C00DEFFD5 /* PBXContainerItemProxy */; + target = 7D93B8481ACFD7CF00453452 /* Meizi */; + targetProxy = 7D93B8631ACFD7CF00453452 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - 7DDA493D1A39FC9C00DEFFD5 /* Main.storyboard */ = { + 7D93B8561ACFD7CF00453452 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - 7DDA493E1A39FC9C00DEFFD5 /* Base */, + 7D93B8571ACFD7CF00453452 /* Base */, ); name = Main.storyboard; sourceTree = ""; @@ -454,7 +370,7 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - 7DDA49511A39FC9C00DEFFD5 /* Debug */ = { + 7D93B86A1ACFD7CF00453452 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -488,14 +404,14 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; }; - 7DDA49521A39FC9C00DEFFD5 /* Release */ = { + 7D93B86B1ACFD7CF00453452 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -513,7 +429,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -523,19 +439,21 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; - 7DDA49541A39FC9C00DEFFD5 /* Debug */ = { + 7D93B86D1ACFD7CF00453452 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 51F1F86A06680DA69546F3CE /* Pods-Meizi.debug.xcconfig */; + baseConfigurationReference = 24BB35E908950D1B8B54B819 /* Pods.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SRCROOT)/Meizi/PrefixHeader.pch"; INFOPLIST_FILE = Meizi/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -544,12 +462,14 @@ }; name = Debug; }; - 7DDA49551A39FC9C00DEFFD5 /* Release */ = { + 7D93B86E1ACFD7CF00453452 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C37A8097E2E03511376A2AE2 /* Pods-Meizi.release.xcconfig */; + baseConfigurationReference = 43966589E761DE4F7CE925C0 /* Pods.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "$(SRCROOT)/Meizi/PrefixHeader.pch"; INFOPLIST_FILE = Meizi/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -558,7 +478,7 @@ }; name = Release; }; - 7DDA49571A39FC9C00DEFFD5 /* Debug */ = { + 7D93B8701ACFD7CF00453452 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; @@ -577,7 +497,7 @@ }; name = Debug; }; - 7DDA49581A39FC9C00DEFFD5 /* Release */ = { + 7D93B8711ACFD7CF00453452 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; @@ -595,34 +515,34 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 7DDA49281A39FC9C00DEFFD5 /* Build configuration list for PBXProject "Meizi" */ = { + 7D93B8441ACFD7CF00453452 /* Build configuration list for PBXProject "Meizi" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7DDA49511A39FC9C00DEFFD5 /* Debug */, - 7DDA49521A39FC9C00DEFFD5 /* Release */, + 7D93B86A1ACFD7CF00453452 /* Debug */, + 7D93B86B1ACFD7CF00453452 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 7DDA49531A39FC9C00DEFFD5 /* Build configuration list for PBXNativeTarget "Meizi" */ = { + 7D93B86C1ACFD7CF00453452 /* Build configuration list for PBXNativeTarget "Meizi" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7DDA49541A39FC9C00DEFFD5 /* Debug */, - 7DDA49551A39FC9C00DEFFD5 /* Release */, + 7D93B86D1ACFD7CF00453452 /* Debug */, + 7D93B86E1ACFD7CF00453452 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 7DDA49561A39FC9C00DEFFD5 /* Build configuration list for PBXNativeTarget "MeiziTests" */ = { + 7D93B86F1ACFD7CF00453452 /* Build configuration list for PBXNativeTarget "MeiziTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7DDA49571A39FC9C00DEFFD5 /* Debug */, - 7DDA49581A39FC9C00DEFFD5 /* Release */, + 7D93B8701ACFD7CF00453452 /* Debug */, + 7D93B8711ACFD7CF00453452 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = 7DDA49251A39FC9C00DEFFD5 /* Project object */; + rootObject = 7D93B8411ACFD7CF00453452 /* Project object */; } diff --git a/Meizi/AppDelegate.h b/Meizi/AppDelegate.h index fb44f40..f032cce 100644 --- a/Meizi/AppDelegate.h +++ b/Meizi/AppDelegate.h @@ -2,12 +2,13 @@ // AppDelegate.h // Meizi // -// Created by Sunnyyoung on 14-12-12. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. // #import -#import +#import +#import @interface AppDelegate : UIResponder diff --git a/Meizi/AppDelegate.m b/Meizi/AppDelegate.m index a4b3b0f..596e16e 100644 --- a/Meizi/AppDelegate.m +++ b/Meizi/AppDelegate.m @@ -2,14 +2,12 @@ // AppDelegate.m // Meizi // -// Created by Sunnyyoung on 14-12-12. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. // #import "AppDelegate.h" -#import "SideBarViewController.h" -#import -#import +#import "LeftMenuViewController.h" @interface AppDelegate () @@ -17,51 +15,25 @@ @interface AppDelegate () @implementation AppDelegate -- (void)setupSideBarleft:(id)left right:(id)right { - - [[SlideNavigationController sharedInstance] setLeftMenu:left]; - [[SlideNavigationController sharedInstance] setRightMenu:right]; - - [[SlideNavigationController sharedInstance] setEnableShadow:YES]; - [[SlideNavigationController sharedInstance] setEnableSwipeGesture:YES]; - [[SlideNavigationController sharedInstance] setAvoidSwitchingToSameClassViewController:NO]; - [[SlideNavigationController sharedInstance] setPortraitSlideOffset:CGRectGetWidth(self.window.bounds) - 100]; - [[SlideNavigationController sharedInstance] setLandscapeSlideOffset:CGRectGetHeight(self.window.bounds) - 100]; -} - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [AFNetworkActivityIndicatorManager sharedManager].enabled = YES; - - UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; - SideBarViewController *leftSideBar = (SideBarViewController*)[storyboard instantiateViewControllerWithIdentifier:@"SideBar"]; - - [self setupSideBarleft:leftSideBar right:nil]; - + [self setupMenuViewController]; return YES; } -- (void)applicationWillResignActive:(UIApplication *)application { - // 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. - // 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. -} - -- (void)applicationDidEnterBackground:(UIApplication *)application { - // 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. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application { - // 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. -} - -- (void)applicationDidBecomeActive:(UIApplication *)application { - // 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. -} - -- (void)applicationWillTerminate:(UIApplication *)application { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - // Saves changes in the application's managed object context before the application terminates. - //[self saveContext]; +- (void)setupMenuViewController { + UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; + LeftMenuViewController *leftMenuViewController = [storyboard instantiateViewControllerWithIdentifier:@"LeftMenu"]; + + [SlideNavigationController sharedInstance].leftMenu = leftMenuViewController; + [SlideNavigationController sharedInstance].rightMenu = nil; + + [SlideNavigationController sharedInstance].enableShadow = YES; + [SlideNavigationController sharedInstance].enableSwipeGesture = YES; + [SlideNavigationController sharedInstance].avoidSwitchingToSameClassViewController = NO; + [[SlideNavigationController sharedInstance] setPortraitSlideOffset:SCREEN_WIDTH - 100]; + [[SlideNavigationController sharedInstance] setLandscapeSlideOffset:SCREEN_HEIGHT - 100]; } @end diff --git a/Meizi/Base.lproj/Main.storyboard b/Meizi/Base.lproj/Main.storyboard index cf57a53..30ec143 100644 --- a/Meizi/Base.lproj/Main.storyboard +++ b/Meizi/Base.lproj/Main.storyboard @@ -1,356 +1,242 @@ - + - + - - + + - - - + + + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - + + - - - - - + - + - - + + - - + + - + - + - + - - + + - - - + + + - - - + + + - + - + - + - - + + + - - - - - - - - - - + + + + + - - + - - + + - + - + - + - - - - - - + diff --git a/Meizi/Constant.h b/Meizi/Constant.h new file mode 100644 index 0000000..efc86bb --- /dev/null +++ b/Meizi/Constant.h @@ -0,0 +1,28 @@ +// +// Constant.h +// Meizi +// +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. +// + +#ifndef Meizi_Constant_h +#define Meizi_Constant_h + +#define SCREEN_WIDTH CGRectGetWidth(self.window.bounds) +#define SCREEN_HEIGHT CGRectGetHeight(self.window.bounds) + +static NSString * const BASE_URL = @"http://www.dbmeizi.com"; +static NSString * const PIC_HOST = @"http://23.92.26.220/"; + +static NSString * const MEIZI_ALL = @"/m/category_new/10"; +static NSString * const MEIZI_SEX = @"/m/category_new/1"; +static NSString * const MEIZI_CLEAVAGE = @"/m/category_new/2"; +static NSString * const MEIZI_LEGS = @"/m/category_new/3"; +static NSString * const MEIZI_FRESH = @"/m/category_new/11"; +static NSString * const MEIZI_LITERATURE = @"/m/category_new/12"; +static NSString * const MEIZI_CALLIPYGE = @"/m/category_new/14"; +static NSString * const MEIZI_FUNNY = @"/m/category_new/9"; +static NSString * const MEIZI_RATING = @"/m/category_new/5"; + +#endif diff --git a/Meizi/ImageCell.h b/Meizi/ImageCell.h deleted file mode 100644 index 808a03e..0000000 --- a/Meizi/ImageCell.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// ImageCell.h -// Meizi -// -// Created by Sunnyyoung on 14-12-20. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. -// - -#import - -@interface ImageCell : UICollectionViewCell - -@property (weak, nonatomic) IBOutlet UIImageView *imageView; -@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *indicator; - -@end diff --git a/Meizi/ImageCell.m b/Meizi/ImageCell.m deleted file mode 100644 index 2a73ef0..0000000 --- a/Meizi/ImageCell.m +++ /dev/null @@ -1,13 +0,0 @@ -// -// ImageCell.m -// Meizi -// -// Created by Sunnyyoung on 14-12-20. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. -// - -#import "ImageCell.h" - -@implementation ImageCell - -@end diff --git a/Meizi/Info.plist b/Meizi/Info.plist index eaca3af..2cc5dc6 100644 --- a/Meizi/Info.plist +++ b/Meizi/Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + zh_CN CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.1 + 1.0 CFBundleSignature ???? CFBundleVersion - 1.1 + 1 LSRequiresIPhoneOS UIMainStoryboardFile @@ -28,10 +28,6 @@ armv7 - UIStatusBarHidden - - UIStatusBarStyle - UIStatusBarStyleDefault UISupportedInterfaceOrientations UIInterfaceOrientationPortrait diff --git a/Meizi/LeftMenuViewController.h b/Meizi/LeftMenuViewController.h new file mode 100644 index 0000000..511fe0d --- /dev/null +++ b/Meizi/LeftMenuViewController.h @@ -0,0 +1,13 @@ +// +// LeftMenuViewController.h +// Meizi +// +// Created by Sunnyyoung on 15/4/8. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. +// + +#import + +@interface LeftMenuViewController : UITableViewController + +@end diff --git a/Meizi/SideBarViewController.m b/Meizi/LeftMenuViewController.m similarity index 53% rename from Meizi/SideBarViewController.m rename to Meizi/LeftMenuViewController.m index d527388..95dd01e 100644 --- a/Meizi/SideBarViewController.m +++ b/Meizi/LeftMenuViewController.m @@ -1,20 +1,19 @@ // -// SideBarViewController.m +// LeftMenuViewController.m // Meizi // -// Created by Sunnyyoung on 14-12-20. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. +// Created by Sunnyyoung on 15/4/8. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. // -#import "SideBarViewController.h" -#import "Meizi.h" -#import "MainCollectionViewController.h" +#import "LeftMenuViewController.h" +#import "MainViewController.h" -@interface SideBarViewController () +@interface LeftMenuViewController () @end -@implementation SideBarViewController +@implementation LeftMenuViewController - (void)viewDidLoad { [super viewDidLoad]; @@ -26,55 +25,48 @@ - (void)viewWillAppear:(BOOL)animated { [self.tableView selectRowAtIndexPath:selectedIndexPath animated:YES scrollPosition:UITableViewScrollPositionNone]; } -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -#pragma mark - TableViewDataSource - - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil]; switch (indexPath.section) { case 0: { //取MainCollectionView - UICollectionViewController *collectionView = [storyboard instantiateViewControllerWithIdentifier:@"MainCollectionView"]; + MainViewController *collectionView = [storyboard instantiateViewControllerWithIdentifier:@"MainCollectionView"]; switch (indexPath.row) { case 0: - [collectionView setTitle:@"所有妹子"]; - [collectionView setValue:MEIZI_ALL forKey:@"datasource"]; + collectionView.title = @"所有妹子"; + collectionView.datasource = MEIZI_ALL; break; case 1: - [collectionView setTitle:@"性感"]; - [collectionView setValue:MEIZI_SEX forKey:@"datasource"]; + collectionView.title = @"性感"; + collectionView.datasource = MEIZI_SEX; break; case 2: - [collectionView setTitle:@"有沟"]; - [collectionView setValue:MEIZI_CLEAVAGE forKey:@"datasource"]; + collectionView.title = @"有沟"; + collectionView.datasource = MEIZI_CLEAVAGE; break; case 3: - [collectionView setTitle:@"美腿"]; - [collectionView setValue:MEIZI_LEGS forKey:@"datasource"]; + collectionView.title = @"美腿"; + collectionView.datasource = MEIZI_LEGS; break; case 4: - [collectionView setTitle:@"小清新"]; - [collectionView setValue:MEIZI_FRESH forKey:@"datasource"]; + collectionView.title = @"小清新"; + collectionView.datasource = MEIZI_FRESH; break; case 5: - [collectionView setTitle:@"文艺"]; - [collectionView setValue:MEIZI_LITERATURE forKey:@"datasource"]; + collectionView.title = @"文艺"; + collectionView.datasource = MEIZI_LITERATURE; break; case 6: - [collectionView setTitle:@"美臀"]; - [collectionView setValue:MEIZI_CALLIPYGE forKey:@"datasource"]; + collectionView.title = @"美臀"; + collectionView.datasource = MEIZI_CALLIPYGE; break; case 7: - [collectionView setTitle:@"有点意思"]; - [collectionView setValue:MEIZI_FUNNY forKey:@"datasource"]; + collectionView.title = @"有点意思"; + collectionView.datasource = MEIZI_FUNNY; break; case 8: - [collectionView setTitle:@"尺度"]; - [collectionView setValue:MEIZI_RATING forKey:@"datasource"]; + collectionView.title = @"尺度"; + collectionView.datasource = MEIZI_RATING; break; } //跳转MainCollectionView diff --git a/Meizi/MainCollectionViewController.h b/Meizi/MainCollectionViewController.h deleted file mode 100644 index 0a53e88..0000000 --- a/Meizi/MainCollectionViewController.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// MainCollectionViewController.h -// Meizi -// -// Created by Sunnyyoung on 14-12-20. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. -// - -#import -#import -#import -#import -#import -#import - -@interface MainCollectionViewController : UICollectionViewController - -@property (nonatomic, strong)NSString *datasource; //数据源 - -@end diff --git a/Meizi/MainCollectionViewController.m b/Meizi/MainCollectionViewController.m deleted file mode 100644 index 4961e92..0000000 --- a/Meizi/MainCollectionViewController.m +++ /dev/null @@ -1,202 +0,0 @@ -// -// MainCollectionViewController.m -// Meizi -// -// Created by Sunnyyoung on 14-12-20. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. -// - -#import "MainCollectionViewController.h" -#import "MJRefresh.h" -#import "NetworkUtil.h" -#import "ImageCell.h" - -@interface MainCollectionViewController () - -@property (nonatomic, assign) NSInteger page;; -@property (nonatomic, strong) NSMutableArray *meizi; -@property (nonatomic, weak ) UIImage *selectedImage; - -@end - -@implementation MainCollectionViewController - -#pragma mark initialize - -- (id)initWithCoder:(NSCoder *)aDecoder { - self = [super initWithCoder:aDecoder]; - if (self) { - _datasource = _datasource?_datasource:MEIZI_ALL; - _meizi = [[NSMutableArray alloc]init]; - } - return self; -} - -#pragma mark view - -- (void)viewDidLoad { - [super viewDidLoad]; - [self addNotification]; - [self.collectionView addHeaderWithTarget:self action:@selector(refreshMeizi)]; - [self.collectionView addFooterWithTarget:self action:@selector(loadMoreMeizi)]; - [self.collectionView headerBeginRefreshing]; -} - -- (void)addNotification { - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(deviceOrientationDidChange:) - name:UIDeviceOrientationDidChangeNotification - object:nil]; - [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; -} - -- (void)removeNotification { - [[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications]; - [[NSNotificationCenter defaultCenter] removeObserver:self - name:UIDeviceOrientationDidChangeNotification - object:nil]; -} - -- (void)deviceOrientationDidChange:(NSNotification *)notification { - UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; - [self willRotateToInterfaceOrientation:orientation duration:1.0]; -} - -- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { - [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; - [self.collectionView reloadData]; -} - -#pragma marl loadMeizi - -- (void)refreshMeizi { - [[NetworkUtil sharedNetworkUtil]getMeiziWithUrl:_datasource page:0 completion:^(NSArray *meiziArray, NSInteger nextPage) { - if (meiziArray.count > 0) { - [_meizi removeAllObjects]; - [_meizi addObjectsFromArray:meiziArray]; - _page = nextPage; - NSLog(@"%@",@(_page)); - [self.collectionView reloadData]; - }else { - [self.collectionView setFooterHidden:YES]; - } - [self.collectionView headerEndRefreshing]; - }]; -} - -- (void)loadMoreMeizi { - [[NetworkUtil sharedNetworkUtil]getMeiziWithUrl:_datasource page:_page completion:^(NSArray *meiziArray, NSInteger nextPage) { - if (meiziArray.count > 0) { - [_meizi addObjectsFromArray:meiziArray]; - _page = nextPage; - NSLog(@"%@",@(_page)); - [self.collectionView reloadData]; - }else { - [self.collectionView setFooterHidden:YES]; - } - [self.collectionView footerEndRefreshing]; - }]; -} - -#pragma mark SlideNavigationControllerDelegate - -- (BOOL)slideNavigationControllerShouldDisplayLeftMenu { - return YES; -} - -#pragma mark UICollectionViewDataSource - -- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { - return 1; -} - -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - return _meizi.count; -} - -- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath -{ - if ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait) { - return CGSizeMake(CGRectGetWidth(self.view.bounds) / 3 - 1, CGRectGetWidth(self.view.bounds) / 3 - 1); - }else { - return CGSizeMake(CGRectGetWidth(self.view.bounds) / 5 - 1, CGRectGetWidth(self.view.bounds) / 5 - 1); - } -} - -- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - ImageCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"ImageCell" forIndexPath:indexPath]; - cell.imageView.image = nil; - NSString *imageurl = [NSString stringWithFormat:@"%@%@", PIC_HOST,[_meizi objectAtIndex:indexPath.row][@"path"]]; - - [cell.indicator startAnimating]; - [cell.imageView sd_setImageWithURL:[NSURL URLWithString:imageurl] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { - [cell.indicator stopAnimating]; - [cell.indicator setHidden:YES]; - }]; - - return cell; -} - -#pragma mark - -- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { - //获取选中的Cell - ImageCell *cell = (ImageCell*)[collectionView cellForItemAtIndexPath:indexPath]; - //创建图片信息 - JTSImageInfo *imageInfo = [[JTSImageInfo alloc]init]; - imageInfo.image = cell.imageView.image; - imageInfo.referenceRect = cell.frame; - imageInfo.referenceView = cell.superview; - //图片浏览Viewer - JTSImageViewController *imageViewer = [[JTSImageViewController alloc]initWithImageInfo:imageInfo mode:JTSImageViewControllerMode_Image backgroundStyle:JTSImageViewControllerBackgroundOption_Blurred]; - imageViewer.interactionsDelegate = self; - [imageViewer showFromViewController:self transition:JTSImageViewControllerTransition_FromOriginalPosition]; -} - -#pragma mark JTSImageViewControllerInteractionsDelegate - -- (BOOL)imageViewerAllowCopyToPasteboard:(JTSImageViewController *)imageViewer { - return YES; -} - -- (BOOL)imageViewerShouldTemporarilyIgnoreTouches:(JTSImageViewController *)imageViewer { - return NO; -} - -- (void)imageViewerDidLongPress:(JTSImageViewController *)imageViewer atRect:(CGRect)rect { - _selectedImage = imageViewer.image; - [[[UIActionSheet alloc]initWithTitle:nil - delegate:self - cancelButtonTitle:@"取消" - destructiveButtonTitle:@"保存到手机" - otherButtonTitles:nil, nil]showInView:imageViewer.view]; -} - -#pragma mark UIActionSheetDelegate - -- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { - switch (buttonIndex) { - case 0: { - [SVProgressHUD showWithStatus:@"正在保存..."]; - UIImageWriteToSavedPhotosAlbum(_selectedImage, self, @selector(image:didFinishSavingWithError:contextInfo:), nil); - break; - } - case 1: { - [actionSheet dismissWithClickedButtonIndex:buttonIndex animated:YES]; - break; - } - } -} - -#pragma mark SavePhotoToPhone - -- (void)image: (UIImage *) image didFinishSavingWithError: (NSError *) error contextInfo: (void *) contextInfo -{ - if (error) { - [SVProgressHUD showErrorWithStatus:@"保存失败"]; - }else { - [SVProgressHUD showSuccessWithStatus:@"保存成功"]; - } -} - -@end diff --git a/Meizi/MainViewController.h b/Meizi/MainViewController.h new file mode 100644 index 0000000..e0b59cb --- /dev/null +++ b/Meizi/MainViewController.h @@ -0,0 +1,20 @@ +// +// MainViewController.h +// Meizi +// +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. +// + +#import +#import +#import +#import +#import +#import + +@interface MainViewController : UICollectionViewController + +@property (nonatomic, strong) NSString *datasource; + +@end diff --git a/Meizi/MainViewController.m b/Meizi/MainViewController.m new file mode 100644 index 0000000..a34e973 --- /dev/null +++ b/Meizi/MainViewController.m @@ -0,0 +1,154 @@ +// +// MainViewController.m +// Meizi +// +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. +// + +#import "MainViewController.h" +#import "Meizi.h" +#import "MeiziCell.h" + +@interface MainViewController () + +@property (nonatomic, assign) NSInteger page; +@property (nonatomic, strong) NSMutableArray *meiziArray; + +@end + +@implementation MainViewController + +- (instancetype)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + if (self) { + _datasource = MEIZI_ALL; + _page = 0; + _meiziArray = [[NSMutableArray alloc] init]; + } + return self; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + [self setupLayout]; + [self setupHeaderAndFooter]; +} + +- (void)setupLayout { + NHBalancedFlowLayout *layout = (NHBalancedFlowLayout *)self.collectionViewLayout; + layout.minimumLineSpacing = 1.0; + layout.minimumInteritemSpacing = 1.0; + layout.sectionInset = UIEdgeInsetsZero; +} + +- (void)setupHeaderAndFooter { + [self.collectionView addLegendHeaderWithRefreshingTarget:self + refreshingAction:@selector(refreshMeizi)]; + [self.collectionView addLegendFooterWithRefreshingTarget:self + refreshingAction:@selector(loadMoreMeizi)]; + self.collectionView.footer.automaticallyRefresh = NO; + self.collectionView.footer.hidden = YES; + self.collectionView.header.textColor = [UIColor whiteColor]; + self.collectionView.footer.textColor = [UIColor whiteColor]; + [self.collectionView.header beginRefreshing]; +} + +- (void)refreshMeizi { + _page = 0; + [Network getMeiziWithUrl:_datasource page:_page completion:^(NSArray *meiziArray, NSInteger nextPage) { + if (meiziArray.count > 0) { + [_meiziArray removeAllObjects]; + [_meiziArray addObjectsFromArray:meiziArray]; + _page = nextPage; + [self.collectionView.footer resetNoMoreData]; + [self.collectionView reloadData]; + }else { + [self.collectionView.footer noticeNoMoreData]; + } + [self.collectionView.header endRefreshing]; + }]; +} + +- (void)loadMoreMeizi { + [Network getMeiziWithUrl:_datasource page:_page completion:^(NSArray *meiziArray, NSInteger nextPage) { + if (meiziArray.count > 0) { + [_meiziArray addObjectsFromArray:meiziArray]; + _page = nextPage; + [self.collectionView reloadData]; + } else { + [self.collectionView.footer noticeNoMoreData]; + } + [self.collectionView.footer endRefreshing]; + }]; +} + +#pragma mark SlideNavigationControllerDelegate +- (BOOL)slideNavigationControllerShouldDisplayLeftMenu { + return YES; +} + +#pragma mark CollectionView DataSource && Delegate +- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { + return 1; +} + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + collectionView.footer.hidden = (_meiziArray.count == 0); + return _meiziArray.count; +} + +- (CGSize)collectionView:(UICollectionView *)collectionView layout:(NHBalancedFlowLayout *)collectionViewLayout preferredSizeForItemAtIndexPath:(NSIndexPath *)indexPath { + Meizi *meizi = _meiziArray[indexPath.row]; + CGSize size = CGSizeMake([meizi width].integerValue, [meizi height].integerValue); + return size; +} + +- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + static NSString * const reuseIdentifier = @"MeiziCell"; + MeiziCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:reuseIdentifier forIndexPath:indexPath]; + + Meizi *meizi = _meiziArray[indexPath.row]; + + [cell.imageView setImageWithURL:[NSURL URLWithString:meizi.path] + completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { + meizi.image = image; + } + usingActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; + + return cell; +} + +#pragma mark 点击CollectionViewCell +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + MeiziCell *selectedCell = (MeiziCell *)[collectionView cellForItemAtIndexPath:indexPath]; + if (!selectedCell.imageView.image) { + return; + } + Meizi *meizi = _meiziArray[indexPath.row]; + NYTPhotosViewController *photoViewController = [[NYTPhotosViewController alloc] initWithPhotos:_meiziArray initialPhoto:meizi]; + photoViewController.delegate = self; + [self presentViewController:photoViewController animated:YES completion:nil]; +} + +#pragma mark PhotoViewController显示图片 +- (void)photosViewController:(NYTPhotosViewController *)photosViewController didDisplayPhoto:(id)photo atIndex:(NSUInteger)photoIndex { + Meizi *meizi = (Meizi *)photo; + if (!meizi.image) { + [[SDWebImageManager sharedManager] downloadImageWithURL:[NSURL URLWithString:meizi.path] + options:8|9 + progress:^(NSInteger receivedSize, NSInteger expectedSize) { + } + completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { + meizi.image = image; + [photosViewController updateImageForPhoto:meizi]; + }]; + } +} + +- (UIView *)photosViewController:(NYTPhotosViewController *)photosViewController referenceViewForPhoto:(id)photo { + MeiziCell *cell = (MeiziCell *)[self.collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForRow:[_meiziArray indexOfObject:photo] inSection:0]]; + return cell; +} + +@end diff --git a/Meizi/Meizi.h b/Meizi/Meizi.h index eaf856a..f719179 100644 --- a/Meizi/Meizi.h +++ b/Meizi/Meizi.h @@ -2,44 +2,30 @@ // Meizi.h // Meizi // -// Created by Sunnyyoung on 14-12-20. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. // -#ifndef Meizi_Meizi_h -#define Meizi_Meizi_h +#import +#import -#define NETWORK_TIMOUT 30.0 -#define NETWORK_ERR_MSG @"网络不给力~" +@interface Meizi : NSObject -#define CACHES_IS_EMPTY @"已经清空了啦" -#define DELETE_ING @"正在清除缓存" -#define DELETE_SUCCESS_MSG @"清除成功" -#define DELETE_ERR_MSG @"清除失败" +@property (nonatomic, strong) NSString *path; +@property (nonatomic, strong) NSString *width; +@property (nonatomic, strong) NSString *height; +@property (nonatomic, strong) NSString *source; +@property (nonatomic, strong) NSString *gtopic_id; +@property (nonatomic, strong) NSString *id; +@property (nonatomic, strong) NSString *title; +@property (nonatomic, strong) NSString *user; +@property (nonatomic, strong) NSString *url; +@property (nonatomic, strong) NSString *selected; -#define GOT_MEIZI_MSG @"妹子到手~" -#define NO_MEIZI_MSG @"没有更多妹子咯~" +@property (nonatomic) UIImage *image; +@property (nonatomic) UIImage *placeholderImage; +@property (nonatomic) NSAttributedString *attributedCaptionTitle; +@property (nonatomic) NSAttributedString *attributedCaptionSummary; +@property (nonatomic) NSAttributedString *attributedCaptionCredit; -//******废弃旧接口******// -//#define MEIZI_ALL @"http://www.dbmeizi.com/category/10" -//#define MEIZI_SEX @"http://www.dbmeizi.com/category/1" -//#define MEIZI_CLEAVAGE @"http://www.dbmeizi.com/category/2" -//#define MEIZI_LEGS @"http://www.dbmeizi.com/category/3" -//#define MEIZI_FRESH @"http://www.dbmeizi.com/category/11" -//#define MEIZI_LITERATURE @"http://www.dbmeizi.com/category/12" -//#define MEIZI_CALLIPYGE @"http://www.dbmeizi.com/category/14" -//#define MEIZI_RANK @"http://www.dbmeizi.com/img/rank" - -#define PIC_HOST @"http://23.92.26.220/" -#define MEIZI @"http://www.dbmeizi.com" -#define MEIZI_ALL MEIZI@"/m/category_new/10" -#define MEIZI_SEX MEIZI@"/m/category_new/1" -#define MEIZI_CLEAVAGE MEIZI@"/m/category_new/2" -#define MEIZI_LEGS MEIZI@"/m/category_new/3" -#define MEIZI_FRESH MEIZI@"/m/category_new/11" -#define MEIZI_LITERATURE MEIZI@"/m/category_new/12" -#define MEIZI_CALLIPYGE MEIZI@"/m/category_new/14" -#define MEIZI_FUNNY MEIZI@"/m/category_new/9" -#define MEIZI_RATING MEIZI@"/m/category_new/5" - -#endif +@end diff --git a/Meizi/Meizi.m b/Meizi/Meizi.m new file mode 100644 index 0000000..f04c5fd --- /dev/null +++ b/Meizi/Meizi.m @@ -0,0 +1,24 @@ +// +// Meizi.m +// Meizi +// +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. +// + +#import "Meizi.h" +#import "Constant.h" + +@implementation Meizi + +- (void)setPath:(NSString *)path { + _path = [PIC_HOST stringByAppendingString:path]; +} + +- (NSAttributedString *)attributedCaptionTitle { + NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:13.0], + NSForegroundColorAttributeName: [UIColor whiteColor]}; + return [[NSAttributedString alloc] initWithString:_title attributes:attributes]; +} + +@end diff --git a/Meizi/MeiziCell.h b/Meizi/MeiziCell.h new file mode 100644 index 0000000..679fc1a --- /dev/null +++ b/Meizi/MeiziCell.h @@ -0,0 +1,15 @@ +// +// MeiziCell.h +// Meizi +// +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. +// + +#import + +@interface MeiziCell : UICollectionViewCell + +@property (weak, nonatomic) IBOutlet UIImageView *imageView; + +@end diff --git a/Meizi/MeiziCell.m b/Meizi/MeiziCell.m new file mode 100644 index 0000000..07f244b --- /dev/null +++ b/Meizi/MeiziCell.m @@ -0,0 +1,13 @@ +// +// MeiziCell.m +// Meizi +// +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. +// + +#import "MeiziCell.h" + +@implementation MeiziCell + +@end diff --git a/Meizi/Network.h b/Meizi/Network.h new file mode 100644 index 0000000..f538dfa --- /dev/null +++ b/Meizi/Network.h @@ -0,0 +1,21 @@ +// +// Network.h +// Meizi +// +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. +// + +#import +#import +#import + +@interface Network : AFHTTPSessionManager + ++ (Network *)sharedInstance; + ++ (void)getMeiziWithUrl:(NSString *)url + page:(NSInteger)page + completion:(void (^)(NSArray *meiziArray, NSInteger nextPage))completion; + +@end diff --git a/Meizi/Network.m b/Meizi/Network.m new file mode 100644 index 0000000..23585e2 --- /dev/null +++ b/Meizi/Network.m @@ -0,0 +1,44 @@ +// +// Network.m +// Meizi +// +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. +// + +#import "Network.h" +#import "Constant.h" +#import "Meizi.h" + +@implementation Network + ++ (Network *)sharedInstance { + static Network *singleton = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + singleton = [[Network alloc] initWithBaseURL:[NSURL URLWithString:BASE_URL]]; + singleton.requestSerializer.timeoutInterval = 30.0; + singleton.responseSerializer = [AFJSONResponseSerializer serializerWithReadingOptions:NSJSONReadingMutableContainers]; + singleton.responseSerializer.acceptableContentTypes = [singleton.responseSerializer.acceptableContentTypes setByAddingObjectsFromSet:[NSSet setWithObject:@"text/html"]]; + }); + return singleton; +} + ++ (void)getMeiziWithUrl:(NSString *)url page:(NSInteger)page completion:(void (^)(NSArray *meiziArray, NSInteger nextPage))completion { + [[Network sharedInstance] GET:url parameters:@{@"maxid": [@(page) stringValue]} success:^(NSURLSessionDataTask *task, id responseJSON) { + if (responseJSON && [responseJSON[@"data"] isEqualToString:@"ok"]) { + NSMutableArray *meiziArray = [NSMutableArray arrayWithArray:[Meizi objectArrayWithKeyValuesArray:responseJSON[@"imgs"]]]; + NSInteger nextPage = [((Meizi *)[meiziArray lastObject]).id integerValue]; + [meiziArray removeLastObject]; + completion(meiziArray, nextPage); + } else { + completion(nil, 0); + [SVProgressHUD showErrorWithStatus:@"解析妹子出错"]; + } + } failure:^(NSURLSessionDataTask *task, NSError *error) { + completion(nil, 0); + [SVProgressHUD showErrorWithStatus:@"网络不给力哦"]; + }]; +} + +@end diff --git a/Meizi/NetworkUtil.h b/Meizi/NetworkUtil.h deleted file mode 100644 index bf833fb..0000000 --- a/Meizi/NetworkUtil.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// NetworkUtil.h -// Meizi -// -// Created by Sunnyyoung on 14-12-20. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. -// - -#import "AFHTTPSessionManager.h" -#import "Meizi.h" -#import - -@interface NetworkUtil : AFHTTPSessionManager - -+ (NetworkUtil*)sharedNetworkUtil; - -- (void)getMeiziWithUrl:(NSString*)url - page:(NSInteger)page - completion:(void (^)(NSArray *meiziArray, NSInteger nextPage))completion; - -@end diff --git a/Meizi/NetworkUtil.m b/Meizi/NetworkUtil.m deleted file mode 100644 index eec59f9..0000000 --- a/Meizi/NetworkUtil.m +++ /dev/null @@ -1,45 +0,0 @@ -// -// NetworkUtil.m -// Meizi -// -// Created by Sunnyyoung on 14-12-20. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. -// - -#import "NetworkUtil.h" - -@implementation NetworkUtil - -static NetworkUtil *singleton; - -+ (NetworkUtil*)sharedNetworkUtil { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - singleton = [[NetworkUtil alloc]init]; - singleton.requestSerializer.timeoutInterval = NETWORK_TIMOUT; - singleton.responseSerializer = [AFJSONResponseSerializer serializerWithReadingOptions:NSJSONReadingMutableContainers]; - singleton.responseSerializer.acceptableContentTypes = [singleton.responseSerializer.acceptableContentTypes setByAddingObjectsFromSet:[NSSet setWithObject:@"text/html"]]; - }); - return singleton; -} - -- (void)getMeiziWithUrl:(NSString*)url page:(NSInteger)page completion:(void (^)(NSArray *meiziArray, NSInteger nextPage))completion { - [self GET:url parameters:@{@"maxid": [@(page) stringValue]} success:^(NSURLSessionDataTask *task, id responseJSON) { - - BOOL isNetWorkOK = [responseJSON[@"data"] isEqualToString:@"ok"]; //判断返回是否正确 - NSArray *resultArray = responseJSON[@"imgs"]; //妹子数组 - - if (isNetWorkOK) { - completion(resultArray,[[resultArray lastObject][@"id"] integerValue]); - }else { - [SVProgressHUD showErrorWithStatus:NO_MEIZI_MSG]; - completion(nil,0); - } - - } failure:^(NSURLSessionDataTask *task, NSError *error) { - completion(nil,0); - [SVProgressHUD showErrorWithStatus:NETWORK_ERR_MSG maskType:SVProgressHUDMaskTypeGradient]; - }]; -} - -@end diff --git a/Meizi/PrefixHeader.pch b/Meizi/PrefixHeader.pch new file mode 100644 index 0000000..8f28326 --- /dev/null +++ b/Meizi/PrefixHeader.pch @@ -0,0 +1,18 @@ +// +// PrefixHeader.pch +// Meizi +// +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. +// + +#ifndef Meizi_PrefixHeader_pch +#define Meizi_PrefixHeader_pch + +#import +#import + +#import "Constant.h" +#import "Network.h" + +#endif diff --git a/Meizi/RootViewController.h b/Meizi/RootViewController.h deleted file mode 100644 index 6f90838..0000000 --- a/Meizi/RootViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// RootViewController.h -// Meizi -// -// Created by Sunnyyoung on 14-12-21. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. -// - -#import - -@interface RootViewController : SlideNavigationController - -@end diff --git a/Meizi/RootViewController.m b/Meizi/RootViewController.m deleted file mode 100644 index 2364d16..0000000 --- a/Meizi/RootViewController.m +++ /dev/null @@ -1,27 +0,0 @@ -// -// RootViewController.m -// Meizi -// -// Created by Sunnyyoung on 14-12-21. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. -// - -#import "RootViewController.h" - -@interface RootViewController () - -@end - -@implementation RootViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view. -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end diff --git a/Meizi/SettingTableViewController.h b/Meizi/SettingTableViewController.h deleted file mode 100644 index 9ab6949..0000000 --- a/Meizi/SettingTableViewController.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// SettingTableViewController.h -// Meizi -// -// Created by Sunnyyoung on 14-12-23. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. -// - -#import -#import -#import -#import -#import - -@interface SettingTableViewController : UITableViewController - -@property (weak, nonatomic) IBOutlet UILabel *CachesSizeLabel; - -@end diff --git a/Meizi/SettingTableViewController.m b/Meizi/SettingTableViewController.m deleted file mode 100644 index 672227f..0000000 --- a/Meizi/SettingTableViewController.m +++ /dev/null @@ -1,86 +0,0 @@ -// -// SettingTableViewController.m -// Meizi -// -// Created by Sunnyyoung on 14-12-23. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. -// - -#import "SettingTableViewController.h" -#import "Meizi.h" - -@interface SettingTableViewController () - -@property (nonatomic, strong)NSString *cachesPath; - -@end - -@implementation SettingTableViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - [self refreshCacheSize]; -} - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; -} - -#pragma mark - -- (BOOL)slideNavigationControllerShouldDisplayLeftMenu { - return YES; -} - -#pragma mark TableView delegate - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { - [tableView deselectRowAtIndexPath:indexPath animated:YES]; - switch (indexPath.section) { - case 0: { - if (indexPath.row == 1) { - [[[UIActionSheet alloc]initWithTitle:@"确认清除缓存图片?" - delegate:self - cancelButtonTitle:@"取消" - destructiveButtonTitle:@"确认清除" - otherButtonTitles:nil, nil]showInView:self.view]; - } - break; - } - } -} - -#pragma mark RefreshCacheSize - -- (void)refreshCacheSize { - [[SDImageCache sharedImageCache]calculateSizeWithCompletionBlock:^(NSUInteger fileCount, NSUInteger totalSize) { - _CachesSizeLabel.text = [NSString stringWithFormat:@"%.2f M",totalSize/1048576.]; - }]; -} - -#pragma mark DeleteCaches - -- (void)deleteCaches { - [SVProgressHUD showWithStatus:DELETE_ING maskType:SVProgressHUDMaskTypeGradient]; - [[SDImageCache sharedImageCache]clearDiskOnCompletion:^{ - [self refreshCacheSize]; - [SVProgressHUD showSuccessWithStatus:DELETE_SUCCESS_MSG]; - }]; -} - -#pragma mark - -- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { - switch (buttonIndex) { - case 0: { - [self deleteCaches]; - break; - } - case 1: { - [actionSheet dismissWithClickedButtonIndex:buttonIndex animated:YES]; - break; - } - } -} - -@end diff --git a/Meizi/SideBarViewController.h b/Meizi/SideBarViewController.h deleted file mode 100644 index 8d09e17..0000000 --- a/Meizi/SideBarViewController.h +++ /dev/null @@ -1,14 +0,0 @@ -// -// SideBarViewController.h -// Meizi -// -// Created by Sunnyyoung on 14-12-20. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. -// - -#import -#import - -@interface SideBarViewController : UITableViewController - -@end diff --git a/Meizi/Vendor/MJRefresh/MJRefresh.bundle/arrow@2x.png b/Meizi/Vendor/MJRefresh/MJRefresh.bundle/arrow@2x.png deleted file mode 100755 index a016473..0000000 Binary files a/Meizi/Vendor/MJRefresh/MJRefresh.bundle/arrow@2x.png and /dev/null differ diff --git a/Meizi/Vendor/MJRefresh/MJRefresh.h b/Meizi/Vendor/MJRefresh/MJRefresh.h deleted file mode 100755 index caebbd9..0000000 --- a/Meizi/Vendor/MJRefresh/MJRefresh.h +++ /dev/null @@ -1,32 +0,0 @@ -/** - * 代码地址: https://github.com/CoderMJLee/MJRefresh - * 代码地址: http://code4app.com/ios/%E5%BF%AB%E9%80%9F%E9%9B%86%E6%88%90%E4%B8%8B%E6%8B%89%E4%B8%8A%E6%8B%89%E5%88%B7%E6%96%B0/52326ce26803fabc46000000 - * 友情提示: 遇到一些小问题, 最好及时下载最新的代码试试 - */ - -#import "UIScrollView+MJRefresh.h" - -/** - MJ友情提示: - 1. 添加头部控件的方法 - [self.tableView addHeaderWithTarget:self action:@selector(headerRereshing)]; - 或者 - [self.tableView addHeaderWithCallback:^{ }]; - - 2. 添加尾部控件的方法 - [self.tableView addFooterWithTarget:self action:@selector(footerRereshing)]; - 或者 - [self.tableView addFooterWithCallback:^{ }]; - - 3. 可以在MJRefreshConst.h和MJRefreshConst.m文件中自定义显示的文字内容和文字颜色 - - 4. 本框架兼容iOS6\iOS7,iPhone\iPad横竖屏 - - 5.自动进入刷新状态 - 1> [self.tableView headerBeginRefreshing]; - 2> [self.tableView footerBeginRefreshing]; - - 6.结束刷新 - 1> [self.tableView headerEndRefreshing]; - 2> [self.tableView footerEndRefreshing]; -*/ \ No newline at end of file diff --git a/Meizi/Vendor/MJRefresh/MJRefreshBaseView.h b/Meizi/Vendor/MJRefresh/MJRefreshBaseView.h deleted file mode 100755 index b52a482..0000000 --- a/Meizi/Vendor/MJRefresh/MJRefreshBaseView.h +++ /dev/null @@ -1,78 +0,0 @@ -// -// MJRefreshBaseView.h -// MJRefresh -// -// Created by mj on 13-3-4. -// Copyright (c) 2013年 itcast. All rights reserved. - -#import - -@class MJRefreshBaseView; - -#pragma mark - 控件的刷新状态 -typedef enum { - MJRefreshStatePulling = 1, // 松开就可以进行刷新的状态 - MJRefreshStateNormal = 2, // 普通状态 - MJRefreshStateRefreshing = 3, // 正在刷新中的状态 - MJRefreshStateWillRefreshing = 4 -} MJRefreshState; - -#pragma mark - 控件的类型 -typedef enum { - MJRefreshViewTypeHeader = -1, // 头部控件 - MJRefreshViewTypeFooter = 1 // 尾部控件 -} MJRefreshViewType; - -/** - 类的声明 - */ -@interface MJRefreshBaseView : UIView -#pragma mark - 父控件 -@property (nonatomic, weak, readonly) UIScrollView *scrollView; -@property (nonatomic, assign, readonly) UIEdgeInsets scrollViewOriginalInset; - -#pragma mark - 内部的控件 -@property (nonatomic, weak, readonly) UILabel *statusLabel; -@property (nonatomic, weak, readonly) UIImageView *arrowImage; -@property (nonatomic, weak, readonly) UIActivityIndicatorView *activityView; - -#pragma mark - 回调 -/** - * 开始进入刷新状态的监听器 - */ -@property (weak, nonatomic) id beginRefreshingTaget; -/** - * 开始进入刷新状态的监听方法 - */ -@property (assign, nonatomic) SEL beginRefreshingAction; -/** - * 开始进入刷新状态就会调用 - */ -@property (nonatomic, copy) void (^beginRefreshingCallback)(); - -#pragma mark - 刷新相关 -/** - * 是否正在刷新 - */ -@property (nonatomic, readonly, getter=isRefreshing) BOOL refreshing; -/** - * 开始刷新 - */ -- (void)beginRefreshing; -/** - * 结束刷新 - */ -- (void)endRefreshing; - -#pragma mark - 交给子类去实现 和 调用 -@property (assign, nonatomic) MJRefreshState state; -/** 处于刷新结束的状态 */ -@property (readonly, getter=isEndingRefresh) BOOL endingRefresh; - -/** - * 文字 - */ -@property (copy, nonatomic) NSString *pullToRefreshText; -@property (copy, nonatomic) NSString *releaseToRefreshText; -@property (copy, nonatomic) NSString *refreshingText; -@end \ No newline at end of file diff --git a/Meizi/Vendor/MJRefresh/MJRefreshBaseView.m b/Meizi/Vendor/MJRefresh/MJRefreshBaseView.m deleted file mode 100755 index d7e9555..0000000 --- a/Meizi/Vendor/MJRefresh/MJRefreshBaseView.m +++ /dev/null @@ -1,288 +0,0 @@ -// -// MJRefreshBaseView.m -// MJRefresh -// -// Created by mj on 13-3-4. -// Copyright (c) 2013年 itcast. All rights reserved. -// - -#import "MJRefreshBaseView.h" -#import "MJRefreshConst.h" -#import "UIView+MJExtension.h" -#import "UIScrollView+MJExtension.h" -#import - -@interface MJRefreshBaseView() -{ - __weak UILabel *_statusLabel; - __weak UIImageView *_arrowImage; - __weak UIActivityIndicatorView *_activityView; - BOOL _endingRefresh; -} -@end - -@implementation MJRefreshBaseView -#pragma mark - 控件初始化 -/** - * 状态标签 - */ -- (UILabel *)statusLabel -{ - if (!_statusLabel) { - UILabel *statusLabel = [[UILabel alloc] init]; - statusLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth; - statusLabel.font = [UIFont boldSystemFontOfSize:13]; - statusLabel.textColor = MJRefreshLabelTextColor; - statusLabel.backgroundColor = [UIColor clearColor]; - statusLabel.textAlignment = NSTextAlignmentCenter; - [self addSubview:_statusLabel = statusLabel]; - } - return _statusLabel; -} - -/** - * 箭头图片 - */ -- (UIImageView *)arrowImage -{ - if (!_arrowImage) { - UIImageView *arrowImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:MJRefreshSrcName(@"arrow.png")]]; - arrowImage.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; - [self addSubview:_arrowImage = arrowImage]; - } - return _arrowImage; -} - -/** - * 状态标签 - */ -- (UIActivityIndicatorView *)activityView -{ - if (!_activityView) { - UIActivityIndicatorView *activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; - activityView.bounds = self.arrowImage.bounds; - activityView.autoresizingMask = self.arrowImage.autoresizingMask; - [self addSubview:_activityView = activityView]; - } - return _activityView; -} - -#pragma mark - 初始化方法 -- (instancetype)initWithFrame:(CGRect)frame { - frame.size.height = MJRefreshViewHeight; - if (self = [super initWithFrame:frame]) { - // 1.自己的属性 - self.autoresizingMask = UIViewAutoresizingFlexibleWidth; - self.backgroundColor = [UIColor clearColor]; - - // 2.设置默认状态 - self.state = MJRefreshStateNormal; - } - return self; -} - -- (void)layoutSubviews -{ - [super layoutSubviews]; - - // 1.箭头 - CGFloat arrowX = self.mj_width * 0.5 - 100; - self.arrowImage.center = CGPointMake(arrowX, self.mj_height * 0.5); - - // 2.指示器 - self.activityView.center = self.arrowImage.center; -} - -- (void)willMoveToSuperview:(UIView *)newSuperview -{ - [super willMoveToSuperview:newSuperview]; - - // 旧的父控件 - [self.superview removeObserver:self forKeyPath:MJRefreshContentOffset context:nil]; - - if (newSuperview) { // 新的父控件 - [newSuperview addObserver:self forKeyPath:MJRefreshContentOffset options:NSKeyValueObservingOptionNew context:nil]; - - // 设置宽度 - self.mj_width = newSuperview.mj_width; - // 设置位置 - self.mj_x = 0; - - // 记录UIScrollView - _scrollView = (UIScrollView *)newSuperview; - // 设置永远支持垂直弹簧效果 - _scrollView.alwaysBounceVertical = YES; - // 记录UIScrollView最开始的contentInset - _scrollViewOriginalInset = _scrollView.contentInset; - } -} - -#pragma mark - 显示到屏幕上 -- (void)drawRect:(CGRect)rect -{ - if (self.state == MJRefreshStateWillRefreshing) { - self.state = MJRefreshStateRefreshing; - } -} - -#pragma mark - 刷新相关 -#pragma mark 是否正在刷新 -- (BOOL)isRefreshing -{ - return MJRefreshStateRefreshing == self.state; -} - -#pragma mark 开始刷新 -- (void)beginRefreshing -{ - if (self.state == MJRefreshStateRefreshing) { - // 回调 - if ([self.beginRefreshingTaget respondsToSelector:self.beginRefreshingAction]) { - msgSend(msgTarget(self.beginRefreshingTaget), self.beginRefreshingAction, self); - } - - if (self.beginRefreshingCallback) { - self.beginRefreshingCallback(); - } - } else { - if (self.window) { - self.state = MJRefreshStateRefreshing; - } else { - _state = MJRefreshStateWillRefreshing; - [self setNeedsDisplay]; - } - } -} - -#pragma mark 结束刷新 -- (void)endRefreshing -{ - double delayInSeconds = 0.3; - dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); - dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ - self.state = MJRefreshStateNormal; - }); -} - -#pragma mark - 设置状态 -- (void)setPullToRefreshText:(NSString *)pullToRefreshText -{ - _pullToRefreshText = [pullToRefreshText copy]; - [self settingLabelText]; -} -- (void)setReleaseToRefreshText:(NSString *)releaseToRefreshText -{ - _releaseToRefreshText = [releaseToRefreshText copy]; - [self settingLabelText]; -} -- (void)setRefreshingText:(NSString *)refreshingText -{ - _refreshingText = [refreshingText copy]; - [self settingLabelText]; -} -- (void)settingLabelText -{ - switch (self.state) { - case MJRefreshStateNormal: - // 设置文字 - self.statusLabel.text = self.pullToRefreshText; - break; - case MJRefreshStatePulling: - // 设置文字 - self.statusLabel.text = self.releaseToRefreshText; - break; - case MJRefreshStateRefreshing: - // 设置文字 - self.statusLabel.text = self.refreshingText; - break; - default: - break; - } -} - -- (void)setState:(MJRefreshState)state -{ - // 0.存储当前的contentInset - if (self.state != MJRefreshStateRefreshing) { - _scrollViewOriginalInset = self.scrollView.contentInset; - } - - // 1.一样的就直接返回(暂时不返回) - if (self.state == state) return; - - // 2.旧状态 - MJRefreshState oldState = self.state; - - // 3.存储状态 - _state = state; - - // 4.根据状态执行不同的操作 - switch (state) { - case MJRefreshStateNormal: // 普通状态 - { - if (oldState == MJRefreshStateRefreshing) { - // 正在结束刷新 - _endingRefresh = YES; - - [UIView animateWithDuration:MJRefreshSlowAnimationDuration * 0.6 animations:^{ - self.activityView.alpha = 0.0; - } completion:^(BOOL finished) { - // 停止转圈圈 - [self.activityView stopAnimating]; - - // 恢复alpha - self.activityView.alpha = 1.0; - }]; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(MJRefreshSlowAnimationDuration * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ // 等头部回去 - // 显示箭头 - self.arrowImage.hidden = NO; - - // 停止转圈圈 - [self.activityView stopAnimating]; - - // 设置文字 - [self settingLabelText]; - - // 结束刷新完毕 - _endingRefresh = NO; - }); - // 直接返回 - return; - } else { - // 显示箭头 - self.arrowImage.hidden = NO; - - // 停止转圈圈 - [self.activityView stopAnimating]; - } - break; - } - - case MJRefreshStatePulling: - break; - - case MJRefreshStateRefreshing: - { - // 开始转圈圈 - [self.activityView startAnimating]; - // 隐藏箭头 - self.arrowImage.hidden = YES; - - // 回调 - if ([self.beginRefreshingTaget respondsToSelector:self.beginRefreshingAction]) { - msgSend(msgTarget(self.beginRefreshingTaget), self.beginRefreshingAction, self); - } - - if (self.beginRefreshingCallback) { - self.beginRefreshingCallback(); - } - break; - } - default: - break; - } - - // 5.设置文字 - [self settingLabelText]; -} -@end \ No newline at end of file diff --git a/Meizi/Vendor/MJRefresh/MJRefreshConst.h b/Meizi/Vendor/MJRefresh/MJRefreshConst.h deleted file mode 100755 index ae71f2a..0000000 --- a/Meizi/Vendor/MJRefresh/MJRefreshConst.h +++ /dev/null @@ -1,41 +0,0 @@ -// -// MJRefreshConst.h -// MJRefresh -// -// Created by mj on 14-1-3. -// Copyright (c) 2014年 itcast. All rights reserved. -// -#import - -#ifdef DEBUG -#define MJLog(...) NSLog(__VA_ARGS__) -#else -#define MJLog(...) -#endif - -// objc_msgSend -#define msgSend(...) ((void (*)(void *, SEL, UIView *))objc_msgSend)(__VA_ARGS__) -#define msgTarget(target) (__bridge void *)(target) - -#define MJColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0] -// 文字颜色 -#define MJRefreshLabelTextColor MJColor(150, 150, 150) - -// 图片路径 -#define MJRefreshSrcName(file) [@"MJRefresh.bundle" stringByAppendingPathComponent:file] - -UIKIT_EXTERN const CGFloat MJRefreshViewHeight; -UIKIT_EXTERN const CGFloat MJRefreshFastAnimationDuration; -UIKIT_EXTERN const CGFloat MJRefreshSlowAnimationDuration; - -UIKIT_EXTERN NSString *const MJRefreshFooterPullToRefresh; -UIKIT_EXTERN NSString *const MJRefreshFooterReleaseToRefresh; -UIKIT_EXTERN NSString *const MJRefreshFooterRefreshing; - -UIKIT_EXTERN NSString *const MJRefreshHeaderPullToRefresh; -UIKIT_EXTERN NSString *const MJRefreshHeaderReleaseToRefresh; -UIKIT_EXTERN NSString *const MJRefreshHeaderRefreshing; -UIKIT_EXTERN NSString *const MJRefreshHeaderTimeKey; - -UIKIT_EXTERN NSString *const MJRefreshContentOffset; -extern NSString *const MJRefreshContentSize; \ No newline at end of file diff --git a/Meizi/Vendor/MJRefresh/MJRefreshConst.m b/Meizi/Vendor/MJRefresh/MJRefreshConst.m deleted file mode 100755 index 8e7f304..0000000 --- a/Meizi/Vendor/MJRefresh/MJRefreshConst.m +++ /dev/null @@ -1,25 +0,0 @@ -// -// MJRefreshConst.m -// MJRefresh -// -// Created by mj on 14-1-3. -// Copyright (c) 2014年 itcast. All rights reserved. -// - -#import - -const CGFloat MJRefreshViewHeight = 64.0; -const CGFloat MJRefreshFastAnimationDuration = 0.25; -const CGFloat MJRefreshSlowAnimationDuration = 0.4; - -NSString *const MJRefreshFooterPullToRefresh = @"上拉加载更多妹子"; -NSString *const MJRefreshFooterReleaseToRefresh = @"松开加载更多妹子"; -NSString *const MJRefreshFooterRefreshing = @"正在加载妹子..."; - -NSString *const MJRefreshHeaderPullToRefresh = @"下拉刷新妹子"; -NSString *const MJRefreshHeaderReleaseToRefresh = @"松开立即刷新妹子"; -NSString *const MJRefreshHeaderRefreshing = @"正在刷新妹子..."; -NSString *const MJRefreshHeaderTimeKey = @"MJRefreshHeaderView"; - -NSString *const MJRefreshContentOffset = @"contentOffset"; -NSString *const MJRefreshContentSize = @"contentSize"; \ No newline at end of file diff --git a/Meizi/Vendor/MJRefresh/MJRefreshFooterView.h b/Meizi/Vendor/MJRefresh/MJRefreshFooterView.h deleted file mode 100755 index 0d0b94d..0000000 --- a/Meizi/Vendor/MJRefresh/MJRefreshFooterView.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// MJRefreshTableFooterView.h -// MJRefresh -// -// Created by mj on 13-2-26. -// Copyright (c) 2013年 itcast. All rights reserved. -// 上拉加载更多 - -#import "MJRefreshBaseView.h" - -@interface MJRefreshFooterView : MJRefreshBaseView -+ (instancetype)footer; -@end \ No newline at end of file diff --git a/Meizi/Vendor/MJRefresh/MJRefreshFooterView.m b/Meizi/Vendor/MJRefresh/MJRefreshFooterView.m deleted file mode 100755 index 40682d9..0000000 --- a/Meizi/Vendor/MJRefresh/MJRefreshFooterView.m +++ /dev/null @@ -1,225 +0,0 @@ -// -// MJRefreshFooterView.m -// MJRefresh -// -// Created by mj on 13-2-26. -// Copyright (c) 2013年 itcast. All rights reserved. -// 上拉加载更多 - -#import "MJRefreshFooterView.h" -#import "MJRefreshConst.h" -#import "UIView+MJExtension.h" -#import "UIScrollView+MJExtension.h" - -@interface MJRefreshFooterView() -@property (assign, nonatomic) NSInteger lastRefreshCount; -@end - -@implementation MJRefreshFooterView - -+ (instancetype)footer -{ - return [[MJRefreshFooterView alloc] init]; -} - -- (id)initWithFrame:(CGRect)frame -{ - if (self = [super initWithFrame:frame]) { - self.pullToRefreshText = MJRefreshFooterPullToRefresh; - self.releaseToRefreshText = MJRefreshFooterReleaseToRefresh; - self.refreshingText = MJRefreshFooterRefreshing; - } - return self; -} - -- (void)layoutSubviews -{ - [super layoutSubviews]; - - self.statusLabel.frame = self.bounds; -} - -- (void)willMoveToSuperview:(UIView *)newSuperview -{ - [super willMoveToSuperview:newSuperview]; - - // 旧的父控件 - [self.superview removeObserver:self forKeyPath:MJRefreshContentSize context:nil]; - - if (newSuperview) { // 新的父控件 - // 监听 - [newSuperview addObserver:self forKeyPath:MJRefreshContentSize options:NSKeyValueObservingOptionNew context:nil]; - - // 重新调整frame - [self adjustFrameWithContentSize]; - } -} - -#pragma mark 重写调整frame -- (void)adjustFrameWithContentSize -{ - // 内容的高度 - CGFloat contentHeight = self.scrollView.mj_contentSizeHeight; - // 表格的高度 - CGFloat scrollHeight = self.scrollView.mj_height - self.scrollViewOriginalInset.top - self.scrollViewOriginalInset.bottom; - // 设置位置和尺寸 - self.mj_y = MAX(contentHeight, scrollHeight); -} - -#pragma mark 监听UIScrollView的属性 -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context -{ - // 不能跟用户交互,直接返回 - if (!self.userInteractionEnabled || self.alpha <= 0.01 || self.hidden) return; - - if ([MJRefreshContentSize isEqualToString:keyPath]) { - // 调整frame - [self adjustFrameWithContentSize]; - } else if ([MJRefreshContentOffset isEqualToString:keyPath]) { - // 如果正在刷新,直接返回 - if (self.state == MJRefreshStateRefreshing || self.endingRefresh) return; - - // 调整状态 - [self adjustStateWithContentOffset]; - } -} - -/** - * 调整状态 - */ -- (void)adjustStateWithContentOffset -{ - // 当前的contentOffset - CGFloat currentOffsetY = self.scrollView.mj_contentOffsetY; - // 尾部控件刚好出现的offsetY - CGFloat happenOffsetY = [self happenOffsetY]; - - // 如果是向下滚动到看不见尾部控件,直接返回 - if (currentOffsetY <= happenOffsetY) return; - - if (self.scrollView.isDragging) { - // 普通 和 即将刷新 的临界点 - CGFloat normal2pullingOffsetY = happenOffsetY + self.mj_height; - - if (self.state == MJRefreshStateNormal && currentOffsetY > normal2pullingOffsetY) { - // 转为即将刷新状态 - self.state = MJRefreshStatePulling; - } else if (self.state == MJRefreshStatePulling && currentOffsetY <= normal2pullingOffsetY) { - // 转为普通状态 - self.state = MJRefreshStateNormal; - } - } else if (self.state == MJRefreshStatePulling) {// 即将刷新 && 手松开 - // 开始刷新 - self.state = MJRefreshStateRefreshing; - } -} - -#pragma mark - 状态相关 -#pragma mark 设置状态 -- (void)setState:(MJRefreshState)state -{ - // 1.一样的就直接返回 - if (self.state == state) return; - - // 2.保存旧状态 - MJRefreshState oldState = self.state; - - // 3.调用父类方法 - [super setState:state]; - - // 4.根据状态来设置属性 - switch (state) - { - case MJRefreshStateNormal: - { - // 刷新完毕 - if (MJRefreshStateRefreshing == oldState) { - self.arrowImage.transform = CGAffineTransformMakeRotation(M_PI); - [UIView animateWithDuration:MJRefreshSlowAnimationDuration animations:^{ - self.scrollView.mj_contentInsetBottom = self.scrollViewOriginalInset.bottom; - }]; - } else { - // 执行动画 - [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ - self.arrowImage.transform = CGAffineTransformMakeRotation(M_PI); - }]; - } - - CGFloat deltaH = [self heightForContentBreakView]; - NSInteger currentCount = [self totalDataCountInScrollView]; - // 刚刷新完毕 - if (MJRefreshStateRefreshing == oldState && deltaH > 0 && currentCount != self.lastRefreshCount) { - self.scrollView.mj_contentOffsetY = self.scrollView.mj_contentOffsetY; - } - break; - } - - case MJRefreshStatePulling: - { - [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ - self.arrowImage.transform = CGAffineTransformIdentity; - }]; - break; - } - - case MJRefreshStateRefreshing: - { - // 记录刷新前的数量 - self.lastRefreshCount = [self totalDataCountInScrollView]; - - [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ - CGFloat bottom = self.mj_height + self.scrollViewOriginalInset.bottom; - CGFloat deltaH = [self heightForContentBreakView]; - if (deltaH < 0) { // 如果内容高度小于view的高度 - bottom -= deltaH; - } - self.scrollView.mj_contentInsetBottom = bottom; - }]; - break; - } - - default: - break; - } -} - -- (NSInteger)totalDataCountInScrollView -{ - NSInteger totalCount = 0; - if ([self.scrollView isKindOfClass:[UITableView class]]) { - UITableView *tableView = (UITableView *)self.scrollView; - - for (NSInteger section = 0; section 0) { - return deltaH - self.scrollViewOriginalInset.top; - } else { - return - self.scrollViewOriginalInset.top; - } -} -@end \ No newline at end of file diff --git a/Meizi/Vendor/MJRefresh/MJRefreshHeaderView.h b/Meizi/Vendor/MJRefresh/MJRefreshHeaderView.h deleted file mode 100755 index 3c7ff9f..0000000 --- a/Meizi/Vendor/MJRefresh/MJRefreshHeaderView.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// MJRefreshHeaderView.h -// MJRefresh -// -// Created by mj on 13-2-26. -// Copyright (c) 2013年 itcast. All rights reserved. -// 下拉刷新 - -#import "MJRefreshBaseView.h" - -@interface MJRefreshHeaderView : MJRefreshBaseView - -@property (nonatomic, copy) NSString *dateKey; -+ (instancetype)header; - -@end \ No newline at end of file diff --git a/Meizi/Vendor/MJRefresh/MJRefreshHeaderView.m b/Meizi/Vendor/MJRefresh/MJRefreshHeaderView.m deleted file mode 100755 index e94419f..0000000 --- a/Meizi/Vendor/MJRefresh/MJRefreshHeaderView.m +++ /dev/null @@ -1,244 +0,0 @@ -// -// MJRefreshHeaderView.m -// MJRefresh -// -// Created by mj on 13-2-26. -// Copyright (c) 2013年 itcast. All rights reserved. -// 下拉刷新 - -#import "MJRefreshConst.h" -#import "MJRefreshHeaderView.h" -#import "UIView+MJExtension.h" -#import "UIScrollView+MJExtension.h" - -@interface MJRefreshHeaderView() -// 最后的更新时间 -@property (nonatomic, strong) NSDate *lastUpdateTime; -@property (nonatomic, weak) UILabel *lastUpdateTimeLabel; -@end - -@implementation MJRefreshHeaderView -#pragma mark - 控件初始化 -/** - * 时间标签 - */ -- (UILabel *)lastUpdateTimeLabel -{ - if (!_lastUpdateTimeLabel) { - // 1.创建控件 - UILabel *lastUpdateTimeLabel = [[UILabel alloc] init]; - lastUpdateTimeLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth; - lastUpdateTimeLabel.font = [UIFont boldSystemFontOfSize:12]; - lastUpdateTimeLabel.textColor = MJRefreshLabelTextColor; - lastUpdateTimeLabel.backgroundColor = [UIColor clearColor]; - lastUpdateTimeLabel.textAlignment = NSTextAlignmentCenter; - [self addSubview:_lastUpdateTimeLabel = lastUpdateTimeLabel]; - - // 2.加载时间 - if(self.dateKey){ - self.lastUpdateTime = [[NSUserDefaults standardUserDefaults] objectForKey:self.dateKey]; - } else { - self.lastUpdateTime = [[NSUserDefaults standardUserDefaults] objectForKey:MJRefreshHeaderTimeKey]; - } - } - return _lastUpdateTimeLabel; -} - -+ (instancetype)header -{ - return [[MJRefreshHeaderView alloc] init]; -} - -- (id)initWithFrame:(CGRect)frame -{ - if (self = [super initWithFrame:frame]) { - self.pullToRefreshText = MJRefreshHeaderPullToRefresh; - self.releaseToRefreshText = MJRefreshHeaderReleaseToRefresh; - self.refreshingText = MJRefreshHeaderRefreshing; - } - return self; -} - -- (void)layoutSubviews -{ - [super layoutSubviews]; - - CGFloat statusX = 0; - CGFloat statusY = 0; - CGFloat statusHeight = self.mj_height * 0.5; - CGFloat statusWidth = self.mj_width; - // 1.状态标签 - self.statusLabel.frame = CGRectMake(statusX, statusY, statusWidth, statusHeight); - - // 2.时间标签 - CGFloat lastUpdateY = statusHeight; - CGFloat lastUpdateX = 0; - CGFloat lastUpdateHeight = statusHeight; - CGFloat lastUpdateWidth = statusWidth; - self.lastUpdateTimeLabel.frame = CGRectMake(lastUpdateX, lastUpdateY, lastUpdateWidth, lastUpdateHeight); -} - -- (void)willMoveToSuperview:(UIView *)newSuperview -{ - [super willMoveToSuperview:newSuperview]; - - // 设置自己的位置和尺寸 - self.mj_y = - self.mj_height; -} - -#pragma mark - 状态相关 -#pragma mark 设置最后的更新时间 -- (void)setLastUpdateTime:(NSDate *)lastUpdateTime -{ - _lastUpdateTime = lastUpdateTime; - - // 1.归档 - if(self.dateKey){ - [[NSUserDefaults standardUserDefaults] setObject:lastUpdateTime forKey:self.dateKey]; - } else{ - [[NSUserDefaults standardUserDefaults] setObject:lastUpdateTime forKey:MJRefreshHeaderTimeKey]; - } - [[NSUserDefaults standardUserDefaults] synchronize]; - - // 2.更新时间 - [self updateTimeLabel]; -} - -#pragma mark 更新时间字符串 -- (void)updateTimeLabel -{ - if (!self.lastUpdateTime) return; - - // 1.获得年月日 - NSCalendar *calendar = [NSCalendar currentCalendar]; - NSUInteger unitFlags = NSCalendarUnitYear| NSCalendarUnitMonth | NSCalendarUnitDay |NSCalendarUnitHour |NSCalendarUnitMinute; - NSDateComponents *cmp1 = [calendar components:unitFlags fromDate:_lastUpdateTime]; - NSDateComponents *cmp2 = [calendar components:unitFlags fromDate:[NSDate date]]; - - // 2.格式化日期 - NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; - if ([cmp1 day] == [cmp2 day]) { // 今天 - formatter.dateFormat = @"今天 HH:mm"; - } else if ([cmp1 year] == [cmp2 year]) { // 今年 - formatter.dateFormat = @"MM-dd HH:mm"; - } else { - formatter.dateFormat = @"yyyy-MM-dd HH:mm"; - } - NSString *time = [formatter stringFromDate:self.lastUpdateTime]; - - // 3.显示日期 - self.lastUpdateTimeLabel.text = [NSString stringWithFormat:@"最后更新:%@", time]; -} - -#pragma mark - 监听UIScrollView的contentOffset属性 -- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context -{ - // 不能跟用户交互就直接返回 - if (!self.userInteractionEnabled || self.alpha <= 0.01 || self.hidden) return; - - // 如果正在刷新,直接返回 - if (self.state == MJRefreshStateRefreshing || self.endingRefresh) return; - - if ([MJRefreshContentOffset isEqualToString:keyPath]) { - [self adjustStateWithContentOffset]; - } -} - -/** - * 调整状态 - */ -- (void)adjustStateWithContentOffset -{ - // 当前的contentOffset - CGFloat currentOffsetY = self.scrollView.mj_contentOffsetY; - // 头部控件刚好出现的offsetY - CGFloat happenOffsetY = - self.scrollViewOriginalInset.top; - - // 如果是向上滚动到看不见头部控件,直接返回 - if (currentOffsetY >= happenOffsetY) return; - - if (self.scrollView.isDragging) { - // 普通 和 即将刷新 的临界点 - CGFloat normal2pullingOffsetY = happenOffsetY - self.mj_height; - - if (self.state == MJRefreshStateNormal && currentOffsetY < normal2pullingOffsetY) { - // 转为即将刷新状态 - self.state = MJRefreshStatePulling; - } else if (self.state == MJRefreshStatePulling && currentOffsetY >= normal2pullingOffsetY) { - // 转为普通状态 - self.state = MJRefreshStateNormal; - } - } else if (self.state == MJRefreshStatePulling) {// 即将刷新 && 手松开 - // 开始刷新 - self.state = MJRefreshStateRefreshing; - } -} - -#pragma mark 设置状态 -- (void)setState:(MJRefreshState)state -{ - // 1.一样的就直接返回 - if (self.state == state) return; - - // 2.保存旧状态 - MJRefreshState oldState = self.state; - - // 3.调用父类方法 - [super setState:state]; - - // 4.根据状态执行不同的操作 - switch (state) { - case MJRefreshStateNormal: // 下拉可以刷新 - { - // 刷新完毕 - if (MJRefreshStateRefreshing == oldState) { - self.arrowImage.transform = CGAffineTransformIdentity; - // 保存刷新时间 - self.lastUpdateTime = [NSDate date]; - - [UIView animateWithDuration:MJRefreshSlowAnimationDuration animations:^{ - if (self.scrollViewOriginalInset.top == 0) { - self.scrollView.mj_contentInsetTop = 0; - } else if (self.scrollViewOriginalInset.top == self.scrollView.mj_contentInsetTop) { - self.scrollView.mj_contentInsetTop -= self.mj_height; - } else { - self.scrollView.mj_contentInsetTop = self.scrollViewOriginalInset.top; - } - }]; - } else { - // 执行动画 - [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ - self.arrowImage.transform = CGAffineTransformIdentity; - }]; - } - break; - } - - case MJRefreshStatePulling: // 松开可立即刷新 - { - // 执行动画 - [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ - self.arrowImage.transform = CGAffineTransformMakeRotation(M_PI); - }]; - break; - } - - case MJRefreshStateRefreshing: // 正在刷新中 - { - // 执行动画 - [UIView animateWithDuration:MJRefreshFastAnimationDuration animations:^{ - // 1.增加滚动区域 - CGFloat top = self.scrollViewOriginalInset.top + self.mj_height; - self.scrollView.mj_contentInsetTop = top; - - // 2.设置滚动位置 - self.scrollView.mj_contentOffsetY = - top; - }]; - break; - } - - default: - break; - } -} -@end \ No newline at end of file diff --git a/Meizi/Vendor/MJRefresh/UIScrollView+MJExtension.h b/Meizi/Vendor/MJRefresh/UIScrollView+MJExtension.h deleted file mode 100644 index 96f5283..0000000 --- a/Meizi/Vendor/MJRefresh/UIScrollView+MJExtension.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// UIScrollView+Extension.h -// MJRefreshExample -// -// Created by MJ Lee on 14-5-28. -// Copyright (c) 2014年 itcast. All rights reserved. -// - -#import - -@interface UIScrollView (MJExtension) -@property (assign, nonatomic) CGFloat mj_contentInsetTop; -@property (assign, nonatomic) CGFloat mj_contentInsetBottom; -@property (assign, nonatomic) CGFloat mj_contentInsetLeft; -@property (assign, nonatomic) CGFloat mj_contentInsetRight; - -@property (assign, nonatomic) CGFloat mj_contentOffsetX; -@property (assign, nonatomic) CGFloat mj_contentOffsetY; - -@property (assign, nonatomic) CGFloat mj_contentSizeWidth; -@property (assign, nonatomic) CGFloat mj_contentSizeHeight; -@end diff --git a/Meizi/Vendor/MJRefresh/UIScrollView+MJExtension.m b/Meizi/Vendor/MJRefresh/UIScrollView+MJExtension.m deleted file mode 100644 index 0a5fe07..0000000 --- a/Meizi/Vendor/MJRefresh/UIScrollView+MJExtension.m +++ /dev/null @@ -1,107 +0,0 @@ -// -// UIScrollView+Extension.m -// MJRefreshExample -// -// Created by MJ Lee on 14-5-28. -// Copyright (c) 2014年 itcast. All rights reserved. -// - -#import "UIScrollView+MJExtension.h" - -@implementation UIScrollView (MJExtension) -- (void)setMj_contentInsetTop:(CGFloat)mj_contentInsetTop -{ - UIEdgeInsets inset = self.contentInset; - inset.top = mj_contentInsetTop; - self.contentInset = inset; -} - -- (CGFloat)mj_contentInsetTop -{ - return self.contentInset.top; -} - -- (void)setMj_contentInsetBottom:(CGFloat)mj_contentInsetBottom -{ - UIEdgeInsets inset = self.contentInset; - inset.bottom = mj_contentInsetBottom; - self.contentInset = inset; -} - -- (CGFloat)mj_contentInsetBottom -{ - return self.contentInset.bottom; -} - -- (void)setMj_contentInsetLeft:(CGFloat)mj_contentInsetLeft -{ - UIEdgeInsets inset = self.contentInset; - inset.left = mj_contentInsetLeft; - self.contentInset = inset; -} - -- (CGFloat)mj_contentInsetLeft -{ - return self.contentInset.left; -} - -- (void)setMj_contentInsetRight:(CGFloat)mj_contentInsetRight -{ - UIEdgeInsets inset = self.contentInset; - inset.right = mj_contentInsetRight; - self.contentInset = inset; -} - -- (CGFloat)mj_contentInsetRight -{ - return self.contentInset.right; -} - -- (void)setMj_contentOffsetX:(CGFloat)mj_contentOffsetX -{ - CGPoint offset = self.contentOffset; - offset.x = mj_contentOffsetX; - self.contentOffset = offset; -} - -- (CGFloat)mj_contentOffsetX -{ - return self.contentOffset.x; -} - -- (void)setMj_contentOffsetY:(CGFloat)mj_contentOffsetY -{ - CGPoint offset = self.contentOffset; - offset.y = mj_contentOffsetY; - self.contentOffset = offset; -} - -- (CGFloat)mj_contentOffsetY -{ - return self.contentOffset.y; -} - -- (void)setMj_contentSizeWidth:(CGFloat)mj_contentSizeWidth -{ - CGSize size = self.contentSize; - size.width = mj_contentSizeWidth; - self.contentSize = size; -} - -- (CGFloat)mj_contentSizeWidth -{ - return self.contentSize.width; -} - -- (void)setMj_contentSizeHeight:(CGFloat)mj_contentSizeHeight -{ - CGSize size = self.contentSize; - size.height = mj_contentSizeHeight; - self.contentSize = size; -} - -- (CGFloat)mj_contentSizeHeight -{ - return self.contentSize.height; -} -@end diff --git a/Meizi/Vendor/MJRefresh/UIScrollView+MJRefresh.h b/Meizi/Vendor/MJRefresh/UIScrollView+MJRefresh.h deleted file mode 100644 index e5ae65b..0000000 --- a/Meizi/Vendor/MJRefresh/UIScrollView+MJRefresh.h +++ /dev/null @@ -1,124 +0,0 @@ -// -// UIScrollView+MJRefresh.h -// MJRefreshExample -// -// Created by MJ Lee on 14-5-28. -// Copyright (c) 2014年 itcast. All rights reserved. -// - -#import - -@interface UIScrollView (MJRefresh) -#pragma mark - 下拉刷新 -/** - * 添加一个下拉刷新头部控件 - * - * @param callback 回调 - */ -- (void)addHeaderWithCallback:(void (^)())callback; - -/** - * 添加一个下拉刷新头部控件 - * - * @param callback 回调 - * @param dateKey 刷新时间保存的key值 - */ -- (void)addHeaderWithCallback:(void (^)())callback dateKey:(NSString*)dateKey; - -/** - * 添加一个下拉刷新头部控件 - * - * @param target 目标 - * @param action 回调方法 - */ -- (void)addHeaderWithTarget:(id)target action:(SEL)action; - -/** - * 添加一个下拉刷新头部控件 - * - * @param target 目标 - * @param action 回调方法 - * @param dateKey 刷新时间保存的key值 - */ -- (void)addHeaderWithTarget:(id)target action:(SEL)action dateKey:(NSString*)dateKey; - -/** - * 移除下拉刷新头部控件 - */ -- (void)removeHeader; - -/** - * 主动让下拉刷新头部控件进入刷新状态 - */ -- (void)headerBeginRefreshing; - -/** - * 让下拉刷新头部控件停止刷新状态 - */ -- (void)headerEndRefreshing; - -/** - * 下拉刷新头部控件的可见性 - */ -@property (nonatomic, assign, getter = isHeaderHidden) BOOL headerHidden; - -/** - * 是否正在下拉刷新 - */ -@property (nonatomic, assign, readonly, getter = isHeaderRefreshing) BOOL headerRefreshing; - -#pragma mark - 上拉刷新 -/** - * 添加一个上拉刷新尾部控件 - * - * @param callback 回调 - */ -- (void)addFooterWithCallback:(void (^)())callback; - -/** - * 添加一个上拉刷新尾部控件 - * - * @param target 目标 - * @param action 回调方法 - */ -- (void)addFooterWithTarget:(id)target action:(SEL)action; - -/** - * 移除上拉刷新尾部控件 - */ -- (void)removeFooter; - -/** - * 主动让上拉刷新尾部控件进入刷新状态 - */ -- (void)footerBeginRefreshing; - -/** - * 让上拉刷新尾部控件停止刷新状态 - */ -- (void)footerEndRefreshing; - -/** - * 上拉刷新头部控件的可见性 - */ -@property (nonatomic, assign, getter = isFooterHidden) BOOL footerHidden; - -/** - * 是否正在上拉刷新 - */ -@property (nonatomic, assign, readonly, getter = isFooterRefreshing) BOOL footerRefreshing; - -/** - * 设置尾部控件的文字 - */ -@property (copy, nonatomic) NSString *footerPullToRefreshText; // 默认:@"上拉可以加载更多数据" -@property (copy, nonatomic) NSString *footerReleaseToRefreshText; // 默认:@"松开立即加载更多数据" -@property (copy, nonatomic) NSString *footerRefreshingText; // 默认:@"MJ哥正在帮你加载数据..." - -/** - * 设置头部控件的文字 - */ -@property (copy, nonatomic) NSString *headerPullToRefreshText; // 默认:@"下拉可以刷新" -@property (copy, nonatomic) NSString *headerReleaseToRefreshText; // 默认:@"松开立即刷新" -@property (copy, nonatomic) NSString *headerRefreshingText; // 默认:@"MJ哥正在帮你刷新..." -@end diff --git a/Meizi/Vendor/MJRefresh/UIScrollView+MJRefresh.m b/Meizi/Vendor/MJRefresh/UIScrollView+MJRefresh.m deleted file mode 100644 index 74a72b8..0000000 --- a/Meizi/Vendor/MJRefresh/UIScrollView+MJRefresh.m +++ /dev/null @@ -1,292 +0,0 @@ -// -// UIScrollView+MJRefresh.m -// MJRefreshExample -// -// Created by MJ Lee on 14-5-28. -// Copyright (c) 2014年 itcast. All rights reserved. -// - -#import "UIScrollView+MJRefresh.h" -#import "MJRefreshHeaderView.h" -#import "MJRefreshFooterView.h" -#import - -@interface UIScrollView() -@property (weak, nonatomic) MJRefreshHeaderView *header; -@property (weak, nonatomic) MJRefreshFooterView *footer; -@end - - -@implementation UIScrollView (MJRefresh) - -#pragma mark - 运行时相关 -static char MJRefreshHeaderViewKey; -static char MJRefreshFooterViewKey; - -- (void)setHeader:(MJRefreshHeaderView *)header { - [self willChangeValueForKey:@"MJRefreshHeaderViewKey"]; - objc_setAssociatedObject(self, &MJRefreshHeaderViewKey, - header, - OBJC_ASSOCIATION_ASSIGN); - [self didChangeValueForKey:@"MJRefreshHeaderViewKey"]; -} - -- (MJRefreshHeaderView *)header { - return objc_getAssociatedObject(self, &MJRefreshHeaderViewKey); -} - -- (void)setFooter:(MJRefreshFooterView *)footer { - [self willChangeValueForKey:@"MJRefreshFooterViewKey"]; - objc_setAssociatedObject(self, &MJRefreshFooterViewKey, - footer, - OBJC_ASSOCIATION_ASSIGN); - [self didChangeValueForKey:@"MJRefreshFooterViewKey"]; -} - -- (MJRefreshFooterView *)footer { - return objc_getAssociatedObject(self, &MJRefreshFooterViewKey); -} - -#pragma mark - 下拉刷新 -/** - * 添加一个下拉刷新头部控件 - * - * @param callback 回调 - */ -- (void)addHeaderWithCallback:(void (^)())callback -{ - [self addHeaderWithCallback:callback dateKey:nil]; -} - -- (void)addHeaderWithCallback:(void (^)())callback dateKey:(NSString*)dateKey -{ - // 1.创建新的header - if (!self.header) { - MJRefreshHeaderView *header = [MJRefreshHeaderView header]; - [self addSubview:header]; - self.header = header; - } - - // 2.设置block回调 - self.header.beginRefreshingCallback = callback; - - // 3.设置存储刷新时间的key - self.header.dateKey = dateKey; -} - -/** - * 添加一个下拉刷新头部控件 - * - * @param target 目标 - * @param action 回调方法 - */ -- (void)addHeaderWithTarget:(id)target action:(SEL)action -{ - [self addHeaderWithTarget:target action:action dateKey:nil]; -} - -- (void)addHeaderWithTarget:(id)target action:(SEL)action dateKey:(NSString*)dateKey -{ - // 1.创建新的header - if (!self.header) { - MJRefreshHeaderView *header = [MJRefreshHeaderView header]; - [self addSubview:header]; - self.header = header; - } - - // 2.设置目标和回调方法 - self.header.beginRefreshingTaget = target; - self.header.beginRefreshingAction = action; - - // 3.设置存储刷新时间的key - self.header.dateKey = dateKey; -} - -/** - * 移除下拉刷新头部控件 - */ -- (void)removeHeader -{ - [self.header removeFromSuperview]; - self.header = nil; -} - -/** - * 主动让下拉刷新头部控件进入刷新状态 - */ -- (void)headerBeginRefreshing -{ - [self.header beginRefreshing]; -} - -/** - * 让下拉刷新头部控件停止刷新状态 - */ -- (void)headerEndRefreshing -{ - [self.header endRefreshing]; -} - -/** - * 下拉刷新头部控件的可见性 - */ -- (void)setHeaderHidden:(BOOL)hidden -{ - self.header.hidden = hidden; -} - -- (BOOL)isHeaderHidden -{ - return self.header.isHidden; -} - -- (BOOL)isHeaderRefreshing -{ - return self.header.isRefreshing; -} - -#pragma mark - 上拉刷新 -/** - * 添加一个上拉刷新尾部控件 - * - * @param callback 回调 - */ -- (void)addFooterWithCallback:(void (^)())callback -{ - // 1.创建新的footer - if (!self.footer) { - MJRefreshFooterView *footer = [MJRefreshFooterView footer]; - [self addSubview:footer]; - self.footer = footer; - } - - // 2.设置block回调 - self.footer.beginRefreshingCallback = callback; -} - -/** - * 添加一个上拉刷新尾部控件 - * - * @param target 目标 - * @param action 回调方法 - */ -- (void)addFooterWithTarget:(id)target action:(SEL)action -{ - // 1.创建新的footer - if (!self.footer) { - MJRefreshFooterView *footer = [MJRefreshFooterView footer]; - [self addSubview:footer]; - self.footer = footer; - } - - // 2.设置目标和回调方法 - self.footer.beginRefreshingTaget = target; - self.footer.beginRefreshingAction = action; -} - -/** - * 移除上拉刷新尾部控件 - */ -- (void)removeFooter -{ - [self.footer removeFromSuperview]; - self.footer = nil; -} - -/** - * 主动让上拉刷新尾部控件进入刷新状态 - */ -- (void)footerBeginRefreshing -{ - [self.footer beginRefreshing]; -} - -/** - * 让上拉刷新尾部控件停止刷新状态 - */ -- (void)footerEndRefreshing -{ - [self.footer endRefreshing]; -} - -/** - * 下拉刷新头部控件的可见性 - */ -- (void)setFooterHidden:(BOOL)hidden -{ - self.footer.hidden = hidden; -} - -- (BOOL)isFooterHidden -{ - return self.footer.isHidden; -} - -- (BOOL)isFooterRefreshing -{ - return self.footer.isRefreshing; -} - -/** - * 文字 - */ -- (void)setFooterPullToRefreshText:(NSString *)footerPullToRefreshText -{ - self.footer.pullToRefreshText = footerPullToRefreshText; -} - -- (NSString *)footerPullToRefreshText -{ - return self.footer.pullToRefreshText; -} - -- (void)setFooterReleaseToRefreshText:(NSString *)footerReleaseToRefreshText -{ - self.footer.releaseToRefreshText = footerReleaseToRefreshText; -} - -- (NSString *)footerReleaseToRefreshText -{ - return self.footer.releaseToRefreshText; -} - -- (void)setFooterRefreshingText:(NSString *)footerRefreshingText -{ - self.footer.refreshingText = footerRefreshingText; -} - -- (NSString *)footerRefreshingText -{ - return self.footer.refreshingText; -} - -- (void)setHeaderPullToRefreshText:(NSString *)headerPullToRefreshText -{ - self.header.pullToRefreshText = headerPullToRefreshText; -} - -- (NSString *)headerPullToRefreshText -{ - return self.header.pullToRefreshText; -} - -- (void)setHeaderReleaseToRefreshText:(NSString *)headerReleaseToRefreshText -{ - self.header.releaseToRefreshText = headerReleaseToRefreshText; -} - -- (NSString *)headerReleaseToRefreshText -{ - return self.header.releaseToRefreshText; -} - -- (void)setHeaderRefreshingText:(NSString *)headerRefreshingText -{ - self.header.refreshingText = headerRefreshingText; -} - -- (NSString *)headerRefreshingText -{ - return self.header.refreshingText; -} -@end diff --git a/Meizi/Vendor/MJRefresh/UIView+MJExtension.h b/Meizi/Vendor/MJRefresh/UIView+MJExtension.h deleted file mode 100644 index 8033456..0000000 --- a/Meizi/Vendor/MJRefresh/UIView+MJExtension.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// UIView+Extension.h -// MJRefreshExample -// -// Created by MJ Lee on 14-5-28. -// Copyright (c) 2014年 itcast. All rights reserved. -// - -#import - -@interface UIView (MJExtension) -@property (assign, nonatomic) CGFloat mj_x; -@property (assign, nonatomic) CGFloat mj_y; -@property (assign, nonatomic) CGFloat mj_width; -@property (assign, nonatomic) CGFloat mj_height; -@property (assign, nonatomic) CGSize mj_size; -@property (assign, nonatomic) CGPoint mj_origin; -@end diff --git a/Meizi/Vendor/MJRefresh/UIView+MJExtension.m b/Meizi/Vendor/MJRefresh/UIView+MJExtension.m deleted file mode 100644 index a4f8194..0000000 --- a/Meizi/Vendor/MJRefresh/UIView+MJExtension.m +++ /dev/null @@ -1,83 +0,0 @@ -// -// UIView+Extension.m -// MJRefreshExample -// -// Created by MJ Lee on 14-5-28. -// Copyright (c) 2014年 itcast. All rights reserved. -// - -#import "UIView+MJExtension.h" - -@implementation UIView (MJExtension) -- (void)setMj_x:(CGFloat)mj_x -{ - CGRect frame = self.frame; - frame.origin.x = mj_x; - self.frame = frame; -} - -- (CGFloat)mj_x -{ - return self.frame.origin.x; -} - -- (void)setMj_y:(CGFloat)mj_y -{ - CGRect frame = self.frame; - frame.origin.y = mj_y; - self.frame = frame; -} - -- (CGFloat)mj_y -{ - return self.frame.origin.y; -} - -- (void)setMj_width:(CGFloat)mj_width -{ - CGRect frame = self.frame; - frame.size.width = mj_width; - self.frame = frame; -} - -- (CGFloat)mj_width -{ - return self.frame.size.width; -} - -- (void)setMj_height:(CGFloat)mj_height -{ - CGRect frame = self.frame; - frame.size.height = mj_height; - self.frame = frame; -} - -- (CGFloat)mj_height -{ - return self.frame.size.height; -} - -- (void)setMj_size:(CGSize)mj_size -{ - CGRect frame = self.frame; - frame.size = mj_size; - self.frame = frame; -} - -- (CGSize)mj_size -{ - return self.frame.size; -} - -- (void)setMj_origin:(CGPoint)mj_origin -{ - CGRect frame = self.frame; - frame.origin = mj_origin; - self.frame = frame; -} - -- (CGPoint)mj_origin -{ - return self.frame.origin; -} -@end diff --git a/Meizi/main.m b/Meizi/main.m index fd2c664..113e1f1 100644 --- a/Meizi/main.m +++ b/Meizi/main.m @@ -2,8 +2,8 @@ // main.m // Meizi // -// Created by Sunnyyoung on 14-12-12. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. // #import diff --git a/MeiziTests/MeiziTests.m b/MeiziTests/MeiziTests.m index 6bbc0b5..43b354b 100644 --- a/MeiziTests/MeiziTests.m +++ b/MeiziTests/MeiziTests.m @@ -2,8 +2,8 @@ // MeiziTests.m // MeiziTests // -// Created by Sunnyyoung on 14-12-12. -// Copyright (c) 2014年 Sunnyyoung. All rights reserved. +// Created by Sunnyyoung on 15/4/4. +// Copyright (c) 2015年 Sunnyyoung. All rights reserved. // #import diff --git a/Podfile b/Podfile index b060b78..38b6278 100644 --- a/Podfile +++ b/Podfile @@ -1,17 +1,11 @@ platform :ios, '7.0' -inhibit_all_warnings! -target 'Meizi' do - -pod 'SDWebImage' pod 'AFNetworking' +pod 'MJRefresh' +pod 'MJExtension' +pod 'SDWebImage' pod 'SVProgressHUD' +pod 'NHBalancedFlowLayout' pod 'iOS-Slide-Menu' -pod 'JTSImageViewController' - -end - -target 'MeiziTests' do - -end - +pod 'NYTPhotoViewer' +pod 'UIActivityIndicator-for-SDWebImage' \ No newline at end of file diff --git a/Podfile.lock b/Podfile.lock index a5d6e85..422b8f7 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,44 +1,57 @@ PODS: - - AFNetworking (2.5.1): - - AFNetworking/NSURLConnection (= 2.5.1) - - AFNetworking/NSURLSession (= 2.5.1) - - AFNetworking/Reachability (= 2.5.1) - - AFNetworking/Security (= 2.5.1) - - AFNetworking/Serialization (= 2.5.1) - - AFNetworking/UIKit (= 2.5.1) - - AFNetworking/NSURLConnection (2.5.1): + - AFNetworking (2.5.2): + - AFNetworking/NSURLConnection (= 2.5.2) + - AFNetworking/NSURLSession (= 2.5.2) + - AFNetworking/Reachability (= 2.5.2) + - AFNetworking/Security (= 2.5.2) + - AFNetworking/Serialization (= 2.5.2) + - AFNetworking/UIKit (= 2.5.2) + - AFNetworking/NSURLConnection (2.5.2): - AFNetworking/Reachability - AFNetworking/Security - AFNetworking/Serialization - - AFNetworking/NSURLSession (2.5.1): + - AFNetworking/NSURLSession (2.5.2): - AFNetworking/Reachability - AFNetworking/Security - AFNetworking/Serialization - - AFNetworking/Reachability (2.5.1) - - AFNetworking/Security (2.5.1) - - AFNetworking/Serialization (2.5.1) - - AFNetworking/UIKit (2.5.1): + - AFNetworking/Reachability (2.5.2) + - AFNetworking/Security (2.5.2) + - AFNetworking/Serialization (2.5.2) + - AFNetworking/UIKit (2.5.2): - AFNetworking/NSURLConnection - AFNetworking/NSURLSession - - iOS-Slide-Menu (1.4.4) - - JTSImageViewController (1.4) - - SDWebImage (3.7.1): - - SDWebImage/Core (= 3.7.1) - - SDWebImage/Core (3.7.1) - - SVProgressHUD (1.1.2) + - iOS-Slide-Menu (1.4.6) + - MJExtension (0.3.2) + - MJRefresh (1.4.5) + - NHBalancedFlowLayout (0.2) + - NYTPhotoViewer (0.1.2) + - SDWebImage (3.7.2): + - SDWebImage/Core (= 3.7.2) + - SDWebImage/Core (3.7.2) + - SVProgressHUD (1.1.3) + - UIActivityIndicator-for-SDWebImage (1.2): + - SDWebImage (~> 3.7) DEPENDENCIES: - AFNetworking - iOS-Slide-Menu - - JTSImageViewController + - MJExtension + - MJRefresh + - NHBalancedFlowLayout + - NYTPhotoViewer - SDWebImage - SVProgressHUD + - UIActivityIndicator-for-SDWebImage SPEC CHECKSUMS: - AFNetworking: 8bee59492a6ff15d69130efa4d0dc67e0094a52a - iOS-Slide-Menu: 7891c4e4180aac2b23fb2e5459ff61b8691a8496 - JTSImageViewController: 9fe6402194b7679f0e28d0c1002d6164301fc34a - SDWebImage: 116e88633b5b416ea0ca4b334a4ac59cf72dd38d - SVProgressHUD: da7a49e789af645d9279ffbca62318945a832438 + AFNetworking: fefbce9660acb17f48ae0011292d4da0f457bf36 + iOS-Slide-Menu: 3a8b157f87694fce888899f169e05b433575ff90 + MJExtension: 22417a0858362f4bc63cdb290bde01f5876c939b + MJRefresh: 4b24394e577ea399fbc926e5b6072317aae2c152 + NHBalancedFlowLayout: fd253023c6754e605acdb180d50123e582cc62bb + NYTPhotoViewer: 874a57dd833238b52ab2e8d1c827356c763626c3 + SDWebImage: 71b7cdc1d1721d6a82ed62889030225f2c249e29 + SVProgressHUD: 748080e4f36e603f6c02aec292664239df5279c1 + UIActivityIndicator-for-SDWebImage: 7bf7ebbf0ed1747dedc0d6e949c4603a6d0f9e0c -COCOAPODS: 0.35.0 +COCOAPODS: 0.36.3