Closed TzyTman closed 4 years ago
我看了你的SmoothViewController 实例 同样设置为0 有可以回调 被你这个高蒙圈了
不建议设置为0,不适合JXPagingView
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
如何动态的修改 headView 的高度了 ? 好像是有swift 的例子 OC 没有
905430956
905430956@qq.com
签名由
网易邮箱大师
定制
在2019年12月24日 09:28,暴走的鑫鑫<notifications@github.com> 写道:
不建议设置为0,不适合JXPagingView
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.
你看下swift例子,明白怎么用,然后用oc语言使用即可。
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
好的谢谢
905430956
905430956@qq.com
签名由
网易邮箱大师
定制
在2019年12月24日 09:32,暴走的鑫鑫<notifications@github.com> 写道:
你看下swift例子,明白怎么用,然后用oc语言使用即可。
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
还问您最后一个问题 self.height = 560; [self.pagerView resizeTableHeaderViewHeightWithAnimatable:true duration:0.5 curve:UIViewAnimationCurveEaseIn];没有动画效果是怎么回事了?//
// MZXFClubDetailsVC.m // PlayBoy // // Created by mzxf on 2019/12/20. // Copyright © 2019 mzxf. All rights reserved. //
@interface MZXFClubDetailsVC ()<JXPagerViewDelegate, JXPagerMainTableViewGestureDelegate,JXCategoryViewDelegate>
@property (nonatomic, strong) JXPagerView pagerView; @property (nonatomic, strong) JXCategoryTitleView categoryView; @property(nonatomic , strong) UIView headView; @property (nonatomic, strong) NSArray <NSString > *titles; @property(nonatomic , assign) NSInteger height; @end
@implementation MZXFClubDetailsVC
self.view.backgroundColor = [UIColor whiteColor]; self.navigationController.navigationBar.translucent = false; _titles = @[@"能力", @"爱好", @"队友"]; self.headView = [[UIView alloc] init]; self.headView.backgroundColor = [UIColor yellowColor]; UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; [btn setFrame:CGRectMake(100, 200, 50, 50)]; [btn addTarget:self action:@selector(function) forControlEvents:UIControlEventTouchUpInside]; [btn setBackgroundColor:[UIColor blueColor]]; [self.headView addSubview:btn];
_categoryView = [[JXCategoryTitleView alloc] initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 0)];
self.categoryView.titles = self.titles;
self.categoryView.backgroundColor = [UIColor whiteColor];
self.categoryView.titleSelectedColor = [UIColor colorWithRed:105/255.0 green:144/255.0 blue:239/255.0 alpha:1];
self.categoryView.titleColor = [UIColor blackColor];
self.categoryView.titleColorGradientEnabled = YES;
self.categoryView.titleLabelZoomEnabled = YES;
self.categoryView.titleLabelZoomEnabled = YES;
self.categoryView.delegate = self;
self.categoryView.contentScrollViewClickTransitionAnimationEnabled = NO;
self.categoryView.contentScrollView = self.pagerView.listContainerView.collectionView;
self.height = 230;
//因为底层触发列表加载是在代理方法:- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
回调里面
//所以,如果当前有5个item,当前在第1个,用于点击了第5个。categoryView默认是通过设置contentOffset.x滚动到指定的位置,这个时候有个问题,就会触发中间2、3、4的cellForItemAtIndexPath方法。
//如此一来就丧失了延迟加载的功能
//所以,如果你想规避这样的情况发生,那么就把contentScrollViewClickTransitionAnimationEnabled设置为NO。
JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
lineView.indicatorColor = [UIColor colorWithRed:105/255.0 green:144/255.0 blue:239/255.0 alpha:1];
lineView.indicatorWidth = 30;
self.categoryView.indicators = @[lineView];
_pagerView = [self preferredPagingView]; self.pagerView.mainTableView.gestureDelegate = self; self.pagerView.pinSectionHeaderVerticalOffset = 100; [self.view addSubview:self.pagerView];
//导航栏隐藏的情况,处理扣边返回,下面的代码要加上 [self.pagerView.listContainerView.collectionView.panGestureRecognizer requireGestureRecognizerToFail:self.navigationController.interactivePopGestureRecognizer]; [self.pagerView.mainTableView.panGestureRecognizer requireGestureRecognizerToFail:self.navigationController.interactivePopGestureRecognizer]; }
//- (void)mainTableViewDidScroll:(UIScrollView *)scrollView { // [self.userHeaderView scrollViewDidScroll:scrollView.contentOffset.y]; //}
self.navigationController.interactivePopGestureRecognizer.enabled = (self.categoryView.selectedIndex == 0); }
self.navigationController.interactivePopGestureRecognizer.enabled = YES; }
//- (JXPagerView *)preferredPagingView { // return [[JXPagerView alloc] initWithDelegate:self]; //}
(JXPagerView *)preferredPagingView { return [[JXPagerListRefreshView alloc] initWithDelegate:self]; }
(void)viewDidLayoutSubviews { [super viewDidLayoutSubviews];
self.pagerView.frame = self.view.bounds; }
(UIView )tableHeaderViewInPagerView:(JXPagerView )pagerView { return self.headView; }
(NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView { return self.height; }
(NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView { return 50; }
(UIView )viewForPinSectionHeaderInPagerView:(JXPagerView )pagerView { return self.categoryView; }
(NSInteger)numberOfListsInPagerView:(JXPagerView *)pagerView { //和categoryView的item数量一致 return self.categoryView.titles.count; }
(id
return listView; }
}
/ #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue )segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */
@end
朋友建议你,认真按照示例来,可以尝试在demo上面改改,已经实现效果的,证明逻辑没有问题。建议你再次尝试一下,我现在没有时间看哈。
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
好的
905430956
905430956@qq.com
签名由
网易邮箱大师
定制
在2019年12月24日 09:56,暴走的鑫鑫<notifications@github.com> 写道:
朋友建议你,认真按照示例来,可以尝试在demo上面改改,已经实现效果的,证明逻辑没有问题。建议你再次尝试一下,我现在没有时间看哈。
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
我发现一个问题 集成两个UItableView 左右滑动切换 A UItableView滑动到一百 滑动到B UItableVIew 当滑动到B的时候 头部回到原始位置 在回到A 我之前滑动到一百的位置 回来一看有到了第一页 ? 这应该是个bug吧!
905430956
905430956@qq.com
签名由
网易邮箱大师
定制
在2019年12月24日 09:56,905430956<905430956@qq.com> 写道:
font{
line-height: 1.6;
}
ul,ol{
padding-left: 20px;
list-style-position: inside;
}
好的
905430956
905430956@qq.com
签名由
网易邮箱大师
定制
在2019年12月24日 09:56,暴走的鑫鑫<notifications@github.com> 写道:
朋友建议你,认真按照示例来,可以尝试在demo上面改改,已经实现效果的,证明逻辑没有问题。建议你再次尝试一下,我现在没有时间看哈。
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe.
�
设置heightForPinSectionHeaderInPagerView为0