使用 Thre20 PhotoBrowser 从网络加载图像
我在使用 Three20 库的 PhotoBrowser 时遇到了一个奇怪的问题。我正在使用此代码从网络加载图像:
self.photoSource = [[PhotoSource alloc]
initWithType:PhotoSourceNormal
title:@"JamesD Flyer"
photos:[[NSArray alloc] initWithObjects:
[[[Photo alloc] initWithURL:@"http://farm4.static.flickr.com/3444/3223645618_13fe36887a_o.jpg" smallURL:nil
size:CGSizeMake(320, 480)] autorelease],
[[[Photo alloc] initWithURL:@"http://www.james-dean.at/mainpage/flyer/2.jpg"
smallURL:nil
size:CGSizeMake(409, 591)] autorelease],
[[[Photo alloc] initWithURL:@"http://www.james-dean.at/mainpage/flyer/1.jpg"
smallURL:nil
size:CGSizeMake(409, 591)] autorelease],nil] photos2:nil];
图像 1 和 3 加载时没有任何问题,但 2 则不然,我不知道为什么。它具有相同的尺寸和分辨率,但仍然无法加载。 有什么方法可以跟踪 iPhone 从网络加载的内容吗?
I'm having a strange problem with the PhotoBrowser of the Three20 library. I'm using this code to load images from the web:
self.photoSource = [[PhotoSource alloc]
initWithType:PhotoSourceNormal
title:@"JamesD Flyer"
photos:[[NSArray alloc] initWithObjects:
[[[Photo alloc] initWithURL:@"http://farm4.static.flickr.com/3444/3223645618_13fe36887a_o.jpg" smallURL:nil
size:CGSizeMake(320, 480)] autorelease],
[[[Photo alloc] initWithURL:@"http://www.james-dean.at/mainpage/flyer/2.jpg"
smallURL:nil
size:CGSizeMake(409, 591)] autorelease],
[[[Photo alloc] initWithURL:@"http://www.james-dean.at/mainpage/flyer/1.jpg"
smallURL:nil
size:CGSizeMake(409, 591)] autorelease],nil] photos2:nil];
The images 1 and 3 are being loaded without any problems but 2 isn't and I don't know why. It has the same dimension and resolution but still it's not loading.
Is there any way to trace what the iPhone is loading from the web?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将开始在
TTPhotoViewController
loadImages
选择器中设置断点。每张照片都与一个
TTPhotoView
关联,而loadImages
负责创建所有这些视图。从那里,你可能会明白正在发生的事情......
I would start setting a breakpoint in
TTPhotoViewController
loadImages
selector.Each photo is associated to a
TTPhotoView
andloadImages
is responsible to create all those views.From there, you could probably make your mind as to what is happening...