aschuch / StatefulViewController

Placeholder views based on content, loading, error or empty states
MIT License
2.14k stars 149 forks source link

UIActivityIndicatorView Always on top left #57

Closed erickva closed 7 years ago

erickva commented 7 years ago

UIActivityIndicatorView as loadingView Always on top left even when it's set with a larger frame, it is always small in the corner. Is there a work around this? As the insets method applies for all the state views.

aschuch commented 7 years ago

Are you using the latest version from master? Can you post some example code?

erickva commented 7 years ago

3.0, sure, in my test I am simply giving it a frame and assigning it to the loadingView:

let loading = UIActivityIndicatorView(frame: CGRect(x: 100, y: 100, width: 400, height: 400))
loading.startAnimating()
loadingView = loading

But regardless of the size of the View it is always in the top left corner:

screen shot 2017-05-25 at 9 03 53 am
aschuch commented 7 years ago

Hm, please try with the latest master branch, there are some changes in there that did not make it into an official release yet. Are you using a vanilla UIViewController or UITableViewController/UICollectionViewController?

erickva commented 7 years ago

It works perfectly with the master branch! Thank you very much aschuch!

harishgonnabattula commented 7 years ago

@aschuch Can you release a new version from the master branch which will includes these changes?