1 Star 0 Fork 2

dutaodela / XHItemScrollToolBar

forked from 曾宪华 / XHItemScrollToolBar 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

image

XHItemScrollToolBar

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.

Requirements

XHItemScrollToolBar requires Xcode 5, targeting either iOS 5.0 and above, ARC-enabled.

How to use

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'

Lincense

XHItemScrollToolBar is available under the MIT license. See the LICENSE file for more info.

Instructions

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.

The MIT License (MIT) Copyright (c) 2014 JackTeam Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

XHItemScrollToolBar is a TabBar or ItemBar for scrolling, used for user category select. 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/dutaodela/XHItemScrollToolBar.git
git@gitee.com:dutaodela/XHItemScrollToolBar.git
dutaodela
XHItemScrollToolBar
XHItemScrollToolBar
master

搜索帮助