开发者

iPhone-Development - EXC_BAD_ACCESS after UIView beginAnimations -> didStopSelector

开发者 https://www.devze.com 2023-04-10 09:32 出处:网络
[UIView beginAnimations:nil context:nil]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(scrollViewScrolled)];
[UIView beginAnimations:nil context:nil];

[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(scrollViewScrolled)];

[scrollView setContentOffset:scrollToPosition];

[UIView commitAnimations];

//////////////////////////

- (void)scrollViewScrolled {
    [self putScreenShotToScrollView];
    [self loadImageStack];
}

//////////////////////////

- (void)putScreenShotToScrollView {
    UIImageView *scrollViewScr开发者_运维技巧eenShotView;

    float scrollViewScreenShotPositionX;
    float scrollViewScreenShotPositionY;
    CGRect scrollViewScreenShotFrame;

    scrollViewScreenShotView = [[UIImageView alloc] initWithImage:usedImageStack.screenShot];
    // So, always when the app try to access the usedImageStack.screenShot the exception EXC_BAD_ACCES determines the app
    // usedImageStack and the property screenShot have an address, so not 0x0
}

Do you know what's the problem?

Thanks!

0

精彩评论

暂无评论...
验证码 换一张
取 消