FloatingWindow
懸浮窗圓形轉場動畫框架,首先是實現了懸浮窗,然後再添加了圓形縮小的入場動畫和圓形擴大的出場動畫,可以給所有的controller添加這個效果
效果圖
如何使用
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)];
源碼:https://github.com/HZQuan/FloatingWindow