我正在使用 Parse 构建应用程序.我添加了以下框架:
I'm building an app with Parse. I added the following frameworks:
我复制了
Parse.framework Bolts.framework并在构建阶段添加了以下框架:
and added the following frameworks in Build phases:
audiotoolbox.framework cfnetwork.framework coregraphics.framework corelocation.framework libz.dylib mobilecoreservices.framework quartzcore.framework security.framework storekit.framework systemconfiguration.framework libsqlite3.dylib在我的桥接标题中
#import <Parse/Parse.h>该应用程序正在运行,但现在我想使用 ParseUI,因此我将以下内容添加到我的 podfile 并进行了 pod 安装:
The app is working but now I want to use ParseUI so I added the following to my podfile and did a pod install:
pod 'ParseUI'然后我将以下内容添加到我的视图控制器
I then added the following to my view controller
var logInController = PFLogInViewController() logInController.delegate = self self.presentViewController(logInController, animated:true, completion: nil)但我收到以下错误:
Use of unresolved identifier "PFLoginViewController"我哪里出错了?我必须在桥接头中添加任何内容吗?我在 Xcode 中以及通过 pod 文件添加了框架.
Where am I going wrong? Must I add anything to the bridging header? I have the frameworks added in Xcode as well as through the pod file.
当我将 #import <ParseUI/ParseUI.h> 添加到桥接头时,我收到错误类型'MEssageCollectionViewController'不符合协议'PFLoginViewControllerDelegate' logInController.delegate = self
When I add #import <ParseUI/ParseUI.h> to the bridging header I get the error Type 'MEssageCollectionViewController' does not conform to protocol 'PFLoginViewControllerDelegate' on the line logInController.delegate = self
推荐答案你需要在Bridging-Header.h
#import <ParseUI/ParseUI.h>添加后,您需要将以下委托函数添加到您的类中.可以在此处找到它们.
After you add that, you'll need to add the following delegate functions to your class. They can be found here.
– logInViewController:shouldBeginLogInWithUsername:password: – logInViewController:didLogInUser: – logInViewController:didFailToLogInWithError: – logInViewControllerDidCancelLogIn:更多推荐
如何将 ParseUI 添加到 swift 项目
发布评论