ios,swift2021. 3. 19. 15:06

[ios]could not load nib in bundle in framework 해결방법

 

framework 에 xib를 넣어서 외부에서 라이브러리 형식으로 가져다 쓸려고 했다..

 

외부 프로젝트에서 라이브러리를 import 한 후, framework안에 있는 xib를 로드 할려고 했더니..

 

could not load nib in bundle 이라고 나온다..

 

자 그러면 어떤 bundle에 있는 xib인지를 알려줘야 한다..

 

라이브프로젝트 bundle identifier 명을 쓰고 

 

 let bundleID = "bundle identifier"

 let bundle = Bundle.init(identifier: bundleID)

 

 self.Controller = Controller(nibName: "xib명", bundle: bundle)

 

이렇게 하면 push해서 들어갈 수 있다. 

Posted by thdeodls85