-
-
Notifications
You must be signed in to change notification settings - Fork 161
Manually position / add padding to ActivityIndicator #189
Comments
I would also like to see this. I was able to get a reference to the underlying scroll view and modify the refresh control's bounds directly using a |
@timothycosta could you share some code showing how you accomplished that? |
@codetheweb Basically, I keep track of the underlying UIScrollView in Then, I use something like:
|
Thanks for pointing me in the right direction. I ended up implementing this function in a custom layout delegate (since I was using one already): func collectionView(_ collectionView: UICollectionView, targetContentOffsetForProposedContentOffset proposedContentOffset: CGPoint) -> CGPoint {
self.collectionView.wrappedValue = collectionView
return proposedContentOffset
} where class WaterfallScreenLayoutDelegate: ASCollectionViewDelegate, ASWaterfallLayoutDelegate {
...
public var collectionView: Binding<UICollectionView?> = .constant(nil)
...
} and the modifier on the collection view: .customDelegate({
let delegate = WaterfallScreenLayoutDelegate.init()
delegate.collectionView = self.$collectionView
return delegate
}) |
Sorry for the delayed response, I've had a long break and am back at last. This seems like something I could build into the library... Potentially just a modifier that defines an offset amount for the activity indicator? Did adjusting the origin achieve what you wanted? |
Adjusting the origin worked fine for me. It definitely feels hacky, so a library feature would be great but it works fine for now. |
First of all, thank you for such a high quality open source library - I wouldn't have been able to make my app without it.
I'm wondering if there's a way to manually position or add padding to the UIActivityIndicator view that appears on scroll-to-refresh. I would like it to be positioned below the buttons, instead of overlapping with them (the floating buttons fade out once the user starts scrolling downwards, and the scrollview fills the entire window). I'm relatively new to Swift / iOS development, so I might just be missing something trivial.
See this screenshot for what I mean:
The text was updated successfully, but these errors were encountered: