i read some questions here about UIGestureRecognizer but i am not sure how to accomplish the following task:
I would like to create something like the unlock slider of the iphone, but sliding a button around a circle. In this case i donĀ“t need to look into the UIGestureRecognizer class, do i? I need an animation class or something...If you gave me some key-words to start with i would be really happy :)
maxi
You might try this page as a starting point
http://denizdemir.com/2011/03/07/animated-slider-iphones-cool-first-impression/
To do the circle version will involve a fair bit more work I'd say as not only do you need to read the circle gesture you also need your lock to move around the circle...
http://iphonedevelopment.blogspot.com/2009/04/detecting-circle-gesture.html
http://forum.unity3d.com/threads/13494-Messing-around-with-gestures
Could be there is a far simpler way to do this now but I'm not aware of it. Good Luck!
Here's another one:
slide to unlock" clone from the iPhone's lockscreen using only public
APIs
https://github.com/iosdeveloper/SlideToCancel
Related
i'm new to game developing so i might be a little confusing on defining what i need.
Assume i have a wide background picture, much bigger than the screen(e.g.4000*3000px), how should i approach if i want to navigate it with the input from the gyroscopes?
i mean handling the device up, down, left, right and so on.
If you remember the old Mosquitoes game on Symbian i would like to do something similar but without the camera.
However any suggestion is appreciated.
Thanks in advance.
Use UIScrollView - put your pic inside the scroll view and try to navigate with fingers.
When scroll will be working nice, use this or this or any other tutorial to find out how to use accelerometer.
Finally, when you will be able to collect data from accelerometer, give it to UIScrollView using [myScrollView scrollRectToVisible:myRect animated:YES];
All needed math and physics must be done by you.
I want to have multiple buttons on the screen that continuously move. When they touch the sides, they should bounce back. How do i do this? Any helpful links? Ideas? Thanks!
you go through the apple animation document.
Introduction to Core Animation Programming Guide
Check the following SO post.
How to move several buttons throughout the screen
Move a button in the screen
Also have a look at cocos2d which i think may make it easier to do something like this if they have to constantly be moving.
cocos2d is a game platform which has physics etc but also i believe has support for buttons so it should not be hard to achieve something like this. Check out the cocos2d website and documentation.
What is the best way I center the screen to follow the character? Should I use CCCamera or just move the background around?
I am new to cocos2d so please show me exact code.
BTW: I am also using box2d in this project.
Thanks
Try this...
[self runAction:[CCFollow actionWithTarget:(your hero) worldBoundary:CGRectMake(0,0,1050,350)]];
It will follow your character (your hero).
Hey there,
You have always to choose between the best way and the best way in your situation. A problem has multiple ways how you can solve it. So I can just tell you how I did it.
A few weeks ago I released my first game. (If you are interested check it out: Birdy!) I also used Cocos2d and had the same problem like you. The player should always be in the center of the screen. I've choosen the way to move the background. I added 2 things to the GameScene: The background and the bird. And I set the background as the bird's delegate. So as soon as the bird performs a jump for example, the background is moved in the opposite direction.
I think for my situation it was the best method. But I can't talk about CCCamera because I never did anything with that class...
I hope I could help you a little bit. But it's always a bit difficult to find the right way. So you should also think about things you will optionally add in the future. So perhaps my way does not fit your requirements...
I hope also my english is understandable...
Sandro Meier
I am trying to design another app and am struggling to think of the best way to do it. I'm after some advice please!
If you imaging a bicycle wheel in the middle of the ipad (and iPhone)... I want the user to be able to click on the tyre and spin it to the left or right. Depending on the speed of the swish will drive the speed of the wheel rotation.
It should rotate around the centre of the wheel and not move any other direction.
Do I need to use some graphics code, or simply listen for the touch, check the area they touched, then rotate the image around it's centre left or right?
Really I'm after some pointers around the methods to use - I'm not being lazy and asking for code, but if anyone knows of tutorials - that would help immensely!!
Thanks for any info.
Your best bet is to use one of the UIGestureRecognizer subclasses, probably UIPanGestureRecognizer as it includes velocity.
Apple's SimpleGestureRecognizers project will help you get started.
I want a UIView with a glowing or pulsing effect, like the status bar during a call on the iPhone. Does anyone know how I would go about doing this? I've experimented with NSTimer but can't seem to find how to go about this.
Thanks!
The animation API has the ability to message a callback you provide when the animation completes. You can use the API to daisy-chain together a series of animations from one state to another, giving the pulse effect you are looking for.