Giter Club home page Giter Club logo

scindexview's Introduction

效果

微信效果图: defalut style.gifo动 toast效果图: center toast style.gifo动

功能及优点

主要功能及优点如下:

  1. 当滑动UITableView列表时,索引视图的索引位置会跟着移动;
  2. 当滑动UITableView列表时,另一根手指再滑动索引视图,列表滑动事件失效;
  3. 当滑动索引视图时,会有指示器或者toast提示当前索引位置;
  4. 当滑动索引视图时,不可以点击或者滑动UITableView列表;
  5. 可以任意定制指示器、toast、索引视图的大小,文字颜色大小,间距等UI样式;
  6. 当第一个数据为UITableViewIndexSearch时,自动添加放大镜图标。

使用方法

可以通过CocoaPods导入,支持iOS7及以上。

pod 'SCIndexView'

  1. 创建SCIndexViewConfiguration对象,这个对象用来控制索引的UI样式;
  2. 设置UITableView对象的 sc_translucentForTableViewInNavigationBar 和 sc_indexViewConfiguration;
  3. 再设置UITableView对象的索引数据源。 不用再关心SCIndexView视图本身,直接在UITableView上设置即可。
SCIndexViewConfiguration *indexViewConfiguration = [SCIndexViewConfiguration configuration];
tableView.sc_indexViewConfiguration = indexViewConfiguration;
tableView.sc_translucentForTableViewInNavigationBar = YES;
tableView.sc_indexViewDataSource = indexViewDataSource;

结束

如果大家有什么想法的话,可以向我反馈。如果大家喜欢的话,也可以通过star来鼓励下我,感谢大家捧场。

scindexview's People

Contributors

lazyycz 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.