1

連絡先が選択されたときに、検索バーのオレンジ色とバーの色合いを白に変更しようとしています。

私が何をしようとしても、何も変わらず、このように動かなくなります(戻るボタンは白ではありません)。

AppDelegate で:

[[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearanceWhenContainedIn:[UINavigationController class], nil] setBarTintColor:OrangeOfficialColor];

[[UINavigationBar appearance] setBarTintColor:OrangeOfficialColor];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];

ビューをポップするとき:

ABPeoplePickerNavigationController *contactsPicker = [[ABPeoplePickerNavigationController alloc] init];
    contactsPicker.peoplePickerDelegate = self;
    contactsPicker.displayedProperties = @[[NSNumber numberWithInt:kABPersonPhoneProperty]];

    [contactsPicker.searchDisplayController.searchBar setBarTintColor:OrangeOfficialColor];
    [contactsPicker.searchDisplayController.searchBar setTintColor:[UIColor whiteColor]];

    [self presentViewController:contactsPicker animated:YES completion:nil];
  1. ビューは問題ありません: ここに画像の説明を入力

  2. ビューが正しくありません: ここに画像の説明を入力

  3. ビューが正しくありません: ここに画像の説明を入力

4

1 に答える 1