0
我使用了Three20並使用TTThumbViewController創建了縮略圖照片視圖。我已經成功在縮略圖視圖中顯示圖像。現在我想從服務器添加更多圖像,因此我需要在視圖底部添加「加載更多」按鈕,或者當頁面滾動到底部時,它會自動加載更多圖像。 非常感謝!當我使用Three20的TTThumbViewController時,如何在縮略圖視圖底部添加加載更多按鈕?
我使用了Three20並使用TTThumbViewController創建了縮略圖照片視圖。我已經成功在縮略圖視圖中顯示圖像。現在我想從服務器添加更多圖像,因此我需要在視圖底部添加「加載更多」按鈕,或者當頁面滾動到底部時,它會自動加載更多圖像。 非常感謝!當我使用Three20的TTThumbViewController時,如何在縮略圖視圖底部添加加載更多按鈕?
試試這個在您的光源類
- (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];
}
希望這有助於!