欢迎光临
我们一直在努力

仿美团首页菜单

建站超值云服务器,限时71元/月

仿美团首页菜单

项目介绍:

YANScrollMenu

License MIT
CocoaPods
CocoaPods

Requirements

  • ARC

  • iOS 8.0+

Cocoapods

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

   pod 'YANScrollMenu', '~> 0.9.0'

Usage

  1. Import the class :

     #import "YANScrollMenu.h"
  2. 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];
  3. YANScrollMenuProtocol must be adopted :

    - (NSUInteger)numberOfRowsForEachPageInScrollMenu:(YANScrollMenu *)scrollMenu;
    - (NSUInteger)numberOfItemsForEachRowInScrollMenu:(YANScrollMenu *)scrollMenu;
    - (NSUInteger)numberOfMenusInScrollMenu:(YANScrollMenu *)scrollMenu;
    - (YANMenuObject *)scrollMenu:(YANScrollMenu *)scrollMenu objectAtIndexPath:(NSIndexPath *)indexPath;
  4. 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.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 .

Github

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 仿美团首页菜单
分享到: 更多 (0)