Closed Cookiezby closed 8 years ago
And It is fixed if I add the hud to cell instead of self.view.
Could you tell me why this will happen?
I don't really understand what you are doing, but as a general rule you should not add the HUD directly to a UICollectionView. You are not in charge of the subview handling there and unexpected things might happen.
Thank you for your answer
I use MBProgressHUD in my custom UICollectionView.
UIView ->UICollectionView (only horizontal scrollable ) ->UICollectionViewCell (full-screen) ->UIScrollView (full-screen)
I add the HUD in the UIView when I want to show it. And I will show the HUD view multiple times, However, when I showed the HUD the second or third times, after the HUD dismiss, the content offset will change to the content offset where I first show the HUD instantly.
cell1===cell2===cell3===cell4
when I show the hud in cell3 first time, and it dismiss.Then I show the hud in cell1, after the hud dismiss, the content offset of the UICollectionView will be set to the position of cell3 instantly.
Sorry for my poor english, thanks.