HSPlayerFullScreenDemo
播放器旋转Demo
播放器旋转Demo
播放器旋转Demo
在我開發的 App 中有個需求是 AppDelegate
rootViewController
必須是 UITabBarViewController
,發現只要使用多個
UIWindow
方式切換至橫屏,快速下拉至控制中心讓 App 經過 willResignActive
, didBecomeActive
生命週期,這時從橫屏
返回直屏並返回到 rootViewController
layout 有機會跑版,看起來像是 safe area 沒有回復至直屏的樣子。
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let rootController = ViewController.init()
let rootController2 = ViewController.init()
let rootController3 = ViewController.init()
window = UIWindow.init(frame: UIScreen.main.bounds)
let tab = UITabBarController()
let a = UINavigationController.init(rootViewController: rootController)
a.tabBarItem = UITabBarItem(title: "A", image: nil, selectedImage: nil)
let b = UINavigationController.init(rootViewController: rootController2)
b.tabBarItem = UITabBarItem(title: "B", image: nil, selectedImage: nil)
let c = UINavigationController.init(rootViewController: rootController3)
c.tabBarItem = UITabBarItem(title: "C", image: nil, selectedImage: nil)
tab.viewControllers = [a,b,c]
window?.rootViewController = tab
window?.makeKeyAndVisible()
return true
}
不知道您有沒有遇過類似的狀況,網路上找很久沒找到解法
有的個方向就太好了 感謝~
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.