iOS懸浮窗UIBezierPath圓形擴散轉場動畫
阿新 • • 發佈:2019-01-11
跟大家介紹下,我的第一個開源庫,最近幾天都上了github star 日排,感謝各位小夥伴的支援,懸浮窗圓形轉場動畫框架,首先是實現了懸浮窗,然後再添加了圓形縮小的入場動畫和圓形擴大的出場動畫,可以給所有的controller新增這個效果
Look
How to use it
1.在appdelegate中新增
- (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions {
self.floatWindow = [[FloatingWindow alloc] initWithFrame:CGRectMake(100, 100, 76, 76) imageName:@”av_call”];
[self.floatWindow makeKeyAndVisible];
self.floatWindow.hidden = YES;
return YES;
}
2.你需要開啟懸浮窗的viewcontroller中新增方法:
實現點選小圓點的委託 deleage.floatWindow.floatDelegate = weakSelf;
開啟懸浮窗 [deleage.floatWindow startWithTime:30 presentview:self.view inRect:CGRectMake(100, 100, 100, 100)];