I am working on xcode4.1 not in coca 2d. I want to handle image through accelerometer. How can I do this?
Use an UIImageView to display it. Use the center property to move it on the screen.
Use the UIAccelerometerDelegate to get the move of the phone.
Related
I would like to rotate an image by using the rotation point and single touch. Can you please any one help me to do this?
Thanks in advance.
Hi have a look on this once....
Touch rotate image
SO link
I'm trying to make an app that's displaying my photos from camera roll like app icons in iphone (matrix view) . The pictures will have the "wobble" effect and the pictures need to be rearrangeable(the posibility to swap pictures).
I found out how to implement the wobble efect.
What`s the best way to implement the displaying and swapping functionality?
I suggest you to show your photos using CALayer.
Add those layer in Matrix like pattern in your UIView using frame property of layer.
To move or rearrange photos find particular CALayer in touchesBegin method of View using touch points and Move it with movement in touched(in touchesMoved). Settle it in a proper location in touchesEnded method.
I have assumed that you have basic knowledge of usage of classes that I mentioned in above description.
Post here if you need more help.
Thanks in advance.
I want to get the pinch effect to an image means i want to change the shape of an image when i perform pinching on an image. I don't know is it possible or not, if it is possible can any one help me to do it using objective c in iphone.
Actually your question itself is a big concept..Atleast you must have tried something to achieve it..we can help you out with the modules..
for a jump start -
study about touchesBegan:,touchesMoved:,and touchesEnded methods.
Instead of using Gesture Recogniser, try to make your own pinch effect by the above methods..
U'll get much more flexibility to control the touch points.
Hope it helps.. :)
you need to associate a pinch gesture (type of UIPinchGestureRecognizer)with your UIImageView .
Check the below blog tutorial with sample code
Working with UIGesturerecognizer
Sample code from Apple
You can find help here : Limit maximum scale for scaling image with pinch gesture in IOS
Basically, using a gesture, you get a factor that you use to scale your image.
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 am trying to draw circles around the current location on MKMapview.I tryied many codes but however no success. can any one suggest any links which should I refer. I am new to Iphone so dont have much knowledge about Quartz 2D.
I would think the simplest method to achieve your goal would be to use a custom PNG image with transparency and set the image property of a MKAnnotationView that you add to your current MKMapView.