2016-10-06 1 views
0

세 개의 탭으로 앱을 만들려고합니다.탭을 변경할 때 웹보기에서 탭 응용 프로그램이 충돌합니까?

2016-10-06 23:17:54.565932 Techaway[6827:2354958] Unknown class ThirdViewController in Interface Builder file. 
2016-10-06 23:17:59.520639 Techaway[6827:2354958] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Techaway.SecondViewController 0x100f0bc20> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Home.' 

그것은의 경우 완벽하게 작동 : 나는 주먹 이외의 다른 탭 중 하나에 웹보기를 실행하려고하면 나는 ViewControllers 모든 설정과 작업을하지만,이 같은 메시지와 함께 충돌 그래도 첫 번째 ViewController, 나를 혼란스럽게합니다. SecondViewController의 코드의

예 :

import UIKit 

class SecondViewController: UIViewController { 

    var url = URL(string: "https://example.com/")! 

    @IBOutlet weak var webView: UIWebView! 

    @IBAction func home(_ sender: AnyObject) { 
     webView.loadRequest(URLRequest(url: url)) 


} 


override func viewDidLoad() { 
    super.viewDidLoad() 
    // Do any additional setup after loading the view, typically from a nib. 
    webView.loadRequest(URLRequest(url: url)) 
} 

override func didReceiveMemoryWarning() { 
    super.didReceiveMemoryWarning() 
    // Dispose of any resources that can be recreated. 
} 

}가 한 자리에 있지만 다른 작동 왜 그냥 이해가 안

!

답변

관련 문제