Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Page1.Initialize("Page1")
Page1.Title = "Page 1"
Page1.RootPanel.Color = Colors.White
NavControl.ShowPage(Page1)
SetEvent
End Sub
Sub ScreenIsCaptured As Boolean
Dim no As NativeObject
Return no.Initialize("UIScreen").RunMethod("mainScreen", Null).GetField("isCaptured").AsBoolean
End Sub
Sub SetEvent
Dim no As NativeObject = Me
no.RunMethod("AddEvent", Null)
#if OBJC
- (void)AddEvent {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_capture_change) name:UIScreenCapturedDidChangeNotification object:nil];
}
#end if
End Sub
Private Sub Capture_Change
Log(ScreenIsCaptured)
End Sub