swift - 如何将 ParseUI 添加到 swift 项目中

标签 swift parse-platform

我正在使用 Parse.com 构建一个应用程序。我添加了以下框架:

我复制过来了

Parse.framework
Bolts.framework

并在构建阶段添加了以下框架:

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 安装:

pod 'ParseUI'

然后我将以下内容添加到我的 View Controller

var logInController = PFLogInViewController()
logInController.delegate = self
self.presentViewController(logInController, animated:true, completion: nil)

但我收到以下错误:

Use of unresolved identifier "PFLoginViewController"

我哪里错了?我必须在桥接头中添加任何东西吗?我在 Xcode 中以及通过 pod 文件添加了框架。

当我添加#import <ParseUI/ParseUI.h> 时到桥接头我得到错误 Type 'MEssageCollectionViewController' does not conform to protocol 'PFLoginViewControllerDelegate'在线logInController.delegate = self

最佳答案

您需要将以下行添加到Bridging-Header.h

#import <ParseUI/ParseUI.h>

添加之后,您需要将以下委托(delegate)函数添加到您的类中。他们可以找到 here .

– logInViewController:shouldBeginLogInWithUsername:password:
– logInViewController:didLogInUser:
– logInViewController:didFailToLogInWithError:
– logInViewControllerDidCancelLogIn:

关于swift - 如何将 ParseUI 添加到 swift 项目中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27708057/

相关文章:

swift - Cell Tap 在 didSelectRowAtIndexPath 上不起作用

ios - 主线程正在执行长时间运行的 Parse 操作

swift - 惰性计算变量

Swift:将数据传递给捕获上下文的闭包

ios - 没有 AppDelegate 的 SwiftUI 远程推送通知(Firebase 云消息传递)

android - 如何从 Android 应用程序中删除解析用户?

ios - 更改 Anypic Assets

ios - 当前用户是否在不同的设备上登录

ios - Alamofire 构建失败 : issues in Manager. swift、Request.swift 和 ResponseSerialization.swift

ios - 大数组粘贴到 Xcode Playground ,项目停止运行