I've been wanting to create a HUD style loading bar like the SMS app on the iPhone used to have but I don't know how to. I was wondering if anyone has done this before or if there is a tutorial somewhere for it? I just think it looks so nice and would like to use it rather than the built in loading progress bar.
It should be very simple to implement using Core Animation layers (the CALayer class).
The bar would be a layer with rounded corners and the fill could be drawn by a custom drawing method.
Related
I am wondering if anyone knows how to customize a UISlider to give the progress bar rounded corners (without Thumb Image) as shown in the following image:
What I want:
What I have now:
Thanks!
That isn't how a UISlider works, so can't customize in that way. Instead, you would have to build your own custom view from scratch in order to get that display. The drawing part is trivially easy; getting your view to act like a slider (that is, if you want it to respond to touches and dragging) is pretty easy too.
Since iOS5 there seems to be plenty of ways to add a custom background image to a navigation bar. I've tried using the appearance proxy, which works very well to change the appearance of all UINavigationBars application wide, and the setBackgroundImage:forBarMetrics: method for changing an individual navigation bar.
Is it possible to animate a change to the background image dynamically?
My application has two main states, and I wanted to fade the navigation bar between two colours to represent these two states. I haven't yet found a way to do this.
Thanks.
I'm interested to making a "fade effect" like Foursquare app. I want the main view to fade in.
How can I do this?
Sincerely I don't know what should I use. If anyone have the Foursquare's app on his iPhone, please open and see what I mean.
You should look at these answers:
How can I display a splash screen for longer on an iPhone?
This is what I've used in almost all of my apps:
http://iphoneinaction.manning.com/iphone_in_action/2009/05/creating-a-splash-screen-splashview-11.html
Displaying a "splash screen" and using the "fade effect" are really two different questions. As for fading, UIView has a bunch of built-in animations you can use which is provided by Core Animation. Look into the UIView docs Apple provides for these type of view animation.
The splash image is white with a fake nav controller on the top.
When the app finishes launching, the splash image is redisplay on top.
The typical UIView elements are added beneath the second splash image.
When this is finished, the second splash image transparency is animated to fully transparent and thus causes a "fade effect".
I want to build a spinner for menu selection like the one in where to? IPhone app as shown in image below. Any hints?
Doesn't need to be very hard. The easiest is probably a UIImageView with the image of the actual spinner, and another UIImageView with the yellow selection highlight (a transparent PNG) overlaying. The rotation can then be controlled with the transform property of the first UIImageView.
This should of course be nicely encapsulated in a custom UIView subclass.
I need some inspiration on how to build a nice progress bar for the iPhone.
What I want to build is a custom progress bar, as I've drawn here:
alt text http://img.skitch.com/20100317-tf185nscpf41u1xp3s6fqbhux6.png
My approach up to now is to use a PNG (gray in the figure above) with a transparent rounded rectangle. Through this rectangle, users see the moving bar. It would be nice to draw this bar with Quartz and give it a fancy animation (similar to the Mac OS X progress bars).
Any hints how to do this
you could use a couple nested UIViews and control the size of the childview and have different colors of backgrounds to show the progress or you could subclass the UIProgress bar like this example of the slide to unlock UISlider that has animation. The example is of a UISlider but the method used for animation could also be used on a progress bar without the difficulty of handling touches.
here is a link directly to the code from that discussion