iPhone: An UI question
I want to implement an UI which should look like Speedometer. Is there a way to implement like that? Some of apps i seen that they have implemented. For ex. an app called "TaxCaster" implemented it. Could someon开发者_JS百科e help me how can i achieve it?
Thank you in Advance.
That is possible yes, but it will not be easy. You will have to either use OpenGL or Core Animation. I would suggest the latter if you want something like they have in TaxCaster.
You can find more about Core Animation here.
I hope it helps.
A possibility is to simply have two UIImageViews:
A background that has all the measurement listings (i.e. the ruler part), and another that would act as your needle, pointing to the current measurement. All you would need to do when changing the current measurement would be to use the transform property to rotate it into the correct position.
Not a trivial amount of work, but it shouldn't be too hard.
精彩评论