質問

I had a view load with an image that was perfectly clear, and upon calling and action would blur the image and display some text. However, in my process of making all the information being called from the cloud, the image blur seems to not work now. The original code that worked looked like this:

- (void)viewDidLoad {
    [super viewDidLoad];
    source=[UIImage imageNamed:@"testIma.jpg"];
    imgView=source;
}
-(IBAction)Less:(id)sender{
    imgView.image=[source stackBlur:40];
}

and now I have it set up like so and it fails to work:

    - (IBAction) Less:(UISlider *)sender
{
    NSLog(@"Slider:");
    __block UIImage *MyPicture = [[UIImage alloc]init];
    PFFile *imageFile = [object objectForKey:@"test"];
    [imageFile getDataInBackgroundWithBlock:^(NSData *data, NSError *error){
        if (!error) {
            MyPicture = [UIImage imageWithData:data];
            imgView.image = [MyPicture stackBlur:40];
        }
    }];

Does anyone notice anything wrong? I cannot seem to figure out why it does not blur anymore.

正しい解決策はありません

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top