Commit 5b0784b403a87f3164240cc26c44886b3ffd3c35

Authored by iOS-Xiaowen
1 parent fd8fddf1

no message

CNLiveBMineModule/Classes/Controller/CNLiveMineController.m
... ... @@ -27,7 +27,7 @@
27 27  
28 28 @interface CNLiveMineController()<UITableViewDelegate, UITableViewDataSource, CNLiveMineHeaderViewDelegate, CNLiveMineCellDelegate>
29 29 @property (nonatomic, strong) UITableView *tableView;
30   -@property (nonatomic, weak) CNLiveMineHeaderView *headerView;
  30 +@property (nonatomic, strong) CNLiveMineHeaderView *headerView;
31 31 @property (nonatomic, strong) NSMutableArray *data;
32 32  
33 33 @end
... ... @@ -88,11 +88,7 @@ static const CGFloat timeValue = 1.5;
88 88  
89 89 - (void)createSubViews {
90 90 [self.view addSubview:self.tableView];
91   - CNLiveMineHeaderView *headerView = [[CNLiveMineHeaderView alloc]initWithFrame:CGRectMake(0, -kHEIGHT, SCREEN_WIDTH, kHEIGHT)];
92   - headerView.delegate = self;
93   - headerView.tag = 666;
94   - [self.tableView addSubview:headerView];
95   - self.headerView = headerView;
  91 + [self.tableView addSubview:self.headerView];
96 92 }
97 93  
98 94 #pragma mark - UIScrollViewDelegate
... ... @@ -275,7 +271,14 @@ static const CGFloat timeValue = 1.5;
275 271 }
276 272 return _data;
277 273 }
278   -
  274 +- (CNLiveMineHeaderView *)headerView{
  275 + if (!_headerView) {
  276 + _headerView = [[CNLiveMineHeaderView alloc]initWithFrame:CGRectMake(0, -kHEIGHT, SCREEN_WIDTH, kHEIGHT)];
  277 + _headerView.delegate = self;
  278 + _headerView.tag = 666;
  279 + }
  280 + return _headerView;
  281 +}
279 282 - (UITableView *)tableView{
280 283 if(!_tableView){
281 284 _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-TabBarHeight) style:UITableViewStylePlain];
... ...
Example/CNLiveBMineModule.xcodeproj/project.pbxproj
... ... @@ -207,8 +207,8 @@
207 207 6003F586195388D20070C39A /* Sources */,
208 208 6003F587195388D20070C39A /* Frameworks */,
209 209 6003F588195388D20070C39A /* Resources */,
210   - 74D7B4BA2B5F765420699403 /* [CP] Embed Pods Frameworks */,
211   - B4C8572D83613CAC1310A418 /* [CP] Copy Pods Resources */,
  210 + 0C9C7217B090E3ED4F1AA78B /* [CP] Embed Pods Frameworks */,
  211 + 20E966392F9A6D5F365E3ADD /* [CP] Copy Pods Resources */,
212 212 );
213 213 buildRules = (
214 214 );
... ... @@ -299,29 +299,7 @@
299 299 /* End PBXResourcesBuildPhase section */
300 300  
301 301 /* Begin PBXShellScriptBuildPhase section */
302   - 2A8336772A36DEB07525BA2F /* [CP] Check Pods Manifest.lock */ = {
303   - isa = PBXShellScriptBuildPhase;
304   - buildActionMask = 2147483647;
305   - files = (
306   - );
307   - inputFileListPaths = (
308   - );
309   - inputPaths = (
310   - "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
311   - "${PODS_ROOT}/Manifest.lock",
312   - );
313   - name = "[CP] Check Pods Manifest.lock";
314   - outputFileListPaths = (
315   - );
316   - outputPaths = (
317   - "$(DERIVED_FILE_DIR)/Pods-CNLiveBMineModule_Example-checkManifestLockResult.txt",
318   - );
319   - runOnlyForDeploymentPostprocessing = 0;
320   - shellPath = /bin/sh;
321   - 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";
322   - showEnvVarsInLog = 0;
323   - };
324   - 74D7B4BA2B5F765420699403 /* [CP] Embed Pods Frameworks */ = {
  302 + 0C9C7217B090E3ED4F1AA78B /* [CP] Embed Pods Frameworks */ = {
325 303 isa = PBXShellScriptBuildPhase;
326 304 buildActionMask = 2147483647;
327 305 files = (
... ... @@ -397,7 +375,7 @@
397 375 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveBMineModule_Example/Pods-CNLiveBMineModule_Example-frameworks.sh\"\n";
398 376 showEnvVarsInLog = 0;
399 377 };
400   - B4C8572D83613CAC1310A418 /* [CP] Copy Pods Resources */ = {
  378 + 20E966392F9A6D5F365E3ADD /* [CP] Copy Pods Resources */ = {
401 379 isa = PBXShellScriptBuildPhase;
402 380 buildActionMask = 2147483647;
403 381 files = (
... ... @@ -421,6 +399,28 @@
421 399 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveBMineModule_Example/Pods-CNLiveBMineModule_Example-resources.sh\"\n";
422 400 showEnvVarsInLog = 0;
423 401 };
  402 + 2A8336772A36DEB07525BA2F /* [CP] Check Pods Manifest.lock */ = {
  403 + isa = PBXShellScriptBuildPhase;
  404 + buildActionMask = 2147483647;
  405 + files = (
  406 + );
  407 + inputFileListPaths = (
  408 + );
  409 + inputPaths = (
  410 + "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
  411 + "${PODS_ROOT}/Manifest.lock",
  412 + );
  413 + name = "[CP] Check Pods Manifest.lock";
  414 + outputFileListPaths = (
  415 + );
  416 + outputPaths = (
  417 + "$(DERIVED_FILE_DIR)/Pods-CNLiveBMineModule_Example-checkManifestLockResult.txt",
  418 + );
  419 + runOnlyForDeploymentPostprocessing = 0;
  420 + shellPath = /bin/sh;
  421 + 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";
  422 + showEnvVarsInLog = 0;
  423 + };
424 424 C07FCC71144256C0D7D38641 /* [CP] Check Pods Manifest.lock */ = {
425 425 isa = PBXShellScriptBuildPhase;
426 426 buildActionMask = 2147483647;
... ...