Commit bb99267
ios: implement required mtkView:drawableSizeWillChange: selector
`MTKViewDelegate` declares two `@required` methods:
`mtkView:drawableSizeWillChange:` and `drawInMTKView:`. The
`QuadViewDlg` class only registered the latter, so any actual
drawable-size change (window resize, rotation under a non-locked
orientation set, split-view drag on iPad) crashed:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[QuadViewDlg mtkView:drawableSizeWillChange:]:
unrecognized selector sent to instance 0x...'
... [MTKView _resizeDrawable]
... [UIView setFrame:]
... [UIWindow _rotateWindowToOrientation:...]
Reproduced on the iPad Air 11-inch simulator on iOS 27 by rotating
the device. Did not reproduce on the iPhone 17 simulator there
because CHOMP's Info.plist locks orientation, so the drawable size
never actually changes.
Implementation is a stub: `draw_in_rect` already polls
`UIScreen.mainScreen.bounds` every frame and emits `Message::Resize`
on a delta, so a no-op satisfies the protocol without changing the
existing resize path.1 parent 413218d commit bb99267
1 file changed
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
379 | 392 | | |
380 | 393 | | |
381 | 394 | | |
| |||
386 | 399 | | |
387 | 400 | | |
388 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
389 | 407 | | |
390 | 408 | | |
391 | 409 | | |
| |||
0 commit comments