| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
9年前发布

仿新浪微博客户端“加号”按钮弹出动画

仿新浪微博客户端“加号”按钮弹出动画

演示1 演示2

怎么使用:

1.导入头文件

#import "BHBPopView.h"

2.显示弹出框

//添加popview  [BHBPopView showToView:self.view       andImages:@[@"images.bundle/tabbar_compose_idea",        @"images.bundle/tabbar_compose_photo",@"images.bundle/tabbar_compose_camera",        @"images.bundle/tabbar_compose_lbs",@"images.bundle/tabbar_compose_review",        @"images.bundle/tabbar_compose_more"]       andTitles:        @[@"Text",@"Albums",@"Camera",@"Check in",@"Review",@"More"]       andSelectBlock:^(BHBItem *item, NSInteger index) {        }  ];

3.使用带more按钮滑动显示第二屏功能

BHBItem * item0 = [[BHBItem alloc]initWithTitle:@"Text" Icon:@"images.bundle/tabbar_compose_idea"];  BHBItem * item1 = [[BHBItem alloc]initWithTitle:@"Albums" Icon:@"images.bundle/tabbar_compose_photo"];  BHBItem * item2 = [[BHBItem alloc]initWithTitle:@"Camera" Icon:@"images.bundle/tabbar_compose_camera"];  BHBItem * item3 = [[BHBItem alloc]initWithTitle:@"Check in" Icon:@"images.bundle/tabbar_compose_lbs"];  BHBItem * item4 = [[BHBItem alloc]initWithTitle:@"Review" Icon:@"images.bundle/tabbar_compose_review"];  BHBItem * item5 = [[BHBItem alloc]initWithTitle:@"More" Icon:@"images.bundle/tabbar_compose_more"];  //第六个按钮是more按钮  item5.isMore = YES;  BHBItem * item6 = [[BHBItem alloc]initWithTitle:@"Friend Circle" Icon:@"images.bundle/tabbar_compose_friend"];  BHBItem * item7 = [[BHBItem alloc]initWithTitle:@"Weibo Camera" Icon:@"images.bundle/tabbar_compose_wbcamera"];  BHBItem * item8 = [[BHBItem alloc]initWithTitle:@"Music" Icon:@"images.bundle/tabbar_compose_music"];  BHBItem * item9 = [[BHBItem alloc]initWithTitle:@"Blog" Icon:@"images.bundle/tabbar_compose_weibo"];  BHBItem * item10 = [[BHBItem alloc]initWithTitle:@"Collection" Icon:@"images.bundle/tabbar_compose_transfer"];  BHBItem * item11 = [[BHBItem alloc]initWithTitle:@"Voice" Icon:@"images.bundle/tabbar_compose_voice"];    //添加popview  [BHBPopView showToView:self.view withItems:@[item0,item1,item2,item3,item4,item5,item6,item7,item8,item9,item10,item11]andSelectBlock:^(BHBItem *item, NSInteger index) {      NSLog(@"%ld,选中%@",index,item.title);  }];

项目主页:http://www.open-open.com/lib/view/home/1440422090919

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1440422090919.html
动画 iOS开发 移动开发