에러 : “View Controller“ is unreachable because it has no entry points...

1. 문제

강의 보면서 실습하다가 뷰 컨트롤러 하나만 남기고 지웠는데 갑자기 Xcode에 이러한 에러가 뜬다.

1

“View Controller“ is unreachable because it has no entry points, and no identifier for runtime access via -[UIStoryboard instantiateViewControllerWithIdentifier:].

2. 원인

이 오류는 스토리보드에서 해당 “View Controller"에 대한 엔트리포인트(진입점)을 내가 지정해 주지 않아서 그렇다.

3. 해결방법

2

View Controller를 클릭 > Attributes Inspector > Is Initial View Controller에 체크
하여 엔트리포인트를 추가해주자.
이렇게하면 뷰 컨트롤러에 엔트리포인트가 추가 된것도 확인이 가능하고 오류 메세지도 깔끔히 사라진다.
앱이 실행될때 이 ViewController가 처음에 실행 된다는 것! so easy~~