Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

设置contentMode 时 缩放图片的动画最后会闪烁一下 #49

Open
lin86370921 opened this issue Apr 14, 2017 · 6 comments
Open

Comments

@lin86370921
Copy link

lin86370921 commented Apr 14, 2017

我在你的Demo里设置了 contentMode 40行 动画最后会闪一下才变回原来的frame
请问有什么好的解决方案。

[photoItemArray enumerateObjectsUsingBlock:^(SDPhotoItem *obj, NSUInteger idx, BOOL *stop) {
    UIButton *btn = [[UIButton alloc] init];
    [btn sd_setImageWithURL:[NSURL URLWithString:obj.thumbnail_pic] forState:UIControlStateNormal];
    btn.imageView.contentMode = UIViewContentModeScaleAspectFill;
    
    btn.tag = idx;
    
    [btn addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:btn];
}];
@lin86370921
Copy link
Author

已解决

@ismilesky
Copy link

请问怎么回事,我用的是UICollectionView作为显示图片的容器,我也遇到了缩小回去的会闪一下

@ismilesky
Copy link

请问你是怎样解决的 @lin86370921

@Hank-Zhong
Copy link

说下怎么解决的啊。。。。

@lin86370921
Copy link
Author

主要是因为 contentMode 这个属性造成的 。

@guojingjingghost
Copy link

你说等于没说 既然是contentMode 造成的应该怎么改呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants