YANScrollMenu
ARC
iOS 8.0+
CocoapodsYANScrollMenu is available via Cocoapods, add this line in your podfile :
pod 'YANScrollMenu', '~> 0.9.0'UsageImport the class :
#import 'YANScrollMenu.h'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];YANScrollMenuProtocol must be adopted :
- (NSUInteger)numberOfRowsForEachPageInScrollMenu:(YANScrollMenu *)scrollMenu; - (NSUInteger)numberOfItemsForEachRowInScrollMenu:(YANScrollMenu *)scrollMenu; - (NSUInteger)numberOfMenusInScrollMenu:(YANScrollMenu *)scrollMenu; - (YANMenuObject *)scrollMenu:(YANScrollMenu *)scrollMenu objectAtIndexPath:(NSIndexPath *)indexPath;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;DependencyYANScrollMenu depend on SDWebImage and Masonry.
When the version of SDWebImage large than 3.8.2 , gif will not be supported.
Release NotesV 0.9.0 The first version
LicenseYANScrollMenu is released under the MIT license. See LICENSE file for details.
ContactAny suggestion or question? Please create a Github issue .
,论文,开题报告