Commit 098d2b8c257c3ace09440d8b6361d90a0cc30d5f

Authored by yanglingyu
1 parent cfd88a95

解决二级分类不展示问题

CNLiveVideoClassifyKit.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveVideoClassifyKit'
11   - s.version = '0.0.34'
  11 + s.version = '0.0.35'
12 12 s.summary = '视讯头部一二级菜单组件'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ...
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNCategoryBaseViewController.m
... ... @@ -19,16 +19,9 @@
19 19 [self.view addSubview: self.categoryView];
20 20 [self.view addSubview:self.listContainerView];
21 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 22 self.categoryView.frame = CGRectMake(0, kStatusHeight, self.view.bounds.size.width, [self preferredCategoryViewHeight]);
31 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 27 #pragma mark - Public
... ...
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveClassifySegmentController.m
... ... @@ -165,6 +165,28 @@ static const CGFloat animationHeight = 15;
165 165 [CNLiveListManager shareListManager].scrollViewDidScrollBlock = ^(BOOL isUp) {
166 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 190 // Do any additional setup after loading the view.
169 191 }
170 192 -(void)viewWillAppear:(BOOL)animated {
... ... @@ -198,31 +220,6 @@ static const CGFloat animationHeight = 15;
198 220 [[NSNotificationCenter defaultCenter] removeObserver:self];
199 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 225 -(UIStatusBarStyle)preferredStatusBarStyle
... ...
CNLiveVideoClassifyKit/Classes/ClassifyCategory/Controller/CNLiveSubSegmentController.m
... ... @@ -179,15 +179,10 @@
179 179 self.bgImgView.top = 0;
180 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 182 if (self.showType == CNLiveSubVCShowtypeChannel) {
189 183 self.myCategoryView.top = kNavigationBarHeight;
190 184 }else{
  185 + self.searchBtn.right = KScreenWidth-12;
191 186 self.myCategoryView.top = 0;
192 187 CGFloat width = self.searchBtn.left;
193 188 self.searchBtn.centerY = self.myCategoryView.height/2;
... ... @@ -206,8 +201,7 @@
206 201 }
207 202  
208 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 207 - (void)viewWillAppear:(BOOL)animated
... ...