我使用了Three20并使用TTThumbViewController创建了缩略图照片视图。我已在缩略图视图中成功显示图像。现在我想从服务器添加更多图像,所以我需要在视图底部“加载更多”按钮,或者当页面滚动到底部时,它将自动加载更多图像。 非常感谢你!
答案 0 :(得分:0)
在你的Photosource类中试试这个
- (void)load:(TTURLRequestCachePolicy)cachePolicy more:(BOOL)more {
if (more) {
page++;
}
//http://www.theblacksheeponline.com/partypics.php?page=2
NSString *Page = [NSString stringWithFormat:@"%lu", (unsigned long)page];
NSString *url = [@"http:/.......pics.php?page=" stringByAppendingString:Page];
NSLog(@"ALPhotoSource url: %@", url);
TTURLRequest* request = [TTURLRequest requestWithURL:url delegate:self];
request.cachePolicy = cachePolicy;
// sets the response
request.response = responseProcessor;
request.httpMethod = @"GET";
// Dispatch the request.
[request send];
}
希望这有帮助!