joshbetz / Hypersonic

An iOS app for streaming music from a Subsonic server and other cloud services
http://joshbetz.github.com/Hypersonic
15 stars 3 forks source link

Add a "loading" animation while waiting for API #12

Closed joshbetz closed 12 years ago

joshbetz commented 12 years ago

Instead leaving the screen on whatever selection it is on for a few seconds while waiting for the API, we should probably show some kind of feedback so that the user knows something is happening: http://stackoverflow.com/questions/1136895/how-to-implement-a-loading-animation-when-navigating-in-a-iphone-app

joshbetz commented 12 years ago

First we need #41 so stuff is loaded in the same view that it will be used in.

joshbetz commented 12 years ago

Just some of the things we'll need this for:

joshbetz commented 12 years ago

I just put this on my phone and it still does the thing where it doesn't show the pinwheel until it's about to change views /cc @erasmuss22

joshbetz commented 12 years ago

There's a pretty awesome looking library that does this kind of stuff. Let me know if you want to use it, we can add it as a submodule: https://github.com/jdg/MBProgressHUD

erasmuss22 commented 12 years ago

I have tried all week to try getting this working, but can't, so could you get that MBProgress stuff in place?

erasmuss22 commented 12 years ago

actually I don't even know if that will work because it requires that the main thread remains open. Our parser doesn't make asynchronous requests, so the main thread is occupied. This is an important issue though because it makes the app look clunky.

joshbetz commented 12 years ago

I agree. I'm looking into what it would take to get our parser to make asynchronous requests because it seems like that might be a good idea anyway. And I really like this library.

joshbetz commented 12 years ago

If we have to push back our release by a week or two it's not going to be the end of the world, I'd rather get these last couple things right or it's going to look clunky, like you said.

joshbetz commented 12 years ago

http://nfarina.com/post/4112490145/webrequest-2

joshbetz commented 12 years ago

I just added two libraries, see what you can do. Otherwise we can work on this on Monday too.

erasmuss22 commented 12 years ago

I just figured it out using the code we had.

joshbetz commented 12 years ago

It's pretty awesome. I added rounded corners. At some point we'll probably want to run it on another thread from the main application because it blocks any interaction, like the back button. This is definitely good for now though.