KMNavigationBarTransition icon indicating copy to clipboard operation
KMNavigationBarTransition copied to clipboard

ios11 bug

Open axmav opened this issue 6 years ago • 1 comments

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

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)
    }

}
import UIKit

class TestViewController: UIViewController, UITableViewDataSource {

    @IBOutlet weak var tableView: UITableView!
    override func viewDidLoad() {
        super.viewDidLoad()
        tableView.dataSource = self
        navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
        navigationController?.navigationBar.shadowImage = UIImage()
        
    }
    
    func numberOfSections(in tableView: UITableView) -> Int {
        return 1
    }
    
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 80
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        return tableView.dequeueReusableCell(withIdentifier: "basic", for: indexPath)
    }
    

}

First view controller is transparent? Why?

axmav avatar Nov 07 '17 07:11 axmav

Hi @Mazorati, I tried your code and it still looked normal, so could you give me the complete demo?

MoZhouqi avatar Feb 22 '18 07:02 MoZhouqi