Giter Site home page Giter Site logo

yanscrollmenu's Introduction

YANScrollMenu

License MIT CocoaPods CocoaPods

GIF

Requirements

  • ARC
  • iOS 8.0+

Cocoapods

YANScrollMenu is available via Cocoapods, add this line in your podfile :

   pod 'YANScrollMenu', '~> 0.9.1'

Usage

  1. Import the class :
  #import "YANScrollMenu.h"
  1. Simply initialize a YANScrollMenu the same way you set up a regular UIView:
  self.menu = [[YANScrollMenu alloc] initWithFrame:CGRectMake(0, 0, 375,150)];
  [self.view addSubview:self.menu];
  1. YANScrollMenuProtocol must be adopted :
    - (NSUInteger)numberOfRowsForEachPageInScrollMenu:(YANScrollMenu *)scrollMenu;
    - (NSUInteger)numberOfItemsForEachRowInScrollMenu:(YANScrollMenu *)scrollMenu;
    - (NSUInteger)numberOfMenusInScrollMenu:(YANScrollMenu *)scrollMenu;
    - (id<YANMenuObject>)scrollMenu:(YANScrollMenu *)scrollMenu objectAtIndexPath:(NSIndexPath *)indexPath;
  2. Custom appearance :
     [[YANMenuItem appearance] setIconSize:30];
     [[YANMenuItem appearance] setIconCornerRadius:15];
     [[YANMenuItem appearance] setTextFont:[UIFont systemFontOfSize:12]];
     [[YANMenuItem appearance] setTextColor:[UIColor darkTextColor]];
    The function in YANScrollMenuProtocol can be use to adjust the edgeInsets of YANMenuItem:
    - (YANEdgeInsets)edgeInsetsOfItemInScrollMenu:(YANScrollMenu *)scrollMenu;

Dependency

YANScrollMenu depend on SDWebImage and Masonry.

  • When the version of SDWebImage large than 3.8.2 , gif will not be supported.

Release Notes

  • V 0.9.1 Fix some bug and optimize the code
  • V 0.9.0 The first version

License

YANScrollMenu is released under the MIT license. See LICENSE file for details.

Contact

Any suggestion or question? Please create a Github issue .

yanscrollmenu's People

Watchers

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