Commit 255f4a7d874febac9750550feada34a7f81b8f9c

Authored by zhangxiaowen
1 parent cd0778c1

no message

CNLiveCollectionModule/Classes/Controller/CNLiveCollectionController.m
... ... @@ -10,6 +10,7 @@
10 10 #import "QMUIKit.h"
11 11  
12 12 #import "CNLiveCategory.h"
  13 +#import "CNLiveBaseKit.h"
13 14  
14 15 #import "CNLiveRefreshHeader.h"
15 16 #import "CNLiveRefreshFooter.h"
... ... @@ -49,13 +50,12 @@ static const CGFloat timeValue = 1.5;
49 50 [strongSelf.tableView.mj_footer endRefreshing];
50 51  
51 52 if (error) {
52   - if (strongSelf.data.count == 0) {
53   - if (error.code == -1001||error.code == -1003||error.code == -1009) {
54   - [strongSelf showEmptyViewWithImage:[UIImage imageNamed:@"dd_wlcw"] text:@"无法连接网络" detailText:@"别紧张,试试看刷新页面~" buttonTitle:@" 重试 " buttonAction:@selector(loadData)];
55   - [strongSelf setCNAPIErrorEmptyView];
56   - strongSelf.tableView.mj_footer.hidden = strongSelf.data.count == 0;
57   - }
58   - }
  53 + [self.data removeAllObjects];
  54 + [self.tableView reloadData];
  55 + [self.tableView showEmptyViewWithType:CNLiveCustomTipsTypeLoadFail noData:self.data.count == 0 block:^{
  56 + [self.tableView.mj_header beginRefreshing];
  57 + }];
  58 + self.tableView.emptyView.top = 0;
59 59 return;
60 60 }
61 61  
... ... @@ -75,11 +75,9 @@ static const CGFloat timeValue = 1.5;
75 75 }
76 76 }
77 77  
78   - if (strongSelf.data.count == 0) {//显示empty
79   - [strongSelf showEmptyViewWithImage:[UIImage imageNamed:@"zhuangtai_kong"] text:@"您现在没有相关内容哦" detailText:@"" buttonTitle:@"" buttonAction:nil];
80   - [strongSelf setCNNoDataEmptyView];
81   - strongSelf.tableView.tableFooterView = nil;
82   - }
  78 + [strongSelf.tableView showEmptyViewWithType:CNLiveCustomTipsTypeNoData noData:self.data.count == 0 block:nil];
  79 + strongSelf.tableView.emptyView.top = 0;
  80 +
83 81 strongSelf.tableView.mj_footer.hidden = self.data.count == 0;
84 82 [strongSelf.tableView reloadData];
85 83  
... ...
Example/CNLiveCollectionModule.xcodeproj/project.pbxproj
... ... @@ -207,7 +207,7 @@
207 207 6003F586195388D20070C39A /* Sources */,
208 208 6003F587195388D20070C39A /* Frameworks */,
209 209 6003F588195388D20070C39A /* Resources */,
210   - 86193E368B9AC6672C6C9E5D /* [CP] Embed Pods Frameworks */,
  210 + EDF5167CA47DDB788AD86E4A /* [CP] Embed Pods Frameworks */,
211 211 );
212 212 buildRules = (
213 213 );
... ... @@ -247,6 +247,9 @@
247 247 LastUpgradeCheck = 0720;
248 248 ORGANIZATIONNAME = "153993236@qq.com";
249 249 TargetAttributes = {
  250 + 6003F589195388D20070C39A = {
  251 + DevelopmentTeam = 94X49GG3ZW;
  252 + };
250 253 6003F5AD195388D20070C39A = {
251 254 TestTargetID = 6003F589195388D20070C39A;
252 255 };
... ... @@ -295,7 +298,51 @@
295 298 /* End PBXResourcesBuildPhase section */
296 299  
297 300 /* Begin PBXShellScriptBuildPhase section */
298   - 86193E368B9AC6672C6C9E5D /* [CP] Embed Pods Frameworks */ = {
  301 + 960F3AF809FA34C6E96A9461 /* [CP] Check Pods Manifest.lock */ = {
  302 + isa = PBXShellScriptBuildPhase;
  303 + buildActionMask = 2147483647;
  304 + files = (
  305 + );
  306 + inputFileListPaths = (
  307 + );
  308 + inputPaths = (
  309 + "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
  310 + "${PODS_ROOT}/Manifest.lock",
  311 + );
  312 + name = "[CP] Check Pods Manifest.lock";
  313 + outputFileListPaths = (
  314 + );
  315 + outputPaths = (
  316 + "$(DERIVED_FILE_DIR)/Pods-CNLiveCollectionModule_Tests-checkManifestLockResult.txt",
  317 + );
  318 + runOnlyForDeploymentPostprocessing = 0;
  319 + shellPath = /bin/sh;
  320 + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
  321 + showEnvVarsInLog = 0;
  322 + };
  323 + 9D5A20D6D12364DD9DF1B89D /* [CP] Check Pods Manifest.lock */ = {
  324 + isa = PBXShellScriptBuildPhase;
  325 + buildActionMask = 2147483647;
  326 + files = (
  327 + );
  328 + inputFileListPaths = (
  329 + );
  330 + inputPaths = (
  331 + "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
  332 + "${PODS_ROOT}/Manifest.lock",
  333 + );
  334 + name = "[CP] Check Pods Manifest.lock";
  335 + outputFileListPaths = (
  336 + );
  337 + outputPaths = (
  338 + "$(DERIVED_FILE_DIR)/Pods-CNLiveCollectionModule_Example-checkManifestLockResult.txt",
  339 + );
  340 + runOnlyForDeploymentPostprocessing = 0;
  341 + shellPath = /bin/sh;
  342 + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
  343 + showEnvVarsInLog = 0;
  344 + };
  345 + EDF5167CA47DDB788AD86E4A /* [CP] Embed Pods Frameworks */ = {
299 346 isa = PBXShellScriptBuildPhase;
300 347 buildActionMask = 2147483647;
301 348 files = (
... ... @@ -349,50 +396,6 @@
349 396 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveCollectionModule_Example/Pods-CNLiveCollectionModule_Example-frameworks.sh\"\n";
350 397 showEnvVarsInLog = 0;
351 398 };
352   - 960F3AF809FA34C6E96A9461 /* [CP] Check Pods Manifest.lock */ = {
353   - isa = PBXShellScriptBuildPhase;
354   - buildActionMask = 2147483647;
355   - files = (
356   - );
357   - inputFileListPaths = (
358   - );
359   - inputPaths = (
360   - "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
361   - "${PODS_ROOT}/Manifest.lock",
362   - );
363   - name = "[CP] Check Pods Manifest.lock";
364   - outputFileListPaths = (
365   - );
366   - outputPaths = (
367   - "$(DERIVED_FILE_DIR)/Pods-CNLiveCollectionModule_Tests-checkManifestLockResult.txt",
368   - );
369   - runOnlyForDeploymentPostprocessing = 0;
370   - shellPath = /bin/sh;
371   - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
372   - showEnvVarsInLog = 0;
373   - };
374   - 9D5A20D6D12364DD9DF1B89D /* [CP] Check Pods Manifest.lock */ = {
375   - isa = PBXShellScriptBuildPhase;
376   - buildActionMask = 2147483647;
377   - files = (
378   - );
379   - inputFileListPaths = (
380   - );
381   - inputPaths = (
382   - "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
383   - "${PODS_ROOT}/Manifest.lock",
384   - );
385   - name = "[CP] Check Pods Manifest.lock";
386   - outputFileListPaths = (
387   - );
388   - outputPaths = (
389   - "$(DERIVED_FILE_DIR)/Pods-CNLiveCollectionModule_Example-checkManifestLockResult.txt",
390   - );
391   - runOnlyForDeploymentPostprocessing = 0;
392   - shellPath = /bin/sh;
393   - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
394   - showEnvVarsInLog = 0;
395   - };
396 399 /* End PBXShellScriptBuildPhase section */
397 400  
398 401 /* Begin PBXSourcesBuildPhase section */
... ... @@ -530,6 +533,7 @@
530 533 baseConfigurationReference = 9ABFA23662146CDF3FEEB166 /* Pods-CNLiveCollectionModule_Example.debug.xcconfig */;
531 534 buildSettings = {
532 535 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  536 + DEVELOPMENT_TEAM = 94X49GG3ZW;
533 537 GCC_PRECOMPILE_PREFIX_HEADER = YES;
534 538 GCC_PREFIX_HEADER = "CNLiveCollectionModule/CNLiveCollectionModule-Prefix.pch";
535 539 INFOPLIST_FILE = "CNLiveCollectionModule/CNLiveCollectionModule-Info.plist";
... ... @@ -546,6 +550,7 @@
546 550 baseConfigurationReference = 01C2BEA02A559BF8EE8B90FC /* Pods-CNLiveCollectionModule_Example.release.xcconfig */;
547 551 buildSettings = {
548 552 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  553 + DEVELOPMENT_TEAM = 94X49GG3ZW;
549 554 GCC_PRECOMPILE_PREFIX_HEADER = YES;
550 555 GCC_PREFIX_HEADER = "CNLiveCollectionModule/CNLiveCollectionModule-Prefix.pch";
551 556 INFOPLIST_FILE = "CNLiveCollectionModule/CNLiveCollectionModule-Info.plist";
... ...
Example/CNLiveCollectionModule/CNLIVEAppDelegate.m
... ... @@ -33,7 +33,7 @@
33 33 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
34 34 {
35 35 // Override point for customization after application launch.
36   - [CNLiveEnvironmentManager setEnvironment:CNLiveDebugAppStore];
  36 + [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore];
37 37 [self networkParamAction];
38 38 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];//UIScreen mainScreen].bounds个人理解获取屏幕的硬件信息然后设置尺寸大小
39 39 CNLiveCollectionController *vc = [[CNLiveCollectionController alloc] init];
... ...