美文网首页
Could not load NIB in bundle: 'N

Could not load NIB in bundle: 'N

作者: 杏子_2fd0 | 来源:发表于2018-03-27 09:56 被阅读0次

当用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)

相关文章

网友评论

      本文标题:Could not load NIB in bundle: 'N

      本文链接:https://www.haomeiwen.com/subject/kgdjcftx.html