Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tutorials > Tutorial Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 12-28-2008, 07:28 PM   #1 (permalink)
New Member
 
Join Date: Dec 2008
Location: Ontario Canada
Posts: 3
gingy is on a distinguished road
Send a message via AIM to gingy
Default Multi Touch UIImageView Tutorial touch issues

edit start : got this to work with the following:

Code:
if (CGRectContainsPoint([newGameView frame], [touch locationInView:self]))
Thanks anyone who even bothered to read my post ... After pulling my hair out a bunch I found a method that worked. Turns out the CGRectIntersectsRect was not what was used in the video. Hope this helps other people. I bet it won't tho!!!! hahaha cause the video uses the right one! ... i don't know why I was using IntersectsRect.

end edit:

original question

I have been following this tutorial to get what I want working in my application and the following line of code is not working for me and returning an error

Code:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
	UITouch *touch = [[event allTouches] anyObject];
	if (CGRectIntersectsRect([image1 frame], [touch locationInView:self])) {
	 	//do stuff
	}
	return;
}
I get the following error:

incompatible type for argument 2 of 'CGRectIntersectsRect'

this is a link to the tutorial I was uses to get me started from Nitrex88:
Welcome to the iPhone Development Central Website!

I'm try to not use interface builder if at all possible and try to do everything programatically. What I am really try to do achieve the same thing as an icon on the main screen of the iphone does in a button.

What I mean is this and if you take any iPhone you can see this.

1. when you touch an icon it gets darker
2. if you drag off the icon it goes back to regular color
3. if you drag back on it gets darker again
4. if you drag off and release it does not launch action
5. if you drag back on and release it does launch action.

This is very basic rollover button animations and coding I want to achieve but i'm having a hell of a time figuring this out. Any help with this would be appreciated as I might just be going about this the wrong way.

Last edited by gingy; 12-28-2008 at 08:43 PM.
gingy is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Stats
Members: 175,696
Threads: 94,139
Posts: 402,961
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jasper_muc
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:59 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0