如何将 ParseUI 添加到 swift 项目

编程入门 行业动态 更新时间:2024-10-25 00:28:38
本文介绍了如何将 ParseUI 添加到 swift 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用 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 项目

本文发布于:2023-11-26 03:15:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1632410.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何将   项目   ParseUI   swift

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!