Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

LastLine

macrumors 65816
Original poster
Aug 24, 2005
1,313
21
Hey everyone,

I'm kind of new to this game but I'm having fun learning, I used to work in VB on windows machines but Objective C and Xcode are proving much more appealing on the whole.

I've recently started experimenting with accelerometers using the example here
http://www.switchonthecode.com/tutorials/iphone-tutorial-reading-the-accelerometer
as a basis.

What I'm trying to setup at the minute is removing the progress bars and labels (fairly straight forward thus far right), what I would like to do is arrange so that when the accelerometer is in a certain position (reading only the X axis readings) so that if it's between values of aand b it displays one image, between b and c displays nothing, and between c and d displays a second image.

Now I'm hoping someone can help demonstrate this to me as I've gone around in circles, I don't want to have to tap anywhere, just for the app to adapt what is seen depending upon the position of the accelerometer, but I can't find a good tutorial or sample to show me how to do this as I'm starting to feel like I'm hitting my head against a brick wall here.

Any help is very much appreciated :) this has the makings of a great little game in it I just can't figure out how to do the basics :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.