()
| 221 | } |
| 222 | |
| 223 | fn register_view_controller_class() { |
| 224 | if AnyClass::get(c"BloomViewController").is_some() { return; } |
| 225 | |
| 226 | unsafe { |
| 227 | let superclass = AnyClass::get(c"UIViewController").unwrap(); |
| 228 | let cls = objc_allocateClassPair(superclass as *const AnyClass, b"BloomViewController\0".as_ptr(), 0); |
| 229 | if cls.is_null() { return; } |
| 230 | |
| 231 | let sel = Sel::register(c"supportedInterfaceOrientations"); |
| 232 | class_addMethod(cls, sel, bloom_vc_supported_orientations as *const c_void, b"Q16@0:8\0".as_ptr()); |
| 233 | |
| 234 | objc_registerClassPair(cls); |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | // ============================================================ |
| 239 | // Scene delegate — creates UIWindow + Metal view + wgpu engine |
no test coverage detected