同步操作将从 曾宪华/XHItemScrollToolBar 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
XHItemScrollToolBar is a TabBar or ItemBar for rolling, used for user category select
Easy to drop into your project.
You can add as many items as you want, the XHItemScrollToolBar will layout them automatically.
XHItemScrollToolBar requires Xcode 5, targeting either iOS 5.0 and above, ARC-enabled.
Drag XHItem.h/XHItem.m and XHItemView.h/XHItemView.m amd XHItemScrollToolBar.h/XHItemScrollToolBar.m files to your project.
No other frameworks required.
for (int i = 0; i < 10; i ++) {
XHItem *item = [[XHItem alloc] initWithNormalImage:[UIImage imageNamed:@"tabBar-camera"] selectedImage:[UIImage imageNamed:@"tabBar-camera-on"] title:@"title5" itemSelectedBlcok:^(XHItemView *itemView) {
NSInteger index = itemView.item.index;
NSLog(@"index : %d", index);
}];
[items addObject:item];
}
XHItemScrollToolBar *itemScrollToolBarToMid = [[XHItemScrollToolBar alloc] initWithFrame:CGRectMake(0, CGRectGetHeight(self.view.bounds) / 2.0 - kXHItemScrollToolBarHeight / 2.0, CGRectGetWidth(self.view.bounds), kXHItemScrollToolBarHeight)];
itemScrollToolBarToMid.itemWidth = CGRectGetWidth([[UIScreen mainScreen] bounds]) / 5.0;
itemScrollToolBarToMid.items = items;
itemScrollToolBarToMid.selectIndex = 2;
[self.view addSubview:itemScrollToolBarToMid];
[itemScrollToolBarToMid reloadData];
##Installation
CocosPods is the recommended methods of installation XHItemScrollToolBar, just add the following line to Profile
:
pod 'XHItemScrollToolBar'
XHItemScrollToolBar is available under the MIT license. See the LICENSE file for more info.
English:If you use open source components in your project, please Email us to tell us the name of your application, otherwise the consequence is proud.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。