Git Product home page Git Product logo

newpagedflowview's Introduction

NewPagedFlowView 1.1.2

###1.实现了什么功能 #####Version 1.1.2:

  • 处理一张图片时的展示问题
  • 处理一张图时的图片滚动bug
  • 非当前显示图片缩放更美观
  • 增加代理方法:- (void)didSelectCell:(UIView *)subView withSubViewIndex:(NSInteger)subIndex;(点击了第几个cell)

具体含义请看源代码, 如发现bug请联系:[email protected] (2016-08-08)


#####Version 1.1.1:

  • 简化数组,使用时只需创建一个图片数组即可
  • 解决首次加载时,直接从第一页跳到第三页的bug
  • 解决拖动时,偶尔乱跳的bug
  • 指示Label更明确
  • 增加代理方法的介绍

**具体含义请看源代码, 如发现bug请联系:[email protected] (2016-08-03)**
***

#####Version 1.0:

  • 页面滚动的方向分为横向和纵向

  • 目的:实现类似于选择电影票的效果,并且实现无限/自动轮播

  • 特点:1.无限轮播;2.自动轮播;3.电影票样式的层次感;4.非当前显示view具有缩放和透明的特效

###2.动画效果
动图请移步:
http://ww4.sinaimg.cn/mw690/9c6a8c79jw1f6geyiao4tg20a00dc4qu.gif

###3.功能介绍 /** * 开启定时器 */ - (void)startTimer;

/**
 *  关闭定时器
 */
- (void)stopTimer;

代理方法的使用

@protocol  NewPagedFlowViewDelegate<NSObject>

/**
 *  单个子控件的Size
 *
 *  @param flowView <#flowView description#>
 *
 *  @return <#return value description#>
*/
- (CGSize)sizeForPageInFlowView:(NewPagedFlowView *)flowView;

@optional
/**
 *  滚动到了某一列
 *
 *  @param pageNumber <#pageNumber description#>
 *  @param flowView   <#flowView description#>
 */
- (void)didScrollToPage:(NSInteger)pageNumber inFlowView:(NewPagedFlowView *)flowView;

/**
 *  点击了第几个cell
 *
 *  @param subView 点击的控件
 *  @param subIndex    点击控件的index
 *
 *  @return <#return value description#>
 */
 - (void)didSelectCell:(UIView *)subView withSubViewIndex:(NSInteger)subIndex;

@end

@protocol NewPagedFlowViewDataSource <NSObject>

/**
*  返回显示View的个数
*
*  @param flowView <#flowView description#>
*
*  @return <#return value description#>
*/
- (NSInteger)numberOfPagesInFlowView:(NewPagedFlowView *)flowView;

/**
*  给某一列设置属性
*
*  @param flowView <#flowView description#>
*  @param index    <#index description#>
*  @return <#return value description#>
*/
- (UIView *)flowView:(NewPagedFlowView *)flowView 	cellForPageAtIndex:(NSInteger)index;

@end

###4.代码示例 NewPagedFlowView *pageFlowView = [[NewPagedFlowView alloc] initWithFrame:CGRectMake(0, 64, Width, (Width - 84) * 9 / 16 + 24)]; pageFlowView.backgroundColor = [UIColor whiteColor]; pageFlowView.delegate = self; pageFlowView.dataSource = self; pageFlowView.minimumPageAlpha = 0.4; pageFlowView.minimumPageScale = 0.85;

//初始化pageControl
UIPageControl *pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(0, pageFlowView.frame.size.height - 24 - 8, Width, 8)];
pageFlowView.pageControl = pageControl;
[pageFlowView addSubview:pageControl];
[pageFlowView startTimer];
[self.view addSubview:pageFlowView];

**具体含义请看源代码, Designed By Page,QQ:799573715 **

newpagedflowview's People

Contributors

pageguo avatar

Watchers

James Cloos avatar  avatar

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.