There are no tutorials on how to put it in portrait mode. This is my first time using the accelerometer, and the only tutorials are the ones in landscape so I just copied the code and tried changing the values like 50 times and it just doesn't work. Ex: it gets stuck, doesn't move left or right, unreaponsive. Can you please help me?
I'd rather try helping you first than just taking your money.
From what I can see, the fix is simple and obvious, and I tried to get the guy pointed in the right direction in this earlier thread: http://www.iphonedevsdk.com/forum/ip...lp-please.html, but apparently the "eureka moment" is not quite in reach.
From what I can see, the fix is simple and obvious, and I tried to get the guy pointed in the right direction in this earlier thread: http://www.iphonedevsdk.com/forum/ip...lp-please.html, but apparently the "eureka moment" is not quite in reach.
Kalimba, seriously ... not to be mean but Im new to development and your advanced talk about all of this is like another language to me. I did look at the the page you sent me and it didnt help so I was hoping to get someone else to help me.
Kalimba gave you exactly what you need to do in a not-so-complicated way.
Think about this logically. You want the paddle to move from left to right, right to left when the screen is in portrait. If you take a look at the diagram in the other thread, you'll see that it's the x-axis that responds to that kind of tilt movement.
You then need to look at your existing code, and at the numbers used there. The maximum width in portrait is 320, as opposed to 480 in landscape. This should give an idea of what you need to change in the if statements.
You could also try getting rid of if statements all togther and just seeing how you object responds with raw accelerometer values. Then slowly but surely put the if statements back in, noting how the object responds now.
Of course you can just pay someone to do this for you, and it's a 30 second job, but you'll be forever stuck in a position where you don't know anything (and it's a waste of money).
You can't go through software development asking other people for code and just sticking it in, you need to understand it to better yourself. And if you don't feel ready for that yet, take a few years to mature and then come back with a fresh persepective. This of course doesn't just apply to you personally; there are a lot of people on here that just ask for code, without wanting to understand.
Kalimba gave you exactly what you need to do in a not-so-complicated way.
Think about this logically. You want the paddle to move from left to right, right to left when the screen is in portrait. If you take a look at the diagram in the other thread, you'll see that it's the x-axis that responds to that kind of tilt movement.
You then need to look at your existing code, and at the numbers used there. The maximum width in portrait is 320, as opposed to 480 in landscape. This should give an idea of what you need to change in the if statements.
You could also try getting rid of if statements all togther and just seeing how you object responds with raw accelerometer values. Then slowly but surely put the if statements back in, noting how the object responds now.
Of course you can just pay someone to do this for you, and it's a 30 second job, but you'll be forever stuck in a position where you don't know anything (and it's a waste of money).
You can't go through software development asking other people for code and just sticking it in, you need to understand it to better yourself. And if you don't feel ready for that yet, take a few years to mature and then come back with a fresh persepective. This of course doesn't just apply to you personally; there are a lot of people on here that just ask for code, without wanting to understand.
It's up to you now.
I actually found a whole new code for the accelerometer
But in the bold I get Object cannot be set - either readonly property or no setter found
Your right, that does look kind of odd. I got this code off the Internet so I'm not really sure of it myself. Should that line of code be Commented out or should it be modified to something else but I have no idea what those lines of code should be.
Your right, that does look kind of odd. I got this code off the Internet so I'm not really sure of it myself. Should that line of code be Commented out or should it be modified to something else but I have no idea what those lines of code should be.
Chessin, I know that things can be overwhelming when you're first starting out, but you'll find that the best way to get helpful responses is to ask questions that really demonstrate that you're making a serious effort to learn. Saying "I'm new to development, can you do it for me?" every time you're confronted with a new problem is just going to cause experienced developers to write off helping you as a waste of time, and that would be a shame.
The problems you're getting stuck on are such fundamental concepts in coding that you need to dedicate some real time to mastering them. Using tutorials and code that others have written will only help you learn if you're willing to study it until you understand exactly what each and every line does. If you can't, then you need to step back even further, pick up a book, and review the basics. Otherwise, it's like setting out to build a skyscraper without knowing how to use a hammer.
Software development is hard, and it's perfectly normal to encounter problems that take days or even weeks to figure out how to solve. You can't just throw up your hands every time things don't make sense after a few hours of trying and expect someone else to solve your problems for you. Don't be so easy on yourself. If something doesn't make sense, read books, read the documentation, do google searches for articles or tutorials, or spend time practicing with simpler, throwaway projects until you really have the basic concepts down. Before you ask for help, see if there's something else you could try or someplace else you could look. If you do this, you'll find that you're capable of solving a lot more of your own problems than you might think, and when you do ask questions, they'll demonstrate much more insight and be more likely to get helpful responses.