Skip to content

Commit

Permalink
Fix demo project styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Scalesse committed Jan 7, 2024
1 parent 83c7efc commit 459c307
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
19 changes: 17 additions & 2 deletions Example/CSAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,29 @@ @implementation CSAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

CSViewController *viewController = [[CSViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];
self.window.rootViewController = navigationController;
[self.window makeKeyAndVisible];
[[UINavigationBar appearance] setBarTintColor:[UIColor orangeColor]];
[[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];

[self setupAppearance];

return YES;
}

- (void)setupAppearance {
if (@available(iOS 13.0, *)) {
UINavigationBarAppearance *barAppearance = [[UINavigationBarAppearance alloc] init];
barAppearance.backgroundColor = [UIColor orangeColor];
barAppearance.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]};

[[UINavigationBar appearance] setStandardAppearance:barAppearance];
[[UINavigationBar appearance] setScrollEdgeAppearance:barAppearance];
} else {
[[UINavigationBar appearance] setBarTintColor:[UIColor orangeColor]];
[[UINavigationBar appearance] setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
}
}

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

0 comments on commit 459c307

Please sign in to comment.