Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIRefreshControl() in iOS 11 Glitchy effect

Every time I pull to refresh the TableView, the UIRefreshControl appears to be glitchy. Below is the code I am using. Any Ideas?

In AppDelegate:

UINavigationBar.appearance().isTranslucent = false
UINavigationBar.appearance().barTintColor = UIColor.red
UINavigationBar.appearance().tintColor = UIColor.white

In UITableViewController:

self.tableView.refreshControl = UIRefreshControl()

if #available(iOS 11.0, *) {
  self.navigationController?.navigationBar.prefersLargeTitles = false
} else {
  // Fallback on earlier versions
}

self.tableView.refreshControl = refreshCont
like image 211
lePapa Avatar asked Oct 02 '17 13:10

lePapa


People also ask

What is uirefreshcontrol in Uis?

A UIRefreshControl object is a standard control that you attach to any UIScrollView object, including table views and collection views. Add this control to scrollable views to give your users a standard way to refresh their contents.

How do I use uiuirefreshcontrol on a Mac application?

UIRefreshControl isn’t available when the user interface idiom is UIUserInterfaceIdiom. mac. However, you can update your app to provide similar functionality in the Mac idiom. For example, replace the control with a Refresh menu item by creating a UIKeyCommand object with the title “Refresh” and the keyboard shortcut Command-R.

What is refresh control in uicontrol?

The refresh control lets you know when to update your content using the target-action mechanism of UIControl. Upon activation, the refresh control calls the action method you provided at configuration time. When adding your action method, configure it to listen for the valueChanged event, as shown in the following example code.

How does the refresh control work in the mobile app?

When the user drags the top of the scrollable content area downward, the scroll view reveals the refresh control, begins animating its progress indicator, and notifies your app. You use that notification to update your content and dismiss the refresh control.


1 Answers

For me self.extendedLayoutIncludesOpaqueBars = YES fixed the issue.

like image 107
pre Avatar answered Sep 21 '22 03:09

pre