title: Changing back color of UIPageViewController Swift5
body: <p>is there a way to change the color on the image white to blue?
  <a href="https://i.stack.imgur.com/g6O4u.png" rel="nofollow noreferrer">Page Curl Picture</a></p>
  <p>I could set the background color to blue, but I could not figure out how to change the color of the back.
  I could not find any articles either.
  If you know how to solve this problem, please let me know.</p>
  <p>My code is below.</p>
  <p>Thank you.</p>
  <pre><code>import UIKit
  
  class ViewController: UIViewController {
      
      //MARK: - Properties
      var pageViewController:UIPageViewController!
      var viewControllersArray:Array&lt;UIViewController&gt; = []
  
      //MARK: - Lifecycle
      override func viewDidLoad() {
          super.viewDidLoad()
                  
          let texts = [&quot;aaa&quot;, &quot;bbb&quot;, &quot;ccc&quot;]
          
          for text in texts {
              configureViewController(withText: text)
          }
          configurePageViwControllers()
      }
      
      //MARK: - Helpers
      func configureViewController(withText text: String) {
          let viewController = UIViewController()
          viewController.view.backgroundColor = .blue
          
          let label: UILabel = {
              let label = UILabel()
              label.text = text
              label.font = UIFont.boldSystemFont(ofSize: 20)
              label.textColor = .white
              return label
          }()
          
          viewController.view.addSubview(label)
          label.anchor(top: viewController.view.safeAreaLayoutGuide.topAnchor, left: viewController.view.leftAnchor)
          
          viewControllersArray.append(viewController)
      }
      
      func configurePageViwControllers() {
          pageViewController = UIPageViewController(transitionStyle: .pageCurl,
                                                    navigationOrientation: .horizontal,
                                                    options: nil)
          pageViewController.dataSource = self
          pageViewController.delegate = self
          
          pageViewController.setViewControllers([viewControllersArray[0]], direction: .forward, animated: true, completion: nil)
          pageViewController.view.frame = self.view.frame
          self.view.addSubview(pageViewController.view)
      }
  }
  
  
  //MARK: - UIPageViewControllerDataSource
  extension ViewController: UIPageViewControllerDataSource{
          
      func pageViewController(_ pageViewController: UIPageViewController, viewControllerAfter viewController: UIViewController) -&gt; UIViewController? {
          guard let index = viewControllersArray.firstIndex(of: viewController), index &lt; (viewControllersArray.count - 1) else{return nil}
          let after = index + 1
          return viewControllersArray[after]
  
      }
      
      func pageViewController(_ pageViewController: UIPageViewController, viewControllerBefore viewController: UIViewController) -&gt; UIViewController? {
          guard let index = viewControllersArray.firstIndex(of: viewController), index &gt; 0 else{return nil}
          let before = index - 1
          return viewControllersArray[before]
      }
  }
  
  //MARK: - UIPageViewControllerDelegate
  extension ViewController: UIPageViewControllerDelegate {
      
  }
  
  </code></pre>