From 2ac946b259ad429e1fbe037a90bb4a7f60e92eb6 Mon Sep 17 00:00:00 2001 From: Abhilash Pallerlamudi Date: Sun, 7 Nov 2021 23:11:37 -0800 Subject: [PATCH] Use system default colors --- BusinessCardScanner/AppDelegate.m | 1 - .../Base.lproj/Main.storyboard | 69 +++++++++++++------ BusinessCardScanner/FAQTableViewController.m | 1 - .../SettingsTableViewController.m | 2 - BusinessCardScanner/ViewController.m | 13 ---- 5 files changed, 48 insertions(+), 38 deletions(-) diff --git a/BusinessCardScanner/AppDelegate.m b/BusinessCardScanner/AppDelegate.m index 887e71e..2675f3c 100644 --- a/BusinessCardScanner/AppDelegate.m +++ b/BusinessCardScanner/AppDelegate.m @@ -15,7 +15,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( // Override point for customization after application launch. self.settingsModel = [[TesseractSettingsModel alloc]init]; self.contactDataStorage = [[NSMutableArray alloc]init]; - self.window.tintColor = [UIColor colorWithRed:51/255.0f green:51/255.0f blue:51/255.0f alpha:1.0]; return YES; } diff --git a/BusinessCardScanner/Base.lproj/Main.storyboard b/BusinessCardScanner/Base.lproj/Main.storyboard index 146a85f..35e92c2 100644 --- a/BusinessCardScanner/Base.lproj/Main.storyboard +++ b/BusinessCardScanner/Base.lproj/Main.storyboard @@ -1,12 +1,13 @@ - + + - + @@ -20,6 +21,7 @@ + @@ -77,22 +79,19 @@ - - - + - - - + + @@ -104,7 +103,7 @@ - + @@ -117,34 +116,61 @@ - + + + + - + + + + - + + + + @@ -157,7 +183,6 @@ - @@ -166,7 +191,7 @@ - + @@ -182,13 +207,12 @@ - + - @@ -227,7 +251,7 @@ - + @@ -245,7 +269,7 @@ - + @@ -264,20 +288,23 @@ - + - - + + + + + diff --git a/BusinessCardScanner/FAQTableViewController.m b/BusinessCardScanner/FAQTableViewController.m index 9ae69e9..162b481 100644 --- a/BusinessCardScanner/FAQTableViewController.m +++ b/BusinessCardScanner/FAQTableViewController.m @@ -25,7 +25,6 @@ - (id)initWithStyle:(UITableViewStyle)style - (void)viewWillAppear:(BOOL)animated { - self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:51/255.0f green:51/255.0f blue:51/255.0f alpha:1.0]; } diff --git a/BusinessCardScanner/SettingsTableViewController.m b/BusinessCardScanner/SettingsTableViewController.m index 3e9ff6d..6baae29 100644 --- a/BusinessCardScanner/SettingsTableViewController.m +++ b/BusinessCardScanner/SettingsTableViewController.m @@ -26,7 +26,6 @@ - (id)initWithStyle:(UITableViewStyle)style - (void)viewWillAppear:(BOOL)animated { self.navigationItem.title = @"Settings"; - self.tableView.backgroundColor = [UIColor colorWithRed:255/255.0f green:219/255.0f blue:76/255.0f alpha:1.0]; } - (void)viewDidLoad @@ -89,7 +88,6 @@ - (void)showEmail [mc setSubject:emailTitle]; [mc setMessageBody:messageBody isHTML:NO]; [mc setToRecipients:toRecipents]; - mc.navigationBar.tintColor = [UIColor colorWithRed:51/255.0f green:51/255.0f blue:51/255.0f alpha:1.0]; // Present mail view controller on screen [self presentViewController:mc animated:YES completion:NULL]; diff --git a/BusinessCardScanner/ViewController.m b/BusinessCardScanner/ViewController.m index 049ac10..71bad31 100644 --- a/BusinessCardScanner/ViewController.m +++ b/BusinessCardScanner/ViewController.m @@ -36,15 +36,6 @@ -(void)viewWillDisappear:(BOOL)animated } - (void)viewWillAppear:(BOOL)animated { -// self.navigationItem.leftBarButtonItem.title = @"\u2699"; -// UIFont *customFont = [UIFont fontWithName:@"Helvetica" size:24.0]; -// NSDictionary *fontDictionary = @{NSFontAttributeName : customFont}; -// [self.navigationItem.leftBarButtonItem setTitleTextAttributes:fontDictionary forState:UIControlStateNormal]; - - //self.navigationController.navigationBar.backgroundColor = [UIColor darkTextColor]; - //self.view.backgroundColor = [UIColor colorWithRed:128/255.0f green:128/255.0f blue:128/255.0f alpha:1.0]; - //self.view.backgroundColor = [UIColor colorWithRed:255/255.0f green:219/255.0f blue:76/255.0f alpha:1.0]; - self.collectionView.backgroundColor = [UIColor colorWithRed:255/255.0f green:219/255.0f blue:76/255.0f alpha:1.0]; _assets = [@[] mutableCopy]; __block NSMutableArray *tmpAssets = [@[] mutableCopy]; // 1 @@ -121,7 +112,6 @@ - (UICollectionViewCell *) collectionView:(UICollectionView *)collectionView cel ALAsset *asset = self.assets[indexPath.row]; cell.asset = asset; - cell.backgroundColor = [UIColor colorWithRed:255/255.0f green:219/255.0f blue:76/255.0f alpha:1.0]; // self.assetCount = self.assets.count; [self viewAppeared]; return cell; @@ -178,7 +168,6 @@ - (IBAction)accessPhotos:(id)sender { if([CustomImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) { - self.customVC.navigationBar.tintColor = [UIColor colorWithRed:51/255.0f green:51/255.0f blue:51/255.0f alpha:1.0]; [self presentViewController:self.customVC animated:YES completion:nil]; } @@ -206,7 +195,6 @@ - (IBAction)openCamera:(id)sender { initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGTH)]; //set our custom overlay view self.customVC.cameraOverlayView = overlay; - self.customVC.navigationBar.tintColor = [UIColor colorWithRed:51/255.0f green:51/255.0f blue:51/255.0f alpha:1.0]; [self presentViewController:self.customVC animated:YES completion:nil]; } } @@ -277,7 +265,6 @@ - (IBAction)openCamera:(id)sender { //} @synthesize library = _library; - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { - self.customVC.activityIndicator.color = [UIColor colorWithRed:255/255.0f green:0/255.0f blue:0/255.0f alpha:1.0]; [self.customVC.activityIndicator startAnimating]; [self.customVC.view addSubview:self.customVC.activityIndicator]; UIImage *chosenImage = info[UIImagePickerControllerEditedImage];