Re: Compiling screensaver for 10.5
What kind of hardware does your Mac OS X 10.5 user have (i386 / ppc)? It's a G4. (Sorry, I forgot to mention that in my post.) Which version of Xcode are you using? Note that 3.2.6 dropped PPC support. I've got 3.2.6. Thanks to another member of this mailinglist, I have added ppc to the set of my Architectures. So 'file' now gives me this: % file ArtSaver ArtSaver: Mach-O universal binary with 2 architectures ArtSaver (for architecture ppc7400):Mach-O bundle ppc ArtSaver (for architecture i386): Mach-O bundle i386 Is that good to run on a G4? Best regards, Gabriel. PS: Thanks a lot for your response! smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSMutableArray contract
Hi people, I just realized I may be doing something dangerous with an NSMutableArray. I searched Guides and References on this but couldn't find an explicit answer: - Does an NSMutableArray guarantee to retain an object on addObject:? - Does it ever make a copy of the original instead of retaining it? - As long as I am sure the object will not be removed (or replaced) from the array, is it safe to assume that the object I passed to addObject: is the exact same object inside the array? The reason I am asking this is because in a couple of hard-to-debug places in my code I use an object I just added to a mutable array counting on it being the same pointer as inside the array (because other parts of the code will need it there later). Thanks in advance for any help. (hopefully I'll get more proficient with cocoa soon enough, so I won't have to bother you guys so much...) Carlos. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSMutableArray contract
On Apr 1, 2011, at 9:29 AM, Carlos Eduardo Mello wrote: Hi people, I just realized I may be doing something dangerous with an NSMutableArray. I searched Guides and References on this but couldn't find an explicit answer: - Does an NSMutableArray guarantee to retain an object on addObject:? Yes. - Does it ever make a copy of the original instead of retaining it? No, unless you initialize the array with [[NSMutableArray alloc] initWithArray:otherArray copyItems:YES]. - As long as I am sure the object will not be removed (or replaced) from the array, is it safe to assume that the object I passed to addObject: is the exact same object inside the array? Yes. Of course, you can modify the object but the pointer should stay the same. The reason I am asking this is because in a couple of hard-to-debug places in my code I use an object I just added to a mutable array counting on it being the same pointer as inside the array (because other parts of the code will need it there later). You can of course check that by logging the address of the object. I wonder what you're observing that makes you think this is the problem? Good luck, Hank ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSMutableArray contract
Thanks for the confirmation. You can of course check that by logging the address of the object. I wonder what you're observing that makes you think this is the problem? The objects in this array are the main thing in my app. Various parts of the UI direct actions to each one of them, when they are selected (only one at a time). The objects contain a path which is drawn and used for hit detection and dragging. Drag actions incur in changes in the object's associated data. It all works fine most of the time, but every once in a while (can't figure out why...) the object seems to be pulled from under my feet and I get BAD ACCESS crashes in apparently random places. I tried to debug it but the BAD ACCESS only happens after my code yelds control to system code. So I figured I mut be somehow misusing some NS classes... ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSMutableArray contract
On Apr 1, 2011, at 9:49 AM, Carlos Eduardo Mello wrote: It all works fine most of the time, but every once in a while (can't figure out why...) the object seems to be pulled from under my feet and I get BAD ACCESS crashes in apparently random places. I tried to debug it but the BAD ACCESS only happens after my code yelds control to system code. Classic symptoms of a memory management bug -- specifically, overreleasing an object. Use Instruments and/or Google NSZombieEnabled. --Andy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSMutableArray contract
On Apr 1, 2011, at 9:49 AM, Carlos Eduardo Mello wrote: The objects in this array are the main thing in my app. Various parts of the UI direct actions to each one of them, when they are selected (only one at a time). The objects contain a path which is drawn and used for hit detection and dragging. Drag actions incur in changes in the object's associated data. It all works fine most of the time, but every once in a while (can't figure out why...) the object seems to be pulled from under my feet and I get BAD ACCESS crashes in apparently random places. I tried to debug it but the BAD ACCESS only happens after my code yelds control to system code. So I figured I mut be somehow misusing some NS classes... Have you tried running your app in Instruments with the Zombies template? It does sound like you're corrupting the memory somewhere, and that usually causes a crash in a completely unrelated spot. If you're REALLY lucky, the static analyzer might help you too, although that usually only catches the obvious ones. Hank ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Compiling screensaver for 10.5
On Apr 1, 2011, at 12:13 AM, Gabriel Zachmann wrote: Which version of Xcode are you using? Note that 3.2.6 dropped PPC support. I've got 3.2.6. Yeah, that would do it. 3.2.6 didn't completely drop PPC support, but it did drop it from the list of standard architectures. % file ArtSaver ArtSaver: Mach-O universal binary with 2 architectures ArtSaver (for architecture ppc7400): Mach-O bundle ppc ArtSaver (for architecture i386): Mach-O bundle i386 Is that good to run on a G4? Yes. Nick Zitzmann http://www.chronosnet.com/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Simulate touch event with cordinate?
On 31 Mar 2011, at 11:36 PM, Rikza Azriyan wrote: Anyone could help me,, I want to handle touch drag event programatically, for example in ibooks reader, we use fingertips for navigating to next/prev page by sliding the screen to the left/right direction. I want to handle this event within my code, such as give the first cordinate in A(180,45) and the last cordinate A'(90,188), means i do slide on sceen from A to A'. Anyone can help me how to do it? We'd be better able to help if you could explain why UIGestureRecognizer does not do what you want. — F ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Seeking advice for how to implement notification upon completion of asynchronous upload
WT, Thanks for the code! So of the approaches: 1. delegates 2. blocks 3. KVO 4. Notifications you went with delegates (didFinishDownloadingData: and failedWithError:) for completion notification. Has this worked out well for others that have used this code? Did you consider any of the other alternatives and if so what made you go with the delegate approach? Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
(no subject)
http://shaio.com/molo.php ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Are the progress spinner images publically available?
John Pannell mailto:j...@positivespinmedia.com wrote (Thursday, March 31, 2011 3:18 PM -0600): Don't know if this fits your objectives, but I found an excellent layer-based solution to this: YRKSpinningProgressIndicator https://github.com/kelan/yrk-spinning-progress-indicator-layer John, thanks for the tip and the link. I looked at YRKSpinningProgressIndicator and it's certainly, well, er, elaborate! But it's gratuitous use of sublayers is way more resource intensive that I was hoping for. My application could, potentially, end up putting dozens of these progress spinners on the screen at once. YRKSpinningProgressIndicator would then create hundreds and hundreds of little tiny sublayers, one for each spoke. Past experience has shown that CA starts to creak under that much load. So I'm going with plan B, which is create a custom CALayer that draws a single spinner wheel image and then rotate it using a key-frame animation. -- James Bucanek ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Book for expert programmer about cocoa and Objective-C
Hi. I need to have a good book in my side to program with Objective-C using the cocoa. I read the beginner books like ... for absolute beginner, starting to program with But now, I need a book for professional. Book that is BIG, DIFFICULT and is HARDCORE about anything for cocoa and objective-c. That show a really lot of thing. That will be my book for years.. You understand, right? Anyone can give-me an idea? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Seeking advice for how to implement notification upon completion of asynchronous upload
On Apr 1, 2011, at 12:47 PM, Chris Markle wrote: WT, Thanks for the code! Hello again, Chris. You're most welcome! So of the approaches: 1. delegates 2. blocks 3. KVO 4. Notifications you went with delegates (didFinishDownloadingData: and failedWithError:) for completion notification. Has this worked out well for others that have used this code? I can't speak for other people but delegation for situations such as this one has served me well in numerous occasions. Did you consider any of the other alternatives and if so what made you go with the delegate approach? I didn't exactly consider the other alternatives since delegation is the standard approach when one needs to offload work to other objects, but if I had to defend why delegation is the best approach in this case, here's what I'd say: KVO, as I understand it (I'm not very experienced with the KVO/KVC technologies), is best suited to observe changes in object *properties*, and not so much as a means to offload work to another object. The blocks API is great but it doesn't lend itself easily to much reusability. Sure, you can create a block, give it a name, and pass it around, but you don't want your block to have a ton of code. If you look at the majority of examples of block use, blocks are typically small sections of code. Besides, at the time I wrote the Downloader class, I wasn't aware of the blocks API (it was before WWDC 2010). Notifications are best suited for situations when a potentially large number of objects may be interested in an event or situation caused by a single object and you don't want to couple the producer to the consumers of those events. In my particular case (which happens to be *very* common), my goal was very clear: I had a table view controller managing a table view and I needed to fill the rows of that table view with data coming from the web. Since each row would have different data, I needed a means of independently downloading different bits of data. Of course, I could have written all the downloading code inside my custom table view controller class, but that's not a very reusable approach. Moreover, I'm a firm believer that each class should have as few and as well-defined responsibilities as possible. Writing all the downloading code inside the table view controller class would clutter the table view controller class with too many responsibilities. Much better is to create a class with the single responsibility of managing downloads in such a way that each instance is responsible for downloading data from a single url. But, then, how to coordinate the responses so that, when each downloader object is done or fails, the table view controller gets notified? Note that in this case we have several producers (the downloader objects) and one consumer (the table view controller), rather than one producer and several consumers. The notification approach is best used in the latter case. So, the natural approach here is to make the one consumer (the table view controller) the delegate of each of the producers (the downloaders). To summarize the advantages, you get code reusability, division of class responsibilities, decoupling of classes (the Downloader class knows nothing about the table view controller class), and you solve the many-producers/one-consumer problem in a natural and simple way. If I may make a suggestion, I think you might benefit from reading Cocoa Design Patterns by Erik Buck and Donald Yacktman a book that goes into great detail on the various so-called design patterns commonly used in Cocoa and Cocoa Touch programming. Hope this helps. WT___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Book for expert programmer about cocoa and Objective-C
Even though it is getting on in age, I really like Anguish, Buck and Yacktman's Cocoa Programming... http://www.amazon.com/Cocoa-Programming-Scott-Anguish/dp/B000212NUM/ref=sr_1_7?s=booksie=UTF8qid=1301687411sr=1-7 Once you've completed the beginner stuff, this provides a very thorough look at the cocoa frameworks in a lot of depth. It was written prior to some of the new frameworks (i.e. Core Data, Core Animation, etc.), but nothing beats it for deep coverage of the AppKit and Foundation stuff that every app is made of. HTH! John On Apr 1, 2011, at 1:40 PM, Rodrigo Zanatta Silva wrote: Hi. I need to have a good book in my side to program with Objective-C using the cocoa. I read the beginner books like ... for absolute beginner, starting to program with But now, I need a book for professional. Book that is BIG, DIFFICULT and is HARDCORE about anything for cocoa and objective-c. That show a really lot of thing. That will be my book for years.. You understand, right? Anyone can give-me an idea? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/john%40positivespinmedia.com This email sent to j...@positivespinmedia.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Book for expert programmer about cocoa and Objective-C
I am told that buck and yacktman's cocoa design patterns is a good source of interview questions for Cocoa On Fri, Apr 1, 2011 at 1:01 PM, John Pannell j...@positivespinmedia.comwrote: Even though it is getting on in age, I really like Anguish, Buck and Yacktman's Cocoa Programming... http://www.amazon.com/Cocoa-Programming-Scott-Anguish/dp/B000212NUM/ref=sr_1_7?s=booksie=UTF8qid=1301687411sr=1-7 Once you've completed the beginner stuff, this provides a very thorough look at the cocoa frameworks in a lot of depth. It was written prior to some of the new frameworks (i.e. Core Data, Core Animation, etc.), but nothing beats it for deep coverage of the AppKit and Foundation stuff that every app is made of. HTH! John On Apr 1, 2011, at 1:40 PM, Rodrigo Zanatta Silva wrote: Hi. I need to have a good book in my side to program with Objective-C using the cocoa. I read the beginner books like ... for absolute beginner, starting to program with But now, I need a book for professional. Book that is BIG, DIFFICULT and is HARDCORE about anything for cocoa and objective-c. That show a really lot of thing. That will be my book for years.. You understand, right? Anyone can give-me an idea? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/john%40positivespinmedia.com This email sent to j...@positivespinmedia.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/scott_ellsworth%40alumni.hmc.edu This email sent to scott_ellswo...@alumni.hmc.edu ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Are the progress spinner images publically available?
Am 01.04.2011 um 18:38 schrieb James Bucanek: So I'm going with plan B, which is create a custom CALayer that draws a single spinner wheel image and then rotate it using a key-frame animation. It's old, but you want to take a look regardless: http://www.harmless.de/cocoa-code.php#progressindicator Andreas___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Simulate touch event with cordinate?
Sorry maybe you guys don't understand with my bad english.. I said UIGestureRecognizer does'n do what i want because it's for detecting/responding touch,gesture,tap etc that user did to the screen. It's for respond the user interaction to the screen... In my case, i want to make that interaction. I want to make a touch event without touching the screen, i want to make slide event without touching it So whats the parameter? I send my cordinates as the touch position that changing simultanously Example: Given cordinate: A(10,300) A'(77,93) A''(122,55) A'''(99,200) Means i do sliding from A to A' to A'' to A''' Rikza Azriyan Student of Sriwijaya University Palembang, Indonesia Sent from my iPhone Provided by Telkomsel. On Apr 1, 2011, at 10:19 PM, Fritz Anderson fri...@manoverboard.org wrote: On 31 Mar 2011, at 11:36 PM, Rikza Azriyan wrote: Anyone could help me,, I want to handle touch drag event programatically, for example in ibooks reader, we use fingertips for navigating to next/prev page by sliding the screen to the left/right direction. I want to handle this event within my code, such as give the first cordinate in A(180,45) and the last cordinate A'(90,188), means i do slide on sceen from A to A'. Anyone can help me how to do it? We'd be better able to help if you could explain why UIGestureRecognizer does not do what you want. — F ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Simulate touch event with cordinate?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 4/1/11 6:44 PM, Rikza Azriyan wrote: Sorry maybe you guys don't understand with my bad english.. I said UIGestureRecognizer does'n do what i want because it's for detecting/responding touch,gesture,tap etc that user did to the screen. It's for respond the user interaction to the screen... In my case, i want to make that interaction. I want to make a touch event without touching the screen, i want to make slide event without touching it Could you explain WHY you want to do this? Surely if your app takes a certain action in response to a gesture it would be easier to just trigger that action on demand. Don't know what your goal is, but at first read this sounds like the product of a very flawed application architecture. - -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFNloOfaOlrz5+0JdURAmhwAJ9tvB7kMYsTq9oSeCNo0+Fm91/vHgCdGP4b 5+O28EP12Ej/qBFMsO5omys= =evPd -END PGP SIGNATURE- ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Simulate touch event with cordinate?
Are you trying to achieve something like, in the iBooks example, the user can swipe their finger to change the page or press a 'next page' button and have the same animation occur? If so then you need to write one function to handle the animation and call that in response to either a button push or a series of touch events. - (void)moveMyThingFrom:(CGPoint)a toPoint:(CGPoint)b; { // Put code here for the animation } // For button press - (IBAction)moveThingAcrossScreen:(id)sender; { CGPoint fromPoint = ...; CGPoint toPoint = ...; [self moveMyThingFrom:fromPoint toPoint:toPoint]; } // For drag events you could do something like - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; { lastPoint = ... // Value stored somewhere CGPoint newPoint = ... // Calculated from event [self moveMyThingFrom:lastPoint toPoint:toPoint]; } The main point is that you should not be performing your animations in your event handling code; this should be in separate methods that get called from your event handling code or wherever you need to call it. Is this what you were looking for? Chase On Fri, Apr 1, 2011 at 7:02 PM, Conrad Shultz con...@synthetiqsolutions.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 4/1/11 6:44 PM, Rikza Azriyan wrote: Sorry maybe you guys don't understand with my bad english.. I said UIGestureRecognizer does'n do what i want because it's for detecting/responding touch,gesture,tap etc that user did to the screen. It's for respond the user interaction to the screen... In my case, i want to make that interaction. I want to make a touch event without touching the screen, i want to make slide event without touching it Could you explain WHY you want to do this? Surely if your app takes a certain action in response to a gesture it would be easier to just trigger that action on demand. Don't know what your goal is, but at first read this sounds like the product of a very flawed application architecture. - -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFNloOfaOlrz5+0JdURAmhwAJ9tvB7kMYsTq9oSeCNo0+Fm91/vHgCdGP4b 5+O28EP12Ej/qBFMsO5omys= =evPd -END PGP SIGNATURE- ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/chaselatta%40gmail.com This email sent to chasela...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Simulate touch event with cordinate?
Thanks chase for your reply, Yes, i want to make an application like ibooks that the user can navigate the page by swipe the screen, than - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; Will respond for that swipe... But in my case, i don't want to make that swipe with my finger... I want to make that swipe by my face So that i want to implement my facetracking algorithm on my iphone 4...detecting the face by frontcamera, and give the output result as the face position cordinate. I'm going to use this cordinate as realtime dragging event on my PDF reader as if the finger swiping in my screen. As ibooks did use finger for swipe... that what i want to do chase... I hope u understand my bad english :) Thx in advance Rikza Azriyan Student of Sriwijaya University Palembang, Indonesia Sent from my iPhone Provided by Telkomsel. On Apr 2, 2011, at 9:36 AM, Chase Latta chasela...@gmail.com wrote: Are you trying to achieve something like, in the iBooks example, the user can swipe their finger to change the page or press a 'next page' button and have the same animation occur? If so then you need to write one function to handle the animation and call that in response to either a button push or a series of touch events. - (void)moveMyThingFrom:(CGPoint)a toPoint:(CGPoint)b; { // Put code here for the animation } // For button press - (IBAction)moveThingAcrossScreen:(id)sender; { CGPoint fromPoint = ...; CGPoint toPoint = ...; [self moveMyThingFrom:fromPoint toPoint:toPoint]; } // For drag events you could do something like - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; { lastPoint = ... // Value stored somewhere CGPoint newPoint = ... // Calculated from event [self moveMyThingFrom:lastPoint toPoint:toPoint]; } The main point is that you should not be performing your animations in your event handling code; this should be in separate methods that get called from your event handling code or wherever you need to call it. Is this what you were looking for? Chase On Fri, Apr 1, 2011 at 7:02 PM, Conrad Shultz con...@synthetiqsolutions.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 4/1/11 6:44 PM, Rikza Azriyan wrote: Sorry maybe you guys don't understand with my bad english.. I said UIGestureRecognizer does'n do what i want because it's for detecting/responding touch,gesture,tap etc that user did to the screen. It's for respond the user interaction to the screen... In my case, i want to make that interaction. I want to make a touch event without touching the screen, i want to make slide event without touching it Could you explain WHY you want to do this? Surely if your app takes a certain action in response to a gesture it would be easier to just trigger that action on demand. Don't know what your goal is, but at first read this sounds like the product of a very flawed application architecture. - -- Conrad Shultz Synthetiq Solutions www.synthetiqsolutions.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iD8DBQFNloOfaOlrz5+0JdURAmhwAJ9tvB7kMYsTq9oSeCNo0+Fm91/vHgCdGP4b 5+O28EP12Ej/qBFMsO5omys= =evPd -END PGP SIGNATURE- ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/chaselatta%40gmail.com This email sent to chasela...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com