Ole*_*ats 14
这应该是淡入淡出动画的技巧:
/* Swift 3 */
let statusBarWindow = UIApplication.shared.value(forKey: "statusBarWindow") as? UIWindow
UIView.animate(withDuration: 2) {
statusBarWindow?.alpha = 0.2
}
/* Objective-C */
UIWindow *statusBarWindow = (UIWindow *)[[UIApplication sharedApplication] valueForKey:@"statusBarWindow"];
[UIView animateWithDuration:2.f
animations:^{ [statusBarWindow setAlpha:0.2]; }
completion:nil];
Run Code Online (Sandbox Code Playgroud)
你也可以设置statusBarWindow frame并按你想要的方式移动它.玩得开心 ;]
| 归档时间: |
|
| 查看次数: |
1858 次 |
| 最近记录: |