我的 CocoaPods 框架有问题。我尝试在我的项目中使用 SnapKit 附加依赖项,但在 Storyboard 中出现此错误:
.../SimpleAnimatedTabBar/Example/SimpleAnimatedTabBar/Base.lproj/Main.storyboard: error: IB Designables: Failed to render and update auto layout status for ViewController (vXZ-lx-hvc): Failed to load designables from path (null)
这个项目是简单的动画自定义标签栏,带有@IBDesginable 和 SnapKit 自动布局。
这是我的 Podfile:
use_frameworks!
platform :ios, '13.0'
target 'SimpleAnimatedTabBar_Example' do
pod 'SimpleAnimatedTabBar', :path => '../'
pod 'SnapKit', '~> 5.0.0'
target 'SimpleAnimatedTabBar_Tests' do
inherit! :search_paths
end
end
这是我的 .podspec:
Pod::Spec.new do |s|
s.name = 'SimpleAnimatedTabBar'
s.version = '0.1.2'
s.summary = 'My short description of SimpleAnimatedTabBar.'
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = 'My long long long description of SimpleAnimatedTabBar.'
s.homepage = 'https://github.com/michalnowak061/SimpleAnimatedTabBar'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'michalnowak061' => 'michal.nowak061@gmail.com' }
s.source = { :git => 'https://github.com/michalnowak061/SimpleAnimatedTabBar.git', :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.swift_version = '5.0'
s.ios.deployment_target = '13.0'
s.source_files = 'SimpleAnimatedTabBar/Classes/**/*'
# s.resource_bundles = {
# 'SimpleAnimatedTabBar' => ['SimpleAnimatedTabBar/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
s.frameworks = 'UIKit'
s.dependency 'SnapKit', '~> 5.0.0'
end