You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.0 KiB

1 year ago
  1. namespace CircleViewerMac
  2. {
  3. [Register("AppDelegate")]
  4. public class AppDelegate : UIApplicationDelegate
  5. {
  6. public override UIWindow? Window
  7. {
  8. get;
  9. set;
  10. }
  11. public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
  12. {
  13. // create a new window instance based on the screen size
  14. Window = new UIWindow(UIScreen.MainScreen.Bounds);
  15. // create a UIViewController with a single UILabel
  16. var vc = new UIViewController();
  17. vc.View!.AddSubview(new UILabel(Window!.Frame)
  18. {
  19. BackgroundColor = UIColor.SystemBackground,
  20. TextAlignment = UITextAlignment.Center,
  21. Text = "Hello, Mac Catalyst!",
  22. AutoresizingMask = UIViewAutoresizing.All,
  23. });
  24. Window.RootViewController = vc;
  25. // make the window visible
  26. Window.MakeKeyAndVisible();
  27. return true;
  28. }
  29. }
  30. }