У меня была эта проблема, и она была решена путем изменения функции, содержащей параметр inout
, значением по умолчанию. Функция, которая сообщала мне об ошибке, была первой в моем приложении, где она была вызвана.
Старый:
/// Creates a new Icon button with the specified tint color, image and pulse animation
convenience init(withTintColor tint: inout BehaviorRelay<UIColor> = UIColor.navBarTintColor,
tintedImage: UIImage?,
pulseAnimation: PulseAnimation = .centerRadialBeyondBounds
) {
self.init(image: tintedImage?.withRenderingMode(.alwaysTemplate))
self.pulseAnimation = pulseAnimation
_ = (tint ?? UIColor.navBarTintColor).asObservable().subscribe(onNext: { [weak self] (newColor) in
self?.tintColor = newColor
self?.imageView?.tintColor = newColor
})
}
Новое:
/// Creates a new Icon button with the specified tint color, image and pulse animation
convenience init(tintedImage: UIImage?,
pulseAnimation: PulseAnimation = .centerRadialBeyondBounds
) {
self.init(image: tintedImage?.withRenderingMode(.alwaysTemplate))
self.pulseAnimation = pulseAnimation
_ = UIColor.navBarTintColor.asObservable().subscribe(onNext: { [weak self] (newColor) in
self?.tintColor = newColor
self?.imageView?.tintColor = newColor
})
}