【文件属性】:
文件名称:ios-仿qq未读消息的拖拽效果.zip
文件大小:20KB
文件格式:ZIP
更新时间:2022-07-31 13:16:16
视图动画
仿qq未读消息的拖拽效果
github地址:https://github.com/AYJk/AYBubbleView,喜欢的请点个star哦。谢谢啦。
blog地址:http://ayjkdev.top/2016/04/03/bubbleview-like-qq/ 里面有比较的分析介绍。
初始化:
self.bubbleView = [[AYBubbleView alloc] initWithCenterPoint:self.view.center bubleRadius:15 addToSuperView:self.view];
self.bubbleView.decayCoefficent = .2;
self.bubbleView.unReadLabel.text = @"1";
self.bubbleView.bubbleColor = [UIColor redColor];
__weak typeof(self) weakSelf = self;
self.bubbleView.cleanMessageBlock = ^(BOOL isClean) {
if (isClean) {
weakSelf.messageSteper.value = 0;
} else {
// do other logical operation
}
};
当需要显示气泡的时候调用下面的方法
[self.bubbleView showBubbleView];
当需要隐藏气泡的时候调用下面的方法
[self.bubbleView hidenBubbleView];
超出一定范围会自动隐藏,可通过block回调继续逻辑操作。
超出一定范围后或未超过范围,气泡会自动回弹。
【文件预览】:
AYBubbleView-master
----AYBubbleViewTests()
--------Info.plist(733B)
--------AYBubbleViewTests.m(908B)
----AYBubbleViewUITests()
--------Info.plist(733B)
--------AYBubbleViewUITests.m(1KB)
----LICENSE(1KB)
----README.md(1KB)
----AYBubbleView()
--------ViewController.m(1KB)
--------Info.plist(1KB)
--------main.m(328B)
--------Base.lproj()
--------AYBubbleView()
--------ViewController.h(209B)
--------AppDelegate.h(271B)
--------Assets.xcassets()
--------AppDelegate.m(2KB)
----.gitignore(1KB)
----AYBubbleView.xcodeproj()
--------project.xcworkspace()
--------project.pbxproj(21KB)