I was making the cancel button of the memo screen in my iOS memo application. But, when I clicked the cancel button, Thread 1: EXC_BREAKPOINT (code=1, subcode=0x18855e560)
error appeared. I used dismiss(animate: true, completion: nil)
code
ComposeViewController Code
import UIKit
class ComposeViewController: UIViewController {
@IBAction func close(_ sender: Any) {
dismiss(animated: true, completion: nil). //this code was problem
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
//something more that is comment code '//'
}