0

I need to create transparent navigation bar like here transparent navigation bar ios .

if (@available(iOS 11.0, *)) {
    self.navigationItem.largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever;
    self.navigationItem.searchController = self.searchController;
} else {
    self.tableView.tableHeaderView = self.searchController.searchBar;
}

UIImage *emptyImg = [[UIImage alloc] init];
[self.navigationBar setBackgroundImage:emptyImg
                             forBarMetrics:UIBarMetricsDefault];

And I have a problem because NavBar with refresh control and empty image has background hole and looks like:

enter image description here

Without empty image NavBar looks normal:

enter image description here

How can I fix this problem or maybe there is another way to make transparent NavBar ?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Valeri
  • 1

0 Answers0