iOS: Split classes in view.rs into separate files (#3511)

* Move application delegate to its own file
* Move window subclass to window.rs
* Split view controller to separate file
This commit is contained in:
Mads Marquart 2024-02-22 22:28:49 +01:00 committed by GitHub
parent 4a8648be57
commit a127bd6f66
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 382 additions and 356 deletions

View file

@ -27,7 +27,8 @@ use crate::{
window::{CustomCursor, CustomCursorSource},
};
use super::{app_state, monitor, view, MonitorHandle};
use super::app_delegate::AppDelegate;
use super::{app_state, monitor, MonitorHandle};
use super::{
app_state::AppState,
uikit::{UIApplication, UIApplicationMain, UIDevice, UIScreen},
@ -201,14 +202,14 @@ impl<T: 'static> EventLoop<T> {
app_state::will_launch(self.mtm, handler);
// Ensure application delegate is initialized
view::WinitApplicationDelegate::class();
let _ = AppDelegate::class();
unsafe {
UIApplicationMain(
0,
ptr::null(),
None,
Some(&NSString::from_str("WinitApplicationDelegate")),
Some(&NSString::from_str(AppDelegate::NAME)),
)
};
unreachable!()