Reputation: 1115
I have UItableview and active UIRefreshControl for pull to refresh action. So I am trying to disable bounce (that appears when I scroll UITableView) by unselecting "bounce" property of tableview in storyboard. But when I do this pull to refresh also stops working. What can I do about this? Should I manually disable only bottom bounce and left top bounce for UIRefreshControl ?
My viewDidLoad method:
override func viewDidLoad() {
super.viewDidLoad()
self.refreshControl = UIRefreshControl()
self.refreshControl!.attributedTitle = NSAttributedString(string: "Обновление")
self.refreshControl!.addTarget(self, action: "refresh:", forControlEvents: UIControlEvents.ValueChanged)
self.edgesForExtendedLayout = UIRectEdge.None;
tableView.allowsMultipleSelectionDuringEditing = false;
tableView.tableFooterView = UIView()
// menu button
if self.revealViewController() != nil {
menuButton.target = self.revealViewController()
menuButton.action = "revealToggle:"
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
}
}
Upvotes: 5
Views: 2778
Reputation: 31645
I faced the same issue. After implementing some code, I got a result that -unfortunately- the refresh control won't get called without letting the tableView bouncing.
Upvotes: 2