Pretty much ive used code like this https://stackoverflow.com/a/44521796/9610805 into my webview project and it works fine but how do i add my own logo* instead of the default spinning circle?
Asked
Active
Viewed 367 times
1
-
Create a custom `UIRefreshControl` subclass. It's a `UIView` so you can override its `drawRect(_:)` method, I'm guessing. – Guy Kogus Apr 07 '18 at 12:33
-
What kind of animation you want ? – Nitish Apr 07 '18 at 12:35
-
@Nitish Same spinning affect i just want to add a small logo instead. – Bob McCain Apr 07 '18 at 12:40
-
@GuyKogus yeah i thought i would use Cgrectmake but it seems that its been changed in the new swift so ill give drawRect a go, thanks. – Bob McCain Apr 07 '18 at 12:41
1 Answers
0
var refreshImageView = UIImageView(image: UIImage(named: "yourImage.png"))
refreshControl?.insertSubview(refreshImageView, at: 0)
If you are willing to go for custom library instead, I would like t5o suggest Yalantis PullToMakeSoup

Nitish
- 13,845
- 28
- 135
- 263
-
Cant centre the icon exactly horizontally properly lmao im going to keep trying but it seems to look good and ill add an animation to it. oh and how do i hide the circle spinning thing that is still there? – Bob McCain Apr 07 '18 at 13:17
-
Uhh Never ended up centering it to the middle , right now the image spawns to the top left – Bob McCain Apr 08 '18 at 01:00