iPhone dev./에러 처리하기
A view can only be associated with at most one view controller at a time...
홍진표
2012. 11. 15. 09:30
발생 에러: A view can only be associated with at most one view controller at a time...
해결방법:
Xcode 4.2(4.3?) 부터는 interface builder의 xib 안에서 view들이 아닌 view controller를 추가하면 위와 같은 에러가 난다.
stackoverflow에서 찾은 해결법:
This happened to me already twice in the newest Xcode release. In both cases I needed to make changes to the UIViewController's XIB file (In you case it would be MapViewController.xib:
BEFORE:

- Move main View out of View Controller's children:
- Remove View Controller from the XIB (it is not necessary since File's Owner should be of its Class already):
AFTER:

위와 같이 하면 오류가 사라진다. (나 같은 경우는 단순히 view controller만 제거하니 에러가 사라짐)