Git Product home page Git Product logo

hhhorizontalpagingview's People

Contributors

huanhoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hhhorizontalpagingview's Issues

NSString property in HHHorizontalPagingView.h

Hi again,

Thanks in advance for your usual support .. am trying to set NSString as property in HHHorizontalPagingView header file like

@property (nonatomic, strong) NSString *someText;

Then I added a method below Setter

- (void)setSomeText:(NSString *)someText { _someText = someText; }

after when I set in the controller like pagingView.someText = @"hi"; it doesn't actually set that value always shown (null).

Thanks again.

崩溃问题

我两个视图都是collectionView,我第一个collectionView请求数据为空,第二个collectionView数据很多,当我把第二个collectionView向上推,再滑到第一个collectionView就会崩溃,请问怎么解决

在头部添加MJRefresh碰到的状态栏信息覆盖问题

你好。
我这边碰到个需求,如果可以的话告诉我该如何处理。十分感谢。
需求:下拉的时候在HeaderView上面有MJRfresh的状态效果
因此:在tableview的头部加 MjRefresh
HHContentTableView *tableView = [HHContentTableView contentTableView]; tableView.mj_header= [MJRefreshStateHeader headerWithRefreshingTarget:self refreshingAction:@selector(refreshHeader:)];

然后下拉刷新的时候 状态信息 会被segment挡住,可是把mj_header加到headerview上不会触发事件,你有什么好的解决方案吗?
不知道描述是否清楚 ,谢谢先。

UICollectionViewFlowLayoutBreakForInvalidSizes

Hello brother,

Long time, hope you are doing well

I got this error, I am trying to catch the issue but with no result, do you have any idea?

The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x7fcf1e4ab300>, and it is attached to <UICollectionView: 0x7fcf20a27000; frame = (0 0; 375 812); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x600000651790>; layer = <CALayer: 0x60000043f960>; contentOffset: {0, 0}; contentSize: {0, 0}; adjustedContentInset: {0, 0, 34, 0}> collection view layout: <UICollectionViewFlowLayout: 0x7fcf1e4ab300>.

Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.

UIButton addtarget

Hi dear,

Actually, I am trying to add UIButton in the headerView of HHHorizontalPagingView but the addtarget it doesn't work

I add the UIButton in configureHeaderView

            self.createButton = [UIButton newAutoLayoutView];
            [self.createButton setBackgroundColor:[UIColor clearColor]];
            [self.createButton setTitle:@"Create" forState:UIControlStateNormal];
            [self.createButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
            self.createButton.titleLabel.font = [UIFont fontWithName:@"Radikal-Medium" size:14.0f];
            self.createButton.layer.borderColor = [UIColor whiteColor].CGColor;
            self.createButton.layer.borderWidth = 1.0f;
            self.createButton.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
            self.createButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
            self.createButton.enabled = YES;
            [self.createButton addTarget:self action:@selector(createThing:) forControlEvents:UIControlEventTouchUpInside];

and this in the same controller

-(void)createThing:(UIButton *)sender {
    NSLog(@"Doing ...");
}

Any hint ?

space in the initial [iOS 11]

Hello brother,

There is a space between segmentView and the contentView in the initial either by click on segmentButton or switching between the pages.

Please look at this image https://d.pr/QV13wj

Any advice?

Regards

初始化时设置的frame没有占满屏幕,contentViews多向下偏移的问题

如下图所示,根据需求,需要空出状态栏的位置,于是设置frame为

HHHorizontalPagingView *pagingView = [[HHHorizontalPagingView alloc] initWithFrame:CGRectMake(0., 20.0, [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height-20.0)];

segmentButtons的位置没有问题,但contentViews多向下偏移了20,请问该如何解决?
谢谢!

simulator screen shot 2017 3 5 22 19 31

手势失效

进入之后的操作:
手势滑动到view1 -> 上下滑动 -> 点击segmentView0切换到View0 -> 上下滑动 -> 手势滑动到View1 -> 上下不能滑动

headerHeight设置失效

设置这句代码,// [headerView.headerImageView setContentMode:UIViewContentModeScaleAspectFill];会导如下headerHeight设置失效,出现BUG
[HHHorizontalPagingView pagingViewWithHeaderView:headerView headerHeight:200.f segmentButtons:buttonArray segmentHeight:60 contentViews:@[tableView, collectionView, scrollView]];

hearderView改变导致上下滑动分开

我做了一个类似朋友圈功能,监听到有未读消息,hearderView会多出一块来提示用户,这部分应该怎么实现比较完美.我现在实现出来 高度变化之后,滑动的时候 segmentView和下面的View会有明显分开的感觉

Reload segments

Hi Again,
Hope you are doing well.

is it possible to reload the segments for example in the initial you set 3 segments and you did some actions you need to reload the segments to be 4.

What do you think?

Thanks

加入MJRefresh后的问题

我现在想加个MJRefresh 在刷新结束时 会出现segment和contentView 会分离一下的情况 不知道是怎么回事

Move indicator

I tried to use YSLContainerViewController, but it crashed what I want to do is add line indicator to be in the bottom of segments so when the user start scroll the indicator move based on CGoffset could you help me on this please?

the code is:

HHHorizontalPagingView *pagingView = [HHHorizontalPagingView pagingViewWithHeaderView:headerView headerHeight:300.f segmentButtons:buttonArray segmentHeight:60 contentViews:@[self.containerV.view]];

Crash log:

2017-02-11 22:32:54.893 HHHorizontalPagingView[3556:307611] -[UIView contentInset]: unrecognized selector sent to instance 0x7fa8b3100430
2017-02-11 22:32:54.897 HHHorizontalPagingView[3556:307611] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView contentInset]: unrecognized selector sent to instance 0x7fa8b3100430'
*** First throw call stack:
(
0 CoreFoundation 0x00000001093aad4b _exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000108e0c21e objc_exception_throw + 48
2 CoreFoundation 0x000000010941af04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x0000000109330005 forwarding + 1013
4 CoreFoundation 0x00000001093bda08 forwarding_prep_1
+ 120
5 HHHorizontalPagingView 0x00000001088122ad -[HHHorizontalPagingView configureContentView] + 461
6 HHHorizontalPagingView 0x00000001088113cc +[HHHorizontalPagingView pagingViewWithHeaderView:headerHeight:segmentButtons:segmentHeight:contentViews:] + 2412
7 HHHorizontalPagingView 0x000000010880fbfa -[ViewController viewDidLoad] + 2186
8 UIKit 0x000000010a083a3d -[UIViewController loadViewIfRequired] + 1258
9 UIKit 0x000000010a083e70 -[UIViewController view] + 27
10 UIKit 0x0000000109f4d4b5 -[UIWindow addRootViewControllerViewIfPossible] + 71
11 UIKit 0x0000000109f4dc06 -[UIWindow _setHidden:forced:] + 293
12 UIKit 0x0000000109f61519 -[UIWindow makeKeyAndVisible] + 42
13 UIKit 0x0000000109ed9f8d -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4818
14 UIKit 0x0000000109ee00ed -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
15 UIKit 0x0000000109edd26d -[UIApplication workspaceDidEndTransaction:] + 188
16 FrontBoardServices 0x000000010e0776cb FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 24
17 FrontBoardServices 0x000000010e077544 -[FBSSerialQueue _performNext] + 189
18 FrontBoardServices 0x000000010e0778cd -[FBSSerialQueue _performNextFromRunLoopSource] + 45
19 CoreFoundation 0x000000010934f761 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
20 CoreFoundation 0x000000010933498c __CFRunLoopDoSources0 + 556
21 CoreFoundation 0x0000000109333e76 __CFRunLoopRun + 918
22 CoreFoundation 0x0000000109333884 CFRunLoopRunSpecific + 420
23 UIKit 0x0000000109edbaea -[UIApplication _run] + 434
24 UIKit 0x0000000109ee1c68 UIApplicationMain + 159
25 HHHorizontalPagingView 0x0000000108819faf main + 111
26 libdyld.dylib 0x000000010c91f68d start + 1
27 ??? 0x0000000000000001 0x0 + 1
)

键盘问题

我在cell上加了一个searchBar 然后键盘出现的时候 不管在什么位置 都回到最上方 我设置offset 也不管用

ios11问题

加载完成第一个子视图,向上滑动 然后点击或者滑动加载第二个子视图 第二个子视图的位置还在刚开始的位置 没有随这header的变化而变化 我没解决了 求帮助 @Huanhoo

可否添加下拉刷新的功能

如要添加下拉刷新,貌似要在横向所有的tableView上添加下拉刷新控件,现在我有这么一个需求,只需要添加一个下拉刷新的控件,因为横向滑动的tableView数据是来自这个下拉刷新后从接口获得的数据,能否添加

StretchyFactor for animation purpose

Dear brother,

We would like to enhance and add nice thing to be used in the header something called StretchyFactor which is help for animation effects for example: change alpha / size / scale / position for any object inside the headerView.

Lets suppose we have UIButton in the headerView and while scrolling down/up we need to change alpha of that UIButton. If the user scrolling to segmentTopSpace so the UIButton alpha will be 0 then if the user scrolling up the alpha will be increase based on StretchyFactor or position.

Hope you got my idea. Am trying to use a sample code in other repository but it doesn't work.

CGFloat ownHeight = CGRectGetHeight(self.bounds);
CGFloat contentHeightDif = (self.maximumContentHeight - self.minimumContentHeight);
CGFloat maxContentViewHeight = ownHeight - self.verticalInset;
CGFloat newStretchFactor = (maxContentViewHeight - self.minimumContentHeight) / contentHeightDif;

iOS 10 的问题

先上下滑动 然后左右滑动 会出现contentoffset 出错

Header height got increased during segments event and scrolling

Hello friend,

I got an issue which increases the section height for tableView and it is considered as an empty space if the user clicks on a segment and scroll down/up immediately.

To reproduce this issue please you can do by following steps:

  • 1. Click on another current segment.
  • 2. Once you click the segment try to scroll down/up immediately.

Kindly refer also to the below screenshot:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.