uirefreshcontrol

UIRefreshControl not showing spiny when calling beginRefreshing and contentOffset is 0 [duplicate]

怎甘沉沦 提交于 2019-11-30 18:08:28
This question already has an answer here: UIRefreshControl - beginRefreshing not working when UITableViewController is inside UINavigationController 14 answers I am not able to see the loading spinner when calling beginRefreshing [self.refreshControl beginRefreshing]; My UITableViewController subclass uses a UIRefreshControl // refresh UIRefreshControl * refreshControl = [UIRefreshControl new]; [refreshControl addTarget:self action:@selector(refreshTableView) forControlEvents:UIControlEventValueChanged]; self.refreshControl = refreshControl; It is working perfectly with user interaction (when

Offsetting UIRefreshControl

狂风中的少年 提交于 2019-11-30 11:52:28
问题 I am currently using a JASidePanel for my application and I have a UITableViewcontroller with a UIRefreshControl as one of the ViewControllers for it. The width of my tableview still has a width of 320 pixels so the UIRefreshControl gets centered right in the middle of the view. I'm trying to figure out if there's a way to offset the UIRefreshControl (moving the x by 20 pixels to the left) so that it looks centered when I have my side panel visible. Thanks! 回答1: You need to set the frame of

UIRefreshControl in Landscape

僤鯓⒐⒋嵵緔 提交于 2019-11-30 08:02:13
问题 I've got a UIRefreshControl at the top of my table. The screen is in landscape. The trouble is, I can't pull down far enough in order to trigger the refresh, because there is too little space in Landscape. Is there a way to adjust the amount you have to pull down? 回答1: Remember that your tableview is just a subclass of UIScrollView. In your controller, implement scrollViewDidScroll method and call -beginRefreshing on your UIRefreshControl like below. But the animation of the UIRefreshControl

iOS 10.0 UIRefreshControl not showing indicator

时光怂恿深爱的人放手 提交于 2019-11-30 04:49:41
I am using a UITableView Which has a Pull down to refresh function but the spinner for pull down to refresh is not showing up when I call the [self.refreshControl beginRefreshing] The above code is called inside the viewDidLoad cause the table is loading some data initially. The spinner works fine if I perform a pull down to refresh after the initial refresh. The title shows up but not the spinner. Cant seem to solve this problem. It works fine on iOS 9.3.2 but not on iOS 10. Here is the code I am using currently. - (void)viewDidLoad { [super viewDidLoad]; [self setupView]; [self customSetup];

Offsetting UIRefreshControl

无人久伴 提交于 2019-11-30 03:02:44
I am currently using a JASidePanel for my application and I have a UITableViewcontroller with a UIRefreshControl as one of the ViewControllers for it. The width of my tableview still has a width of 320 pixels so the UIRefreshControl gets centered right in the middle of the view. I'm trying to figure out if there's a way to offset the UIRefreshControl (moving the x by 20 pixels to the left) so that it looks centered when I have my side panel visible. Thanks! Warewolf You need to set the frame of the UIRefreshControl . Use this code UIRefreshControl *refContr=[[UIRefreshControl alloc]

Binding to a UIRefreshControl after network call

耗尽温柔 提交于 2019-11-29 15:49:44
问题 I am new to RxSwift and I was wondering how I would be able to "reactively" use a UIRefreshControl with a UITableView instead of the normal way of creating a target, and manually calling beginRefreshing() and endRefreshing() . For instance, say I am loading some strings from an API: class TableViewController: UITableViewController { var data : [String] = [] let db = DisposeBag() override func viewDidLoad() { super.viewDidLoad() refreshControl = UIRefreshControl() //I don't want to use /

swift pull to refresh

ⅰ亾dé卋堺 提交于 2019-11-29 14:38:53
i have my refreshcontroller with a scrollview .. self.refreshControl = UIRefreshControl() self.refreshControl.attributedTitle = NSAttributedString(string: "Frissítéshez húzzad! :)") self.refreshControl.addTarget(self, action: "refresh:", forControlEvents: UIControlEvents.ValueChanged) self.scrollView.addSubview(refreshControl) func refresh(sender:AnyObject) { //my refresh code here.. self.refreshControl.endRefreshing() } I'm adding as a subview to a scrollView . It's working when the page content is overflowing the screen. but the issue arise when i haven't received much data and it's not

Why UIRefreshControl jumping?

↘锁芯ラ 提交于 2019-11-29 07:04:33
I try to use the UIRefreshControl with swift 1.2 and works fine except the UI. It is jumping and I dont know why. Here is what I am doing: class ViewController: UIViewController { var refreshControl:UIRefreshControl! @IBOutlet weak var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() self.refreshControl = UIRefreshControl() self.refreshControl.attributedTitle = NSAttributedString(string: "Pull to refresh") self.refreshControl.addTarget(self, action: "refresh:", forControlEvents: UIControlEvents.ValueChanged) self.tableView.addSubview(refreshControl) } func refresh

How do I “hide” a UIRefreshControl?

老子叫甜甜 提交于 2019-11-29 01:01:22
Occasionally my table view won't be connected to a service to refresh, and in that case, I don't want the UIRefreshControl to be present. After I add it in viewDidLoad, I've tried hiding it under certain circumstances with setEnabled: and setHidden: but neither seems to work. Try setting your table view controller's refreshControl property to nil. Try this: [self.refreshControl removeFromSuperview]; self.refreshControl = nil; You have several ways to do this. I think the best way is to do a check in the viewDidLoad method with: if (condition){ //attach refreshControl } if this isn't possible

UIView under UINavigationBar on IOS7

﹥>﹥吖頭↗ 提交于 2019-11-29 00:43:10
We're working on the transition between IOS6 and IOS7 and have the next issues, for the moment without solution: The structure of our view is the next one: UIView UIToolbar for ad-hoc buttons (filter button for the list) UISearchBar over the UIToolbar to integrate the search component with the list UITableView Working perfectly on the previous versions of the IOS SDK. But in IOS7 we have the next troubles: The UIToolbar and UISearch bar is not visible anymore We integrated the UIRefreshBar component and after refresh the UITableView always move under the UINavigationBar Any suggestions? Jageen