Skip to content

Commit

Permalink
Update code-behind templates to correctly support Dark Mode, bind tex…
Browse files Browse the repository at this point in the history
…t to the center of the screen (#14367)
  • Loading branch information
drasticactions authored Mar 11, 2022
1 parent 9c4c321 commit d61f187
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public override bool FinishedLaunching (UIApplication application, NSDictionary
// 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!"
Text = "Hello, Catalyst!",
AutoresizingMask = UIViewAutoresizing.All,
});
Window.RootViewController = vc;

Expand Down
4 changes: 2 additions & 2 deletions dotnet/Templates/Microsoft.iOS.Templates/ios/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ public override bool FinishedLaunching (UIApplication application, NSDictionary
// 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, iOS!"
Text = "Hello, iOS!",
AutoresizingMask = UIViewAutoresizing.All,
});
Window.RootViewController = vc;

Expand Down

0 comments on commit d61f187

Please sign in to comment.