Commit 098d2b8c257c3ace09440d8b6361d90a0cc30d5f

Authored by yanglingyu
1 parent cfd88a95

解决二级分类不展示问题

CNLiveVideoClassifyKit.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 = 'CNLiveVideoClassifyKit' 10 s.name = 'CNLiveVideoClassifyKit'
11 - s.version = '0.0.34' 11 + s.version = '0.0.35'
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.
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNCategoryBaseViewController.m
@@ -19,16 +19,9 @@ @@ -19,16 +19,9 @@
19 [self.view addSubview: self.categoryView]; 19 [self.view addSubview: self.categoryView];
20 [self.view addSubview:self.listContainerView]; 20 [self.view addSubview:self.listContainerView];
21 self.view.backgroundColor = [UIColor whiteColor]; 21 self.view.backgroundColor = [UIColor whiteColor];
22 -  
23 - // Do any additional setup after loading the view.  
24 -}  
25 -  
26 --(void)viewDidLayoutSubviews  
27 -{  
28 - [super viewDidLayoutSubviews];  
29 -  
30 self.categoryView.frame = CGRectMake(0, kStatusHeight, self.view.bounds.size.width, [self preferredCategoryViewHeight]); 22 self.categoryView.frame = CGRectMake(0, kStatusHeight, self.view.bounds.size.width, [self preferredCategoryViewHeight]);
31 self.listContainerView.frame = CGRectMake(0, [self preferredCategoryViewHeight], self.view.bounds.size.width, self.view.bounds.size.height); 23 self.listContainerView.frame = CGRectMake(0, [self preferredCategoryViewHeight], self.view.bounds.size.width, self.view.bounds.size.height);
  24 + // Do any additional setup after loading the view.
32 } 25 }
33 26
34 #pragma mark - Public 27 #pragma mark - Public
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveClassifySegmentController.m
@@ -165,6 +165,28 @@ static const CGFloat animationHeight = 15; @@ -165,6 +165,28 @@ static const CGFloat animationHeight = 15;
165 [CNLiveListManager shareListManager].scrollViewDidScrollBlock = ^(BOOL isUp) { 165 [CNLiveListManager shareListManager].scrollViewDidScrollBlock = ^(BOOL isUp) {
166 [weakSelf scrollViewUpDowm:isUp]; 166 [weakSelf scrollViewUpDowm:isUp];
167 }; 167 };
  168 +
  169 + self.listContainerView.frame = CGRectMake(0, self.myCategoryView.bottom, kScreenWidth, self.view.bounds.size.height - self.myCategoryView.bottom+ 50);
  170 + if ([CNUserShareManager isLogin]) {
  171 + self.myCategoryView.width = kScreenWidth - 45;
  172 + self.customChannelsBtn.centerY = [self preferredCategoryViewHeight]/2 + kStatusHeight;
  173 + self.customChannelsBtn.right = kScreenWidth - 18;
  174 + }else
  175 + {
  176 + self.myCategoryView.width = kScreenWidth - 70;
  177 + self.loginBtn.centerY = [self preferredCategoryViewHeight]/2 + kStatusHeight;
  178 + self.loginBtn.right = kScreenWidth - 11;
  179 + }
  180 + if (self.isHiddenFirst) {
  181 + self.myCategoryView.top = -50-kStatusHeight;
  182 + self.listContainerView.top = kStatusHeight;
  183 + if ([CNUserShareManager isLogin]) {
  184 + self.customChannelsBtn.centerY = self.myCategoryView.centerY + kStatusHeight;
  185 + }else
  186 + {
  187 + self.loginBtn.centerY = self.myCategoryView.centerY+kStatusHeight;
  188 + }
  189 + }
168 // Do any additional setup after loading the view. 190 // Do any additional setup after loading the view.
169 } 191 }
170 -(void)viewWillAppear:(BOOL)animated { 192 -(void)viewWillAppear:(BOOL)animated {
@@ -198,31 +220,6 @@ static const CGFloat animationHeight = 15; @@ -198,31 +220,6 @@ static const CGFloat animationHeight = 15;
198 [[NSNotificationCenter defaultCenter] removeObserver:self]; 220 [[NSNotificationCenter defaultCenter] removeObserver:self];
199 NSLog(@"CNClassifySegmentController dealloc"); 221 NSLog(@"CNClassifySegmentController dealloc");
200 } 222 }
201 --(void)viewDidLayoutSubviews  
202 -{  
203 - [super viewDidLayoutSubviews];  
204 - self.listContainerView.frame = CGRectMake(0, self.myCategoryView.bottom, kScreenWidth, self.view.bounds.size.height - self.myCategoryView.bottom+ 50);  
205 - if ([CNUserShareManager isLogin]) {  
206 - self.myCategoryView.width = kScreenWidth - 45;  
207 - self.customChannelsBtn.centerY = [self preferredCategoryViewHeight]/2 + kStatusHeight;  
208 - self.customChannelsBtn.right = kScreenWidth - 18;  
209 - }else  
210 - {  
211 - self.myCategoryView.width = kScreenWidth - 70;  
212 - self.loginBtn.centerY = [self preferredCategoryViewHeight]/2 + kStatusHeight;  
213 - self.loginBtn.right = kScreenWidth - 11;  
214 - }  
215 - if (self.isHiddenFirst) {  
216 - self.myCategoryView.top = -50-kStatusHeight;  
217 - self.listContainerView.top = kStatusHeight;  
218 - if ([CNUserShareManager isLogin]) {  
219 - self.customChannelsBtn.centerY = self.myCategoryView.centerY + kStatusHeight;  
220 - }else  
221 - {  
222 - self.loginBtn.centerY = self.myCategoryView.centerY+kStatusHeight;  
223 - }  
224 - }  
225 -}  
226 223
227 224
228 -(UIStatusBarStyle)preferredStatusBarStyle 225 -(UIStatusBarStyle)preferredStatusBarStyle
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveSubSegmentController.m
@@ -179,15 +179,10 @@ @@ -179,15 +179,10 @@
179 self.bgImgView.top = 0; 179 self.bgImgView.top = 0;
180 self.listContainerView.scrollView.scrollEnabled = YES; 180 self.listContainerView.scrollView.scrollEnabled = YES;
181 } 181 }
182 -  
183 - // Do any additional setup after loading the view.  
184 -}  
185 --(void)viewDidLayoutSubviews  
186 -{  
187 - [super viewDidLayoutSubviews];  
188 if (self.showType == CNLiveSubVCShowtypeChannel) { 182 if (self.showType == CNLiveSubVCShowtypeChannel) {
189 self.myCategoryView.top = kNavigationBarHeight; 183 self.myCategoryView.top = kNavigationBarHeight;
190 }else{ 184 }else{
  185 + self.searchBtn.right = KScreenWidth-12;
191 self.myCategoryView.top = 0; 186 self.myCategoryView.top = 0;
192 CGFloat width = self.searchBtn.left; 187 CGFloat width = self.searchBtn.left;
193 self.searchBtn.centerY = self.myCategoryView.height/2; 188 self.searchBtn.centerY = self.myCategoryView.height/2;
@@ -206,8 +201,7 @@ @@ -206,8 +201,7 @@
206 } 201 }
207 202
208 self.listContainerView.frame = CGRectMake(0, self.myCategoryView.bottom+10, kScreenWidth, self.view.bounds.size.height - self.myCategoryView.bottom -10); 203 self.listContainerView.frame = CGRectMake(0, self.myCategoryView.bottom+10, kScreenWidth, self.view.bounds.size.height - self.myCategoryView.bottom -10);
209 - self.searchBtn.right = KScreenWidth-12;  
210 - 204 + // Do any additional setup after loading the view.
211 } 205 }
212 206
213 - (void)viewWillAppear:(BOOL)animated 207 - (void)viewWillAppear:(BOOL)animated