I think someone had figured out a way to monitor for device orientation change and subsequently redraw a presented ui.View. I can't find that in the forums..
I did find a way to do that with objc, but after starting venturing into objc land for a moment...I got lost.
Here's what I pulled from stack exchange... Sounds like the right thing to do.
// Listen for device orientation changes:
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(deviceOrientationDidChangeNotification:)
name:UIDeviceOrientationDidChangeNotification
object:nil];
// When notified, get the device orientation from UIDevice:
- (void)deviceOrientationDidChangeNotification:(NSNotification*)note
{
UIDeviceOrientation orientation = [[UIDevice currentDevice] orientation];
switch (orientation)
{
// etc...
}
}
- I'm wondering how I can make this with objc_util
- How is this even implemented in a script? It seems like it should go inside a view class... But I have no idea.