Issue:
I am wondering what does '!' (exclamation mark), next to the name of the file mean in Xcode. I know that it is meant to tell you that a file is "Missing", but I couldn't find any online explanation. And I also need a way to fix it. I can edit the code inside of the so-called "Missing" file. When I run it into the simulator everything works completely fine, no error and not even a warning.
Technical Data:
I am running Xcode 8 with Swift 3.
What I have tried so far:
- I tried re-opening Xcode --> didn't work
- I tried solving it with source-control --> nothing happened
- I searched for it inside my trash --> no file inside the trash with the same name
- I have checked the connections --> everything is fine
Images:
1. The file inside my editor:
2. Simulator:
Code:
import Foundation
import UIKit
class Documentation: UIViewController {
@IBOutlet weak var Basics: UIButton!
let defaults = UserDefaults.standard
override func viewDidLoad() {
super.viewDidLoad()
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
let menuButton = UIBarButtonItem(barButtonSystemItem: .organize, target: self.revealViewController(), action: #selector(SWRevealViewController.revealToggle(_:)))
menuButton.tintColor = UIColor.white
self.navigationItem.leftBarButtonItem = menuButton
self.customizeButton(button: Basics, angle: 50, borderWidth: 2, borderColor: #colorLiteral(red: 0.0693108514, green: 0, blue: 0.2353696823, alpha: 1))
}
@IBAction func BasicsAction(_ sender: UIButton) {
}
func customizeButton(button: UIButton, angle: Int, borderWidth: Int, borderColor: UIColor){
button.layer.cornerRadius = CGFloat(angle)
button.layer.borderWidth = CGFloat(borderWidth)
button.layer.borderColor = borderColor.cgColor
let completionLabel = button.viewWithTag(1) as! UILabel!
completionLabel?.text = "0/10"
if defaults.value(forKey: "\(button.currentTitle)") != nil{
let done = defaults.value(forKey: "\(button.currentTitle)") as! Int
completionLabel?.text = "\(done)/10"
if done == 10{
button.layer.borderColor = #colorLiteral(red: 0.2193539292, green: 0.4209204912, blue: 0.1073316187, alpha: 1).cgColor
button.layer.borderWidth = 5
}
}
}
}
Any help is greatly appreciated if it comes with a good explanation!