我一直在使用此:http://blog.leahculver.com/2010/12/iphone-pull-to-refresh.html使我的应用程序中的拉动刷新功能。 但我不能看到文本“下拉刷新...”,“释放刷新...”和“加载...”。在iPhone上拉到刷新不按预期方式工作
所有我所做的就是将文件复制到我的项目,对QuartzCore框架链接,并改变了我的视图控制器的.h文件所以它是PullRefreshTableViewController的子类。然后我添加了刷新方法。
看来,PullRefreshTableViewController中的initWithStyle方法永远不会被执行。 但我应该在我的tableViewcellForRowAtIndexPath。
从PullRefreshTableViewController.m的initWithStyle方法:
- (id)initWithStyle:(UITableViewStyle)style {
self = [super initWithStyle:style];
if (self != nil) {
textPull = [[NSString alloc] initWithString:@"Pull down to refresh..."];
textRelease = [[NSString alloc] initWithString:@"Release to refresh..."];
textLoading = [[NSString alloc] initWithString:@"Loading..."];
NSLog(@"in");
}
NSLog(@"out");
return self; }
日志从不打印到控制台上
我真的不能看到问题出在哪里?
在当前状态下回答这个问题是不可能的。例如,当您尝试执行构建时会发生什么?发生什么错误? – 2011-02-06 21:31:24