sauly
sauly

Reputation: 27

Is it possible to create a pull to refresh without a table view?

I wanted to know if it would be able to create a pull to refresh feature in ios using swift. I know how to do it when refreshing a table view but is it possible to do it without a table view just in a regular view controller ?

Upvotes: 1

Views: 1677

Answers (2)

Antzi
Antzi

Reputation: 13424

Yes you can. As Nilesh Patel pointed it, it can be done using a scrollview; but also any kind of UIView would do it.

To do it on other views than UIScrollview, make your view draggable move uiview with finger

Simply allow your view to be dragged, and detect the appropriate condition:

How do you make an image follow your finger in objective-c?

Upvotes: 0

Nilesh Patel
Nilesh Patel

Reputation: 6394

Yes, You can easily do it using UIScrollView as UITableView is subclass of UIScrollView

Upvotes: 2

Related Questions