Click here to Skip to main content
15,896,111 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys I'm searching since 1 week for parse . I really understand the most things . how to retrieve strings ,arrays ,file on tableViews and Cells etc. ...
Everywhere ( i really mean everywhere ) i could find for several tableviews ,collectionViews and other thing except for VİEWCONTROLLER

so to show how I understood things

Retrieving or showing a PFImageView we have to first connect to our .h file
so this is mine

Objective-C
@property (strong, nonatomic) IBOutlet PFImageView *BuyPetImage;


after that were going to our .m file and add these to our ViewDidLoad method


Objective-C
PFQuery *query = [PFQuery queryWithClassName:@"Recipe"];
//    [query orderByDescending:@"createdAt"];
    
    [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
        
        if (!error) {
            for (PFObject *object in objects) {
            
                
                PFFile *file = object[@"imageFile"];
                [file getDataInBackgroundWithBlock:^(NSData *data, NSError *error) {
                    if (!error) {
                        
                        
                        [BuyPetImage loadInBackground];
                        BuyPetImage.image = file; //may be this could be the wrong part ?

                        
                     
                    }} ];} } } ];


So my problem is: I don't have any error but it's not shown in my app when I run it.
Posted
Updated 2-Aug-15 1:19am
v2

i have changed it but i think it doesn't matter.

meanwhile i changed file instead of image ...
BuyPetImage.file = file; //set file
[BuyPetImage loadInBackground]


so i did this . but still empty picture


i get a ----Socket is not connected"
2015-08-02 19:33:19.175 RecipeBook[4991:245248] Failed download from S3. Going to try again. Response: (null), Error: Error Domain=NSPOSIXErrorDomain Code=57 "The operation couldn’t be completed. Socket is not connected"
2015-08-02 19:33:19.176 RecipeBook[4991:245248] Error: Download failed. ---- error what is this ?
 
Share this answer
 
You must rearrange your code. As the documentation says:
C++
BuyPetImage.image = file; //set file
[BuyPetImage loadInBackground];//start download

Didnt you read the docs of the classes you use :-O
 
Share this answer
 
Comments
Member 11868634 2-Aug-15 12:36pm    
i have changed it but i think it doesn't matter.

meanwhile i changed file instead of image ...
BuyPetImage.file = file; //set file
[BuyPetImage loadInBackground]


so i did this . but still empty picture


i get a ----Socket is not connected"
2015-08-02 19:33:19.175 RecipeBook[4991:245248] Failed download from S3. Going to try again. Response: (null), Error: Error Domain=NSPOSIXErrorDomain Code=57 "The operation couldn’t be completed. Socket is not connected"
2015-08-02 19:33:19.176 RecipeBook[4991:245248] Error: Download failed. ---- error what is this ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900