私はこれを使用しています: http://blog.leahculver.com/2010/12/iphone-pull-to-refresh.html私のアプリで機能を更新するためのプルを作成します。しかし、「プルダウンして更新...」、「リリースして更新...」、および「読み込み中...」というテキストが表示されません。
ファイルをプロジェクトにコピーし、QuartzCore フレームワークにリンクし、View Controller の .h ファイルを変更して、PullRefreshTableViewController のサブクラスにしただけです。次に、refresh メソッドを追加しました。
PullRefreshTableViewController の initWithStyle メソッドが実行されないようです。しかし、私は私のtableViewcellForRowAtIndexPathにあるはずです。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"CellIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
cell.textLabel.text = @"Text";
return cell; }
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; }
ログがコンソールに出力されることはありません
問題がどこにあるのか本当にわかりませんか?