我试图创建一个文件.swift来改变导航栏中的颜色但是当我试图在ViewController中导入File.swift时它会显示一个错误.
-------代码--------
//Esta clase se creo para dar color a la NavViewController por medio de su valor en RGB
import UIKit
class NavViewController: UINavigationController {
override func viewDidLoad() {
//Se divide el valor RGB entre 255.0
UINavigationBar.appearance().barTintColor = UIColor(red: 110/255.0, green: 192/255.0, blue: 238/255.0, alpha: 1.0)
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a …
Run Code Online (Sandbox Code Playgroud)