-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into tvos-workaround-reverted
- Loading branch information
Showing
282 changed files
with
3,474 additions
and
2,427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 22 additions & 25 deletions
47
dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalyst/AppDelegate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
using Foundation; | ||
using UIKit; | ||
namespace MacCatalystApp1; | ||
|
||
namespace MacCatalystApp1 { | ||
[Register ("AppDelegate")] | ||
public class AppDelegate : UIApplicationDelegate { | ||
public override UIWindow? Window { | ||
get; | ||
set; | ||
} | ||
[Register ("AppDelegate")] | ||
public class AppDelegate : UIApplicationDelegate { | ||
public override UIWindow? Window { | ||
get; | ||
set; | ||
} | ||
|
||
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions) | ||
{ | ||
// create a new window instance based on the screen size | ||
Window = new UIWindow (UIScreen.MainScreen.Bounds); | ||
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions) | ||
{ | ||
// create a new window instance based on the screen size | ||
Window = new UIWindow (UIScreen.MainScreen.Bounds); | ||
|
||
// create a UIViewController with a single UILabel | ||
var vc = new UIViewController (); | ||
vc.View!.AddSubview (new UILabel (Window!.Frame) { | ||
BackgroundColor = UIColor.White, | ||
TextAlignment = UITextAlignment.Center, | ||
Text = "Hello, Catalyst!" | ||
}); | ||
Window.RootViewController = vc; | ||
// create a UIViewController with a single UILabel | ||
var vc = new UIViewController (); | ||
vc.View!.AddSubview (new UILabel (Window!.Frame) { | ||
BackgroundColor = UIColor.White, | ||
TextAlignment = UITextAlignment.Center, | ||
Text = "Hello, Catalyst!" | ||
}); | ||
Window.RootViewController = vc; | ||
|
||
// make the window visible | ||
Window.MakeKeyAndVisible (); | ||
// make the window visible | ||
Window.MakeKeyAndVisible (); | ||
|
||
return true; | ||
} | ||
return true; | ||
} | ||
} |
2 changes: 0 additions & 2 deletions
2
dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalyst/Main.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
using UIKit; | ||
|
||
using MacCatalystApp1; | ||
|
||
// This is the main entry point of the application. | ||
|
108 changes: 53 additions & 55 deletions
108
dotnet/Templates/Microsoft.MacCatalyst.Templates/maccatalyst/SceneDelegate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,55 @@ | ||
using Foundation; | ||
using UIKit; | ||
|
||
namespace MacCatalystApp1 { | ||
[Register ("SceneDelegate")] | ||
public class SceneDelegate : UIResponder, IUIWindowSceneDelegate { | ||
|
||
[Export ("window")] | ||
public UIWindow? Window { get; set; } | ||
|
||
[Export ("scene:willConnectToSession:options:")] | ||
public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions) | ||
{ | ||
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. | ||
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene. | ||
// This delegate does not imply the connecting scene or session are new (see UIApplicationDelegate `GetConfiguration` instead). | ||
} | ||
|
||
[Export ("sceneDidDisconnect:")] | ||
public void DidDisconnect (UIScene scene) | ||
{ | ||
// Called as the scene is being released by the system. | ||
// This occurs shortly after the scene enters the background, or when its session is discarded. | ||
// Release any resources associated with this scene that can be re-created the next time the scene connects. | ||
// The scene may re-connect later, as its session was not neccessarily discarded (see UIApplicationDelegate `DidDiscardSceneSessions` instead). | ||
} | ||
|
||
[Export ("sceneDidBecomeActive:")] | ||
public void DidBecomeActive (UIScene scene) | ||
{ | ||
// Called when the scene has moved from an inactive state to an active state. | ||
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. | ||
} | ||
|
||
[Export ("sceneWillResignActive:")] | ||
public void WillResignActive (UIScene scene) | ||
{ | ||
// Called when the scene will move from an active state to an inactive state. | ||
// This may occur due to temporary interruptions (ex. an incoming phone call). | ||
} | ||
|
||
[Export ("sceneWillEnterForeground:")] | ||
public void WillEnterForeground (UIScene scene) | ||
{ | ||
// Called as the scene transitions from the background to the foreground. | ||
// Use this method to undo the changes made on entering the background. | ||
} | ||
|
||
[Export ("sceneDidEnterBackground:")] | ||
public void DidEnterBackground (UIScene scene) | ||
{ | ||
// Called as the scene transitions from the foreground to the background. | ||
// Use this method to save data, release shared resources, and store enough scene-specific state information | ||
// to restore the scene back to its current state. | ||
} | ||
namespace MacCatalystApp1; | ||
|
||
[Register ("SceneDelegate")] | ||
public class SceneDelegate : UIResponder, IUIWindowSceneDelegate { | ||
|
||
[Export ("window")] | ||
public UIWindow? Window { get; set; } | ||
|
||
[Export ("scene:willConnectToSession:options:")] | ||
public void WillConnect (UIScene scene, UISceneSession session, UISceneConnectionOptions connectionOptions) | ||
{ | ||
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. | ||
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene. | ||
// This delegate does not imply the connecting scene or session are new (see UIApplicationDelegate `GetConfiguration` instead). | ||
} | ||
|
||
[Export ("sceneDidDisconnect:")] | ||
public void DidDisconnect (UIScene scene) | ||
{ | ||
// Called as the scene is being released by the system. | ||
// This occurs shortly after the scene enters the background, or when its session is discarded. | ||
// Release any resources associated with this scene that can be re-created the next time the scene connects. | ||
// The scene may re-connect later, as its session was not neccessarily discarded (see UIApplicationDelegate `DidDiscardSceneSessions` instead). | ||
} | ||
|
||
[Export ("sceneDidBecomeActive:")] | ||
public void DidBecomeActive (UIScene scene) | ||
{ | ||
// Called when the scene has moved from an inactive state to an active state. | ||
// Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. | ||
} | ||
|
||
[Export ("sceneWillResignActive:")] | ||
public void WillResignActive (UIScene scene) | ||
{ | ||
// Called when the scene will move from an active state to an inactive state. | ||
// This may occur due to temporary interruptions (ex. an incoming phone call). | ||
} | ||
|
||
[Export ("sceneWillEnterForeground:")] | ||
public void WillEnterForeground (UIScene scene) | ||
{ | ||
// Called as the scene transitions from the background to the foreground. | ||
// Use this method to undo the changes made on entering the background. | ||
} | ||
|
||
[Export ("sceneDidEnterBackground:")] | ||
public void DidEnterBackground (UIScene scene) | ||
{ | ||
// Called as the scene transitions from the foreground to the background. | ||
// Use this method to save data, release shared resources, and store enough scene-specific state information | ||
// to restore the scene back to its current state. | ||
} | ||
} | ||
|
23 changes: 10 additions & 13 deletions
23
dotnet/Templates/Microsoft.iOS.Templates/ios-controller/Controller1.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
using Foundation; | ||
using UIKit; | ||
namespace iOSApp1; | ||
|
||
namespace iOSApp1 { | ||
[Register ("Controller1")] | ||
public class Controller1 : UIViewController { | ||
public override void ViewDidLoad () | ||
{ | ||
View = new UIView { | ||
BackgroundColor = UIColor.Red, | ||
}; | ||
[Register ("Controller1")] | ||
public class Controller1 : UIViewController { | ||
public override void ViewDidLoad () | ||
{ | ||
View = new UIView { | ||
BackgroundColor = UIColor.Red, | ||
}; | ||
|
||
base.ViewDidLoad (); | ||
base.ViewDidLoad (); | ||
|
||
// Perform any additional setup after loading the view | ||
} | ||
// Perform any additional setup after loading the view | ||
} | ||
} |
Oops, something went wrong.