當用cocoapod創建一個組件時,在加載xib或者nib的時候總是報“Could not load NIB in bundle: 'NSBundle、、、”錯誤
解決方法:
1、在AmafirePackage.podspec文件中配置 s.resource = 'Pod/Assets'
2,對于xib加載時注冊的時候要進行指向,如:
?let bundle = Bundle(identifier: "org.cocoapods.AmafirePackage") ? ?tableView.register(UINib(nibName: "normalViewCell", bundle: nil), forCellReuseIdentifier: cellID)