Sub page_Resize (Width As Float, Height As Float)
Dim DeviceName As String = Me.As(NativeObject).RunMethod("deviceName", Null).AsString
If TabStrip1.IsInitialized And Main.App.OSVersion >= 11 Then
Dim no As NativeObject = TabStrip1
Dim window As NativeObject = Main.App
window = window.GetField("keyWindow")
Dim f() As Float = window.ArrayFromEdgeInsets(window.RunMethod("safeAreaInsets", Null))
If f(1) > 0 Then
Dim Container As View = no.GetField("containerView")
Sleep(50)
Dim PrevTop As Int = Container.Top
If DeviceName="iPhone15,3" Or DeviceName="iPhone15,2" Then
Container.Top = 49 - f(1)
Else
Container.Top = 44 - f(1)
End If
Container.Height = Container.Height + PrevTop - Container.top
End If
End If
End Sub
#If OBJC
#import <sys/utsname.h>
- (NSString*) deviceName
{
struct utsname systemInfo;
uname(&systemInfo);
NSString* code = [NSString stringWithCString:systemInfo.machine
encoding:NSUTF8StringEncoding];
return code;
}
#end if