hey, there!very good tutorial. you seem to be pretty good at this stuff huh?fancy being a mobile apps developer in a company?bitzio is looking for talented and competent mobile apps developers to join their company. take a look at my channel and learn more about bitzio and how can it help you market your apps and earn lots of money from it. see you!
hi i created an image in my app that the user can drag around however i would like it to follow a specific path so that when the user drags it it will not go outside of the path. how do i do this?
does any1 know a way to keep the object centered in the screen, and instead of moving.the squear, just keep it in place but spin it around with ur finger? thank you!
Hmm... is it because you want to implement something like that spinning vinyl app? =)
You can use the transform property of the UIView.
Change their assignment to self.center to something like: self.transform = CGAffineTransformMakeRotation(location.y / 3.14159265); // units in radians
This comment has received too many negative votesshow
and this vid is the reason I'm never buying a mac, it's either to complex and cool, or to simple and really boring, pc's are rarely complex, thier code is more self explanitory, and you can do alot of cool things with them
really great tutorial. much appreciated. well described, easy to follow, a lot of help, BUT, it didn't work. the image couldn't be moved around when all was said and done.
This tutorial provides a nice introduction to the iPhone SDK. I have two suggestions for improvements.
(1) The two warnings in Touches...AppDelegate.m can be avoided by adding #import "MainView.h" at the top.
(2) In touchesMoved:withEvent, [touch view] is never equal to squareView (using firmware 2.0 or 2.1). Instead, the intended condition can be achieved by testing CGRectContainsPoint([squareView bounds],[touch locationInView:squareView]).
can you say why the image does not follow the touch when the touch changes quickly? Is this a quirk of the simulator? When moving the 'finger' quickly, the image stops following it. Is there a limit to the updating of the method?
Same thing for me. Something changed in the last SDK that is causing the "if ([touch view] == squareView)" never to be true. However, I'm not experienced enough to know why this is. :(
Taking a look at the sample app you can download, it has this same if-statement logic, but different way to declare our Views.. Thoughts from anyone? This is driving me nuts.
Thank you very much for creating this. I think that it was very helpful. It would be especially helpful for me if you could do a tutorial on switching out image views using a view controller and setting button actions for mailto and URL's.
hey, there!very good tutorial. you seem to be pretty good at this stuff huh?fancy being a mobile apps developer in a company?bitzio is looking for talented and competent mobile apps developers to join their company. take a look at my channel and learn more about bitzio and how can it help you market your apps and earn lots of money from it. see you!
bitziomedia 4 days ago
hey nice tutorial, do you now how to make a program where you can move a picture only left or right, without up and down? so only the X-axis
please help me :)
CitydriftSL 2 weeks ago
Can you do a tutorial returning the rgb values of a pixel touched?
cascarrabias30 4 months ago
What is the code if my image is moving and disappear when touched?
Do I need to change the "anyObject? How does it change?
I hope you can help me
thanks
ulbricho 10 months ago
He sounds like a steriotypical nerd
rabies79 1 year ago
hi i created an image in my app that the user can drag around however i would like it to follow a specific path so that when the user drags it it will not go outside of the path. how do i do this?
tortugatortilas 1 year ago
What is you don't have a reference to the squareView?
michelegavazzeni 1 year ago
id it posible to make 2 imageviews and drag them separate
i tried it but then the image that i drag stays visible, and the other is gone
im using the 4.0 sdk
RealmsStudio 1 year ago
I wonder if this guy has ever got laid?
tombofrog 2 years ago
Just your mom
softdev1 2 years ago
Whoops, I forgot!
tombofrog 2 years ago
heh, I just couldn't resist. No offense anyway.
softdev1 2 years ago
This has been flagged as spam show
Are you a beginner with the iPhone SDK and need some help?
Then visit icodehelp (.) com
Your first steps into iPhone coding.
icodehelp 2 years ago
uhm....
CGPoint location = [touch locationInView:touch.view];
if(CGRectContainsPoint([squareView frame], location)){
squareView.center = location;
}
siroganes 2 years ago 8
@siroganes THANK YOU so much
mlmusic1 1 year ago 2
MY question is how do you get a swipe images like the pictures app on the iphone?
if you have two or more images and use
Tracking a swipe gesture in a view.
shoot me a example please
thanks
edgardrodriguezruiz 2 years ago
Got it I used the != instead of the ==
73Minstrel 2 years ago
Follwed , got no errors but I cant get the image to move, I am assuming you just click and drag with mouse?
73Minstrel 2 years ago
great tut!
does any1 know a way to keep the object centered in the screen, and instead of moving.the squear, just keep it in place but spin it around with ur finger? thank you!
Techlur 2 years ago
Hmm... is it because you want to implement something like that spinning vinyl app? =)
You can use the transform property of the UIView.
Change their assignment to self.center to something like: self.transform = CGAffineTransformMakeRotation(location.y / 3.14159265); // units in radians
vasil9v 2 years ago
This comment has received too many negative votes show
and this vid is the reason I'm never buying a mac, it's either to complex and cool, or to simple and really boring, pc's are rarely complex, thier code is more self explanitory, and you can do alot of cool things with them
qwertisdirty 2 years ago
This iPhone programming not Mac programming.
Also look-up the difference between "to" and "too" you might be shocked at what you find out.
PS No one cares what computer you use. Really.
hiredman 2 years ago
please make a version of this that uses interface builder. i want to do more complex layouts but don't want to learn how to code it.
beak90sfx 2 years ago
What does Synthesize do?
bigmeierhouse 2 years ago
automatically provides getter/setter methods for what you synthesized
a420aDay 2 years ago
Good job, I was looking for info how to have UIImageView handle a touch event.
fernbe 3 years ago
how can i have the red circle on click?
zeeaziz 3 years ago
how did you learn how to do codes. I really want to make an iphone app but i don't know how to make codes. Please help!
legoman1895 3 years ago
really great tutorial. much appreciated. well described, easy to follow, a lot of help, BUT, it didn't work. the image couldn't be moved around when all was said and done.
thanks though!
nuxxun 3 years ago
This tutorial provides a nice introduction to the iPhone SDK. I have two suggestions for improvements.
(1) The two warnings in Touches...AppDelegate.m can be avoided by adding #import "MainView.h" at the top.
(2) In touchesMoved:withEvent, [touch view] is never equal to squareView (using firmware 2.0 or 2.1). Instead, the intended condition can be achieved by testing CGRectContainsPoint([squareView bounds],[touch locationInView:squareView]).
STN1953 3 years ago
can you say why the image does not follow the touch when the touch changes quickly? Is this a quirk of the simulator? When moving the 'finger' quickly, the image stops following it. Is there a limit to the updating of the method?
rob3456 3 years ago
thx a lot, CGRectContainsPoint([squareView bounds],[touch locationInView:squareView]) works!
Xrealize 3 years ago
Great work dude. Very good tutorial.
halfbrick8 3 years ago
I couldn't get it working.
I copied all code and got no errors when building but the image wouldn't move when dragged.
I'm using the latest SDK, could this be why as I couldn't select the same template as required in the first video.
Anyway, thanks for the vid, its helped me to understand what's going on a bit better as I'm a complete n00b!
nadnerb33 3 years ago
Same thing for me. Something changed in the last SDK that is causing the "if ([touch view] == squareView)" never to be true. However, I'm not experienced enough to know why this is. :(
Taking a look at the sample app you can download, it has this same if-statement logic, but different way to declare our Views.. Thoughts from anyone? This is driving me nuts.
svguerin3 3 years ago
nice work, if you can make more videos about sdk for slow people that would be great. i would like to make a few apps of my own. thankx
supasob 3 years ago
Outstanding on coding, pacing, description, and screencasting. Bravo. Make more!
bladnman 3 years ago
excellent thanks!
zinbielz 3 years ago
This is very execellent video for new comers in iPhone application development .
Thanks for your valuable guidance . should i get contact id for iPhone development communication .
coolvishalpatil 3 years ago
Thank you very much for creating this. I think that it was very helpful. It would be especially helpful for me if you could do a tutorial on switching out image views using a view controller and setting button actions for mailto and URL's.
drumnkyle 3 years ago