Commit 3f1b888ec219f8cc8d3cdc486b70a9c443229aed
1 parent
3c2048d1
适配正式环境情况
Showing
2 changed files
with
7 additions
and
2 deletions
CNLiveCServiceModule.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveCServiceModule' | 10 | s.name = 'CNLiveCServiceModule' |
| 11 | - s.version = '0.0.15' | 11 | + s.version = '0.0.16' |
| 12 | s.summary = '我的服务内容' | 12 | s.summary = '我的服务内容' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
CNLiveCServiceModule/Classes/Present/CNLiveServicePresent.m
| @@ -135,10 +135,15 @@ static const CGFloat margin = 15; | @@ -135,10 +135,15 @@ static const CGFloat margin = 15; | ||
| 135 | showNum = 8; | 135 | showNum = 8; |
| 136 | itemSize = CGSizeMake((SCREEN_WIDTH-2*margin)/4.0, 70); | 136 | itemSize = CGSizeMake((SCREEN_WIDTH-2*margin)/4.0, 70); |
| 137 | }else{ | 137 | }else{ |
| 138 | - cellheight = 125; | ||
| 139 | showNum = 4; | 138 | showNum = 4; |
| 140 | itemSize = CGSizeMake((SCREEN_WIDTH-2*margin)/4.0, 70); | 139 | itemSize = CGSizeMake((SCREEN_WIDTH-2*margin)/4.0, 70); |
| 141 | subTitle = dic[@"category"][@"subTitle"]; | 140 | subTitle = dic[@"category"][@"subTitle"]; |
| 141 | + if ([subTitle isKindOfClass:[NSString class]] && ![subTitle isEqualToString:@""]) { | ||
| 142 | + cellheight = 125; | ||
| 143 | + }else{ | ||
| 144 | + cellheight = 105; | ||
| 145 | + subTitle = @""; | ||
| 146 | + } | ||
| 142 | } | 147 | } |
| 143 | if (lists &&[lists isKindOfClass:[NSArray class]] && lists.count > 0) { | 148 | if (lists &&[lists isKindOfClass:[NSArray class]] && lists.count > 0) { |
| 144 | serviceModel = [CNLiveServicePresent dealDataSource:dic[@"list"] title:title subtitle:subTitle cellHeight:cellheight itemSize:itemSize showNum:showNum]; | 149 | serviceModel = [CNLiveServicePresent dealDataSource:dic[@"list"] title:title subtitle:subTitle cellHeight:cellheight itemSize:itemSize showNum:showNum]; |