我手动将这个库导入到我的项目文件夹中
https://github.com/y-hryk/YSLTransitionAnimator
但问题是,一旦我将这个库导入到我的桥接 header 中
#import "YSLTransitionAnimator.h"
#import "UIViewController+YSLTransition.h"
我收到编译错误信息
/Users/jay/ios/TestProject/TestProject/ProfilePictureSetupViewController.swift:11:60: Redundant conformance of 'ProfilePictureSetupViewController' to protocol 'UINavigationControllerDelegate'
我知道这个 #import "UIViewController+YSLTransition.h"
是导致错误的原因,但我不知道为什么
有什么想法吗?
最佳答案
因为 UIViewController
类已使用 YSLTransition
进行了扩展。它也已经符合 UINavigationControllerDelegate
。因此,您无需在 ProfilePictureSetupViewController
View Controller 中再次符合 UINavigationControllerDelegate
(删除它将修复错误)
关于ios - 导入外部库后,具有 UINavigationControllerDelegate 的 ViewController 中出现冗余一致性错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33646501/