开发者

How can I add the load more button at bottom of the thumbnail view when I use Three20's TTThumbViewController?

I have u开发者_Python百科sed Three20 and created thumbnail photo view using TTThumbViewController. I have successfully displayed the images in thumbnail view. Now I want to add more images from the server,so I need a "load more " button at the bottom of the view ,or when the page scrolls to the bottom,it will load more images automaticly. Thank you very much!


Try this in your Photosource class

- (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];

}

Hope this Helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜