MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / register_view_controller_class

Function register_view_controller_class

native/ios/src/lib.rs:223–236  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221}
222
223fn 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

Callers 2

bloom_init_windowFunction · 0.70

Calls 2

getFunction · 0.85
as_ptrMethod · 0.80

Tested by

no test coverage detected