I use a UIRefreshControl
in my tableview for pull new data. But when I define the control, below error shows. I've googled for a while, but find nothing useful.
I use Xcode Version 9.2 (9C40b), swift4, IOS11.2
Cannot override mutable property 'refreshControl' of type 'UIRefreshControl?' with covariant type 'UIRefreshControl'
var refreshControl = UIRefreshControl()
If you want to define another control, then change the name... refreshControl
is a UIScrollView/UITableViewController
ivar since iOS10/iOS6 [respectively]. You're trying to redefine it and that is what causing the error. Or you can use the supplied one of course.
You probably meant something like self.refreshControl = UIRefreshControl()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With