0

私は何を間違っていますか?

NSLogはスワイプのアクションを返しますが、画像は変わりません..私が知っていることはすべて試しました。助けてください?

私は Parse.com で作業しており、セルを DetailView Controller にセグエする PFQueryTableView を持っています。その詳細ビューには PFImageView があり、Parse Data Browser (同じクラス) から呼び出された別の画像にスワイプする必要があります。

これは私の.mコードです:

    #import "BellezaDetailViewController.h"
    #import "BellezaView.h"

    @interface BellezaDetailViewController ()

    @end

    @implementation BellezaDetailViewController

    @synthesize lookPhoto, bellezaView, activityIndicator;


    - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
    {
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
    // Custom initialization
}
return self;
    }

    - (void)handleSwipe:(UISwipeGestureRecognizer *)swipe {

if (swipe.direction == UISwipeGestureRecognizerDirectionLeft) {
    NSLog(@"Left Swipe");
}

if (swipe.direction == UISwipeGestureRecognizerDirectionRight) {
    NSLog(@"Right Swipe");
}

    }

    - (void)viewDidLoad
    {
[super viewDidLoad];{

    [activityIndicator startAnimating];

    [activityIndicator performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:10];

    NSLog(@"Downloading Look");

    self.lookPhoto.file = bellezaView.imagenDos;
    [lookPhoto loadInBackground];

    UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)];



    UISwipeGestureRecognizer *swipeRight = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipe:)];

    // Setting the swipe direction.
    [swipeLeft setDirection:UISwipeGestureRecognizerDirectionLeft];



    [swipeRight setDirection:UISwipeGestureRecognizerDirectionRight];

    // Adding the swipe gesture on image view
    [lookPhoto addGestureRecognizer:swipeLeft];


    [lookPhoto addGestureRecognizer:swipeRight];

}

    }


    - (void)swipeRecognized:(UISwipeGestureRecognizer *)swipe{

if(swipe.direction == UISwipeGestureRecognizerDirectionLeft){
    self.lookPhoto.file = bellezaView.imagenTienda;
    [lookPhoto loadInBackground];
}

if(swipe.direction == UISwipeGestureRecognizerDirectionRight){
    self.lookPhoto.file = bellezaView.imagenTienda;
    [lookPhoto loadInBackground];
}

            }

    - (void)viewDidUnload {

[self setLookPhoto:nil];

[super viewDidUnload];

    }


    - (void)didReceiveMemoryWarning
    {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
    }

    @end
4

1 に答える 1