Save a text file in the Media folder of the IPhone
Hey , I created a开发者_StackOverflow社区 text file and I want save in the media folder not in the root folder. How I can do this?
Now I need to know how to create an image (arrow) for illustrating the value.
That's a big topic. In a nutshell, you need to subclass UIView and implement drawing code in the drawRect: method of your subclass to implement a compass pointer. I've not done this on iPhone, but I have dome it on OS X. I expect the principles are the same.
The first thing I did was move the point (0, 0) to the centre of the view. I then defined a path that drew the compass arrow in a straight up and down direction. And I used a transform to rotate it to the correct angle.
I suggestr you read the Drawing Guide and the View Guide before proceeding.
精彩评论