RNExpandingButtonBar
=========
RNExpandingButtonBar is a simple iOS widget created by Ryan Nystrom. The widget is designed to be highly portable and customizable. There are no default images or buttons. Everything that you want to use as buttons should be customly made.
Inspiration for this button bar came from the app Path in which they practically removed the need for a UITabBar by adding a button in the bottom left. The goal with this widget is to replicate that functionality and give you the option of using buttons that animate in and out to reclaim some much needed UI space.
[View a demo video on YouTube](http://www.youtube.com/watch?v=zOimiztCycY)
<img src="https://github.com/rnystrom/RNExpandingButtonBar/raw/master/images/base.png" width="200" style="box-shadow: 2px 2px 5px #000; margin: 0 15px;" />
<img src="https://github.com/rnystrom/RNExpandingButtonBar/raw/master/images/expanded.png" width="200" style="box-shadow: 2px 2px 5px #000; margin: 0 15px;" />
<img src="https://github.com/rnystrom/RNExpandingButtonBar/raw/master/images/table.png" width="200" style="box-shadow: 2px 2px 5px #000; margin: 0 15px;" />
### Installation
Just drag and drop the RNExpandingButtonBar.h and RNExpandingButtonBar.m files into your project and you are ready to go. Both files were designed to use ARC technologies so you will need to use this widget in an ARC enabled environment, which requires iOS SDK 5+.
### Usage
The widget is customizable using the following methods:
- (id) initWithImage:(UIImage*)image
selectedImage:(UIImage*)selectedImage
toggledImage:(UIImage*)toggledImage
toggledSelectedImage:(UIImage*)toggledSelectedImage
buttons:(NSArray*)buttons
center:(CGPoint)center;
Creates and returns the instance of RNExpandingButtonBar. Pass it four images for the normal and toggled buttons. You can also pass selected images for each state. Next you pass an NSArray of buttons that you want to be animated into view. This can be any type of button that responds to any method that you wish. Finally, send a coordinate for the center of the view.
Then, since RNExpandingButtonBar is a subclass of UIView, add the bar to your view with a simple <code>-addSubview</code> from your main view controller. To show or hide the buttons that were passed after initialization, call:
-showButtonsAnimated:(BOOL)animated
-hideButtonsAnimated:(BOOL)animated
### Customizing
There are many properties of the RNExpandingButtonBar that are customizable.
- (void) setAnimationTime:(float)time;
Change the total time that buttons take to animate. Default is 0.4f.
- (void) setFadeTime:(float)time;
Change the time that it takes for the main and toggle button to switch. Default is 0.2f.
- (void) setPadding:(float)padding;
Set the padding in between buttons. Default is 15.0f.
- (void) setSpin:(BOOL)b;
If you want the buttons to spin as they animate out and back. Default to NO.
- (void) setHorizontal:(BOOL)b;
If the animations should be horizontal. Default to NO.
- (void) setFar:(float)num;
Set the distance from the final position that the buttons should bounce above. Default is 15.0f.
- (void) setNear:(float)num;
Set the distance from the final position that the buttons should bounce below. Default is 7.0f.
- (void) setDelay:(float)num;
Set the delay in between buttons appearing and animating. Default is 0.1f.
### License
Copyright (C) 2012 Ryan Nystrom
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.
http://www.opensource.org/licenses/Mopyright
没有合适的资源?快使用搜索试试~ 我知道了~
iOS游戏应用源代码——rnystrom-RNExpandingButtonBar-cc1c3a5.zip
共40个文件
png:17个
m:6个
h:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 62 浏览量
2023-07-05
23:22:37
上传
评论
收藏 207KB ZIP 举报
温馨提示
iOS游戏应用源代码——rnystrom-RNExpandingButtonBar-cc1c3a5.zip
资源推荐
资源详情
资源评论
收起资源包目录
iOS游戏应用源代码——rnystrom-RNExpandingButtonBar-cc1c3a5.zip (40个子文件)
rnystrom-RNExpandingButtonBar-cc1c3a5
RNExpandingButtonBar.h 6KB
.gitignore 130B
images
expanded.png 21KB
base.png 16KB
table.png 36KB
RNExpandingButtonBar.m 15KB
example
ExpandingBarExample
AppDelegate.h 312B
AppDelegate.m 820B
main.m 349B
ExpandingBarExample-Prefix.pch 341B
Graphics
red_plus_up.png 5KB
next@2x.png 6KB
check.png 4KB
red_x_up.png 6KB
red_x_down@2x.png 10KB
check@2x.png 7KB
next.png 4KB
lightbulb.png 4KB
red_plus_up@2x.png 8KB
red_x_down.png 6KB
red_plus_down.png 5KB
red_x_up@2x.png 9KB
red_plus_down@2x.png 9KB
lightbulb@2x.png 6KB
FirstView.m 4KB
ExpandingBarExample-Info.plist 1KB
FirstView.h 306B
en.lproj
InfoPlist.strings 45B
RNExpandingButtonBar.h 6KB
SecondView.h 284B
ExpandingBarExample.xcodeproj
project.pbxproj 19KB
xcuserdata
monkey_slap.xcuserdatad
xcdebugger
Breakpoints.xcbkptlist 91B
xcschemes
xcschememanagement.plist 491B
ExpandingBarExample.xcscheme 3KB
project.xcworkspace
contents.xcworkspacedata 164B
xcuserdata
monkey_slap.xcuserdatad
UserInterfaceState.xcuserstate 41KB
WorkspaceSettings.xcsettings 382B
RNExpandingButtonBar.m 15KB
SecondView.m 3KB
README.md 4KB
共 40 条
- 1
资源评论
快乐无限出发
- 粉丝: 1131
- 资源: 7269
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功