bb-coder / bhbpopview Goto Github PK
View Code? Open in Web Editor NEW仿新浪微博客户端“加号”按钮弹出动画
License: MIT License
仿新浪微博客户端“加号”按钮弹出动画
License: MIT License
移除动画时,BHBItem过多,completed的时候self.superview.superview== nil
以下是我的解决方法,请勿见笑
- (void)removeAnimation{
[self.visableBtnArray enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
BHBCustomBtn * btn = obj;
CGFloat x = btn.frame.origin.x;
CGFloat y = btn.frame.origin.y;
CGFloat width = btn.frame.size.width;
CGFloat height = btn.frame.size.height;
UIView *containerView = self.superview.superview;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)((self.visableBtnArray.count - idx) * 0.03 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[UIView animateWithDuration:.5 delay:0 usingSpringWithDamping:0.9 initialSpringVelocity:5 options:0 animations:^{
btn.alpha = 0;
btn.frame = CGRectMake(x, [UIScreen mainScreen].bounds.size.height - self.frame.origin.y + y, width, height);
} completion:^(BOOL finished) {
if ([btn isEqual:[self.visableBtnArray firstObject]]) {
// self.superview.superview.userInteractionEnabled = YES;
containerView.userInteractionEnabled = YES;(改成这行)
}
}];
});
}];
}
popView的init方法中初始化的centerView 无法改变frame
请教一下
可以修改背景的透明度吗?有没有相关的属性控制。
不断多次点击 会使内存稳定增加
UIGraphicsGetImageFromCurrentImageContext 函数
我的解决办法是 加 autoreleasepool
7.0下测试一切正常
怎么做成现在qq空间和新版微博一样,可以左右滑动,下面有个指示器的那种呢。
有人做过吗?可以给个Demo嘛
封装一个对象,把@"images.bundle/tabbar_compose_idea" 及对应的action, target放在一起多好....
cocoapods导入之后,发现少了BHBGroup.h和.m文件;
添加引用后,//添加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) {
}
];
报^(BHBItem *item)_strong错误
求博主解答~谢了
疼
你好,很感谢你写的这个,真的太好了!
但是我遇到一个问题。
在使用你的demo的时候,点击弹出时虽然瞬间增加内存,但随后就清理掉了。
可是当我我直接把文件夹拉到自己的项目时,点击弹出后增加了几十MB内存,却没有去清理,请问是什么问题啊?
非常非常感谢,为我这只菜鸟解了燃眉之急
DynamicViewController *VC = [[DynamicViewController alloc]init];
VC.title = @"按钮页";
VC.modalPresentationStyle = UIModalPresentationCustom;
[self.navigationController presentViewController:VC animated:YES completion:^{}];
用模态的跳转方式弹出新界面 背景做高斯模糊效果,是否可以不再需要动态截屏呢?
高斯模糊用的 UIBlurEffect 效果不错
2016.11.30 效果已实现
现在这样每次出现都是重新创建,分配内存,如果是单利肯定会更好。
iOS7图片出不来,看到说更新了,下下来看了还是没有
就是跟新浪微博一样,按一个视图的button ,可以跳转到对应的viewcontroller中,现在demo中都是写的退出的方法,我将退出的方法注释掉,然后写跳转viewcontroller ,但是出来不好使,麻烦如何写啊
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.