私のUIViewController
には、サブビューの1つとしてUITableView
があります。私はUITableViewController
を使用しています私のアプリで別の画面を持っており、そのUIRefreshControl
は私UITableView
のために加え1以上の方法より異なりますiOS - UITableViewのUIRefreshControl対UITableViewControllerのUIRefreshControl
// enable "pull to refresh"
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:@"Pull To Refresh!" attributes:@{NSForegroundColorAttributeName : [UIColor whiteColor], NSFontAttributeName : [UIFont systemFontOfSize:17]}];
[refreshControl addTarget:self action:@selector(fetchArticles) forControlEvents:UIControlEventValueChanged];
refreshControl.backgroundColor = [UIColor colorWithRed:0.0f/255.0f green:102.0f/255.0f blue:153.0f/255.0f alpha:1.0];
refreshControl.tintColor = [UIColor whiteColor];
self.refreshControl = refreshControl;
[self.tableView addSubview:self.refreshControl];
:私は、次のコードで私のUIRefreshControl
を追加します。
別のUITableView
のUIRefreshControl
は、ドラッグすると処理が遅くなります。通常、リフレッシュを開始するには、FARTHERをドラッグする必要があります。
私の他の画面のUITableViewController
のUIRefreshControl
は、ドラッグすると高速ですが、これまでにドラッグしてリフレッシュを開始する必要はありません。
私はUITableViewController
さんUIRefreshControl
のスムーズな動作を好むので、どのように私は私のための私のUITableView
UIRefreshControl
がよりUITableViewController
に属し、デフォルトの1のように動作するのですか?
これは可能ですか?または、UIContainerView
を使用し、UITableViewController
私の唯一のオプションを使用していますか?
リンクありがとうございます!私はちょっとハッキリした 'UITableViewController'インスタンスソリューションを使用することを躊躇しましたが、それは完全に機能しました! – Rafi