-1

Hey , I created a text file and I want save in the media folder not in the root folder. How I can do this?

  • 1
    Here is another related comment that gives you the tips on how to read the values from the compass, which could possibly help get you on your way: http://stackoverflow.com/questions/1043740/iphone-3-0-compass-how-to-get-a-heading/1044444#1044444 – Bill Turner Jul 20 '10 at 02:25
  • I have the three value of compass, Now I need to know how to create an image (arrow) for illustrating the value. Thanks – EdwinMiguel Jul 20 '10 at 06:30

1 Answers1

1

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.

JeremyP
  • 84,577
  • 15
  • 123
  • 161