带有iOS App和Objective-C代码的Parse.com [英] Parse.com with iOS App and Objective-C code

查看:82
本文介绍了带有iOS App和Objective-C代码的Parse.com的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到最近,我一直使用Parse.com来管理我的应用程序的数据,而我现在正在处理一个新项目,但是我遇到了一些问题....

until recently, I've always used Parse.com for data management of my app I was now working on a new project and I have some problems ....

P.S.我正在使用Xcode 6

P.S. I'm using Xcode 6

首先出现 PFImageView ,您可以确认吗?在不咨询PFImageView的情况下,如何在我的应用程序中绘制图片?我不明白为什么您不能在我的应用程序PFImageView中使用

First there PFImageView, you can confirm this? at this point without consulting a PFImageView how can I draw a picture in my app? I do not understand why you can not use in my app PFImageView

另外,当我执行查询时,以前(使用键盘上的Enter按钮)出现了查询的自动构建块,但现在我发现了这个

Also when I do a query, previously (using the enter button on the keyboard) appeared the auto-build block of the query but now I find myself this

  PFQuery *query = [PFUser query];
  [query findObjectsInBackgroundWithBlock: (nullable PFArrayResultBlock (nullable) block]

parse.com发生了什么事?我在哪里做错了?有人可以给我帮助吗?

What is happening to parse.com? where am I doing wrong? someone can 'give me help on this?

推荐答案

为什么不使用PFFile?

Why don't use PFFile instead?

要从数据加载图像,您可以执行以下操作:

For loading an image from data you can do like this:

    PFFile *fileImage = your_file;
    [fileImage getDataInBackgroundWithBlock:^(NSData *imageData, NSError *error) {
       UIImage *image = [UIImage imageWithData:imageData];
       yourImageView.image = image;
    }];

对于PFQuery,用以下代码块替换该方法:

And for the PFQuery replace that method with this block:

 [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { }}]; 

或在此处

这篇关于带有iOS App和Objective-C代码的Parse.com的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆