Skip to main content
Question

How to change iOS PaywallViewController NavigationBar Color & close Button Color

  • November 15, 2024
  • 1 reply
  • 22 views

Forum|alt.badge.img+2
  • New Member
  • 1 reply

Hi
I’m using latest Revenucat iOS SDK v5.7.1 & presenting full PaywallViewController screen using below code

let controller = PaywallViewController(displayCloseButton: true)
controller.delegate = self
controller.modalPresentationStyle = .fullScreen
self.present(controller, animated: true, completion: nil)

On implementing above code, Paywall screen shows NavigationBar with white background color, also it shows close (X) button in black color on top right corner on white background navigation bar.
Question is
1. How can I change white navigation bar color to clearColor &
2. How can I change close(x) button color to white color ?

This post has been closed for comments

1 reply

wes_clark
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • 262 replies
  • November 25, 2024

Hi! I apologize for the delay. You can change the close button color in the Paywall configuration page on the Dashboard. 

For changing the navigation bar to clear, we have had other developers do so by presenting the paywall manually with UIKit

You can then use code like this:

UINavigationBar.appearance(whenContainedInInstancesOf:[PaywallViewController.self]).backgroundColor = .clear


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings