Giter Site home page Giter Site logo

sppage's Introduction

SPPage

Please do not add QQ.
If you have questions, send my Email or create issues.

Requirements

iOS >= 7

Installation

Copy codes or git specs.

attention
please set ContainerVc property automaticallyAdjustsScrollViewInsets NO

Contact

Email:[email protected]

Version

1.0

sppage's People

Contributors

xichen744 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

sppage's Issues

我现在有个问题?

我请求接口,拿到分类的id,我怎么通过分类这个数组去加载pagecontroller

关于页面切换动画一段代码的问题

 UIView *oldSelectView = [self controllerAtIndex:oldSelectIndex].view;
                CGFloat backgroundIndex = [self.scrollView calcIndexWithOffset:self.scrollView.contentOffset.x width:self.scrollView.frame.size.width];
                UIView *backgroundView = nil;
                if (oldSelectView.layer.animationKeys.count > 0 && lastView.layer.animationKeys.count > 0) {
                    UIView *tmpView = [self controllerAtIndex:backgroundIndex].view;
                    if (tmpView != currentView && tmpView != lastView) {
                        backgroundView = tmpView;
                        backgroundView.hidden = YES;
                    }
                }

                [self.scrollView.layer removeAllAnimations];
                [oldSelectView.layer removeAllAnimations];
                [lastView.layer removeAllAnimations];
                [currentView.layer removeAllAnimations];
                
                [self moveBackToOriginPositionIfNeeded:oldSelectView index:oldSelectIndex];

中根据backgroundIndex得来的backgroundView 和 oldSelectView 这些view的相关操作有什么作用?是你文章里面说

非交互切换,模拟切换的动画,这里需要考虑的一个复杂情况是第一次动画还未结束就开始第二次,这时候需要提前结束第一次动画

但是对于这段代码真的是完全茫然的,还希望作者能稍微解释一下

swift效果问题

swift版本的代码,个数与滑动都有问题。可以分享一下你的思路和布局结构吗?

强烈建议!!!KSTATUSBARHEIGHT和KNAVIGATIONANDSTATUSBARHEIGHT这两个宏的问题

KSTATUSBARHEIGHT和KNAVIGATIONANDSTATUSBARHEIGHT这两个宏最好不要这样写死,兼容性不好,
建议这样写:
`- (CGFloat)statusBarHeight{
return CGRectGetHeight([UIApplication sharedApplication].statusBarFrame);
}

  • (CGFloat)navigationBarHeight{
    CGFloat height = 0;

    height += CGRectGetHeight([UIApplication sharedApplication].statusBarFrame);

    height += CGRectGetHeight(self.navigationController.navigationBar.frame);

    return height;
    }`
    这样,无论导航栏和状态栏是否隐藏或者是iPhoneX或者更奇葩的屏幕都没问题。(请原谅我插入代码没效果)

还是有一定的问题

比如推上去, 第一个页面滑动到第5行,切换到第2个页面,把cover拉下来点,第一个页面回到第0行了,以前第5行的状态没了,
这个效果在安卓上有实现,

效果不对

demo里面,拖动黑色的部分,不能上下滚动,只能拖动红色的部分,体验不好

下拉刷新触发不了

tableview的下拉刷新触发不了,刷新头添加到pageController.scrollView也不行.能不能加个可以添加下拉刷新的功能?急需~

SPTagBarScrollView 支持自定义 title 间隔

在重新计算 offset 时可以改成

CGFloat gap = 0;
offset = preferTabOffset;
if ((tabContentWidth+2*preferTabOffset ) < self.frame.size.width) {
    if ([self.tabDataSource respondsToSelector:@selector(numberOfTab)] && self.tabDataSource.numberOfTab > 1) {
        gap = (self.frame.size.width-tabContentWidth - 2*preferTabOffset)/ (CGFloat)(self.tabDataSource.numberOfTab - 1);
    }
    else
    {
        offset = (self.frame.size.width-tabContentWidth)/2.0;
    }
}
for (int i=0;i<[self.tabDataSource numberOfTab];i++) {
    ...
    offset += tagWidth + gap;
}
offset -= gap;

或者 SPTabDataSource 加入获取自定义间距的方法。

横屏适配

目前看来并不支持横屏,然而横屏的场景还是很多的

建议!!!!!KSTATUSBARHEIGHT 和KNAVIGATIONANDSTATUSBARHEIGHT的问题

KSTATUSBARHEIGHT 和KNAVIGATIONANDSTATUSBARHEIGHT这两个宏这样写兼容性太差了,建议这样写:
`- (CGFloat)statusBarHeight{
return CGRectGetHeight([UIApplication sharedApplication].statusBarFrame);
}

  • (CGFloat)navigationBarHeight{
    CGFloat height = 0;

    height += CGRectGetHeight([UIApplication sharedApplication].statusBarFrame);

    height += CGRectGetHeight(self.navigationController.navigationBar.frame);

    return height;
    }
    `

这样无论导航栏和状态栏是否隐藏还是iPhoneX或者更奇葩的屏幕,都可以兼容。(请原谅我插入代码没效果)

代码问题

83c2a228-2e4c-4ea4-8b5e-8ae48939bd8d

[self didMoveToParentViewController:self]有问题吧

self.tagViewsCache[index];有隐患->奔溃

SPTagBarScrollView类中的
SPPageTagView *nextTagView = self.tagViewsCache[index];
这样用有隐患的,if self.tagViewsCache是个空数组,然后index == 0
那就奔溃了

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.