Coder Social home page Coder Social logo

hacursor's Introduction

HACursor

Introduction:

HACursor,是一个对横向ScrollView中的视图进行管理的UI控件。只要几行代码就可以集成类似于网易新闻对主题页面进行排序,删除操作的功能。

Presentation:

滚动效果

()

排序效果

()

删除效果

()

Usage:

代码例子:其中(必选)为必须设置的属性,其余可根据需要来设置

HACursor *cursor = [[HACursor alloc]init];
cursor.frame = CGRectMake(0, 20, self.view.width, 45);

//显示的标题栏的标题(必选!!)
cursor.titles = self.titles; 
//需要管理的子页面(必选!!)
cursor.pageViews = self.pageViews;
//设置rootScrollView的高度(必选!!)
cursor.rootScrollViewHeight = self.view.frame.size.height - 65;

//设置标题普通状态下的颜色
cursor.titleNormalColor = [UIColor whiteColor];
//设置标题选中状态下的颜色
cursor.titleSelectedColor = [UIColor redColor];
//是否需要显示排序的按钮
cursor.showSortbutton = YES;
//设置背景颜色
cursor.backgroundColor = [UIColor yellowColor];
//设置最小化的字体,默认的最小值是5,小于默认值的话按默认值设置,(默认的最小值 < 设置值 <默认的最大值) 按设置的值处理
cursor.minFontSize = 10.0;
//设置最大化的字体,默认的最大值是25,小于默认值的话按默认值设置,大于默认值按设置的值处理
cursor.maxFontSize = 30.0;
//设置是否需要渐变字体的大小
cursor.isGraduallyChangFont = NO;
//设置是否需要渐变字体的颜色
//在isGraduallyChangFont为NO的时候,isGraduallyChangColor不会有效果
cursor.isGraduallyChangColor = NO;
[self.view addSubview:cursor];

Requirement:

  • iOS7.0以上
  • Xcode 6

hacursor's People

Watchers

 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.