A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically.
Hello!
I want to have dark background color on first table view controller and transparent background on second view controller. The result is following:
import UIKit
class TVCTableViewController: UITableViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
let image = UIImage(color: .rktDark)
navigationController?.navigationBar.barTintColor = .rktDark
navigationController?.navigationBar.setBackgroundImage(image, for: .default)
title = "TableViewController"
}
// MARK: - Table view data source
override func numberOfSections(in tableView: UITableView) -> Int {
// #warning Incomplete implementation, return the number of sections
return 1
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return 20
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
return cell
}
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
performSegue(withIdentifier: "ttt", sender: self)
}
}
Hello! I want to have dark background color on first table view controller and transparent background on second view controller. The result is following:![ezgif com-video-to-gif 1](https://user-images.githubusercontent.com/3396425/32482228-c4b6b9d0-c3a7-11e7-84aa-0e21cb7c5f6a.gif)
First view controller is transparent? Why?