| Info | Value |
| --- | --- |
| Platform Name | e.g. ios |
| Platform Version | e.g. 10.0 |
| SDWebImage Version | not sure |
| Integration Method | manually |
| Xcode Version | e.g. Xcode 8.0 |
| Repro rate | e.g. all the time (100%) |
| Repro with our demo prj | e.g. does it happen with our demo project? |
| Demo project link | e.g. link to a demo project that highlights the issue |
For e.g. i used this method
NSURL* url1 = [NSURL URLWithString:[NSString stringWithFormat:@"%@",[[ArrObj objectAtIndex:indexPath.row]valueForKey:@"img"]]];
[cell.Feedimg sd_setImageWithURL:url1
placeholderImage:nil options:indexPath.row == 0 ? SDWebImageRefreshCached : 0];
can this be replicated in the demo project?
Your Sincerely,
_Prashant Patel_
iOS Developer
+91 97129 91261
On Mon, Oct 3, 2016 at 9:51 PM, Konstantinos K. [email protected]
wrote:
can this be replicated in the demo project?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rs/SDWebImage/issues/1688#issuecomment-251152413, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AQmQV1q1SA-7VKtwjLCib2CoV-y26OgVks5qwSuIgaJpZM4KMmKW
.
@psnt143 we cannot understand what you are saying.
hello,
when i run the app viewdidload are call and view are open but
images not load,but when i scroll all images load and show.
Your Sincerely,
_Prashant Patel_
iOS Developer
+91 97129 91261
On Tue, Oct 4, 2016 at 5:56 PM, Bogdan Poplauschi [email protected]
wrote:
@psnt143 https://github.com/psnt143 we cannot understand what you are
saying.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rs/SDWebImage/issues/1688#issuecomment-251373423, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AQmQVyy3WWURaA1ojcnVbI1LzbKf1P-Tks5qwkX8gaJpZM4KMmKW
.
i attach my source code in above mail please check them.
Your Sincerely,
_Prashant Patel_
iOS Developer
+91 97129 91261
On Tue, Oct 4, 2016 at 6:19 PM, prashant patel [email protected] wrote:
hello,
when i run the app viewdidload are call and view are open but
images not load,but when i scroll all images load and show.Your Sincerely,
_Prashant Patel_
iOS Developer
+91 97129 91261On Tue, Oct 4, 2016 at 5:56 PM, Bogdan Poplauschi <
[email protected]> wrote:@psnt143 https://github.com/psnt143 we cannot understand what you are
saying.—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rs/SDWebImage/issues/1688#issuecomment-251373423,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQmQVyy3WWURaA1ojcnVbI1LzbKf1P-Tks5qwkX8gaJpZM4KMmKW
.
I think I'm having a similar problem, but I'm not sure SDWebImage is the culprit.
I have a custom UITableViewCell subclass. In it I have a UIImageView which is embedded in a UIView that is used as a coloured background to the image.
When I attempt to configure the cell, either in cellForRowAtIndexPath: or in willDisplayCell: the initial size of the subviews is shown as 1000x1000. I try to set an image into the image view using [self.iconView sd_setImageWithURL:iconURL placeholderImage:placeholder]; I also set a background colour of the enclosing UIView.
The result is that the image does not get set and even the background colour of the UIView does not get set until the cells are dequeued a second time, either by scrolling or switching to a different view.
It seems like the cells are not ready to be configured. I bet it's a quirk of iOS 10, but man is it annoying.
Edit:
This Stack Overflow response seems to offer some insight.
http://stackoverflow.com/a/39643829/415219
If you are using clipsToBounds/maskToBounds then it doesn't seem to work properly.
Just call this method [self.iconView layoutIfNeeded] before make it circle.
thanks for your support.it's run well.
Your Sincerely,
_Prashant Patel_
iOS Developer
+91 97129 91261
On Wed, Oct 5, 2016 at 2:16 PM, codalamanp [email protected] wrote:
Just call this method [self.iconView layoutIfNeeded] before make it circle.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rs/SDWebImage/issues/1688#issuecomment-251617157, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AQmQV0yOXvTbQhcyswj5McRwAJ0esgX-ks5qw2PQgaJpZM4KMmKW
.
If you're going to add code that accesses the layers of the such as adding a corner radius you can add that code into the cell's -layoutSubviews method and everything should work.
It seems that accessing the layer, or at least settings masksToBound=YES from inside willDisplayCell: or cellForRowAtIndexPath: will cause the image view to not load properly on the first pass. Putting it in -layoutSubviews works.
I spent three days of development trying to figure out why my image was not setting after it loaded using the SDCompletionBlock. After tried and true testing - Calling a setNeedsLayout - layoutIfNeeded - even manually updating the ReusableHeaderView for my collectionView using a layout context; @tylerjames answer did the trick. Unsure if this is an xCode bug or if this is by design, but changing my sublayer work (cornerRadius - contentMode) from my cellForRow to layoutSubviews did the trick. Thanks for a helpful thread guys. PS. SDWebImg is a rockstar.
Most helpful comment
If you're going to add code that accesses the layers of the such as adding a corner radius you can add that code into the cell's
-layoutSubviewsmethod and everything should work.It seems that accessing the layer, or at least settings
masksToBound=YESfrom insidewillDisplayCell:orcellForRowAtIndexPath:will cause the image view to not load properly on the first pass. Putting it in-layoutSubviewsworks.