Hi,
the ShouldAutoRotate function no longer works in iOS 16, how to solve the problem?
I found something here, but can not implement myself.
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
			
			the ShouldAutoRotate function no longer works in iOS 16, how to solve the problem?
I found something here, but can not implement myself.
			
				B4X:
			
		
		
		Sub Main_ShouldAutoRotate As Boolean
    Log("Main_ShouldAutoRotate")
    If IsSetOrientation Then
        If DeviceOrientation = "Portrait" And OrientationModus = "Landscape" Then
            Return False
        else If DeviceOrientation <> "Portrait" And OrientationModus = "Portrait" Then
            Return False
        Else
            Return True
        End If
    Else
        Return False
    End If
End Sub
	
			
				B4X:
			
		
		
		#if OBJC
@end
@interface UINavigationController (B4IResize)
@end
@implementation UINavigationController (B4IResize)
- (BOOL)shouldAutorotate
{
  return [(NSNumber*)[B4IObjectWrapper raiseEvent:self :@"_shouldautorotate" :nil] boolValue];
}
#End If
#End Region