Custom UIView not receiving touch events for fast mouse clicks in simulator

I'm having a problem in the simulator where if I click fast in a UIView inside a table cell that is setup to receive touch events, it doesn't receive them. But if I click slow (holding down the button for a little bit) the view gets the touch events. I can't test it on the device. Is this a known problem in the simulator?
Thanks.

Hi George,
Thanks a lot for your quick response and jumping to help.
I am so frustrated that I did not get touch event for the custom cell.
I also tried your solution for a custom UIImageView, I put the codes of PhotoView.h, PhotoView.m and TestTouchAppDelegate.m here: Please help to look into it for me.
// PhotoView.h
// Molinker
// Created by Victor on 6/18/08.
// Copyright 2008 _MyCompanyName_. All rights reserved.
#import <UIKit/UIKit.h>
@interface PhotoView : UIImageView {
CGPoint touchPoint1;
CGPoint touchPoint2;
@property (nonatomic) CGPoint touchPoint1;
@property (nonatomic) CGPoint touchPoint2;
@end
// PhotoView.m
// Molinker
// Created by Victor on 6/18/08.
// Copyright 2008 _MyCompanyName_. All rights reserved.
#import "PhotoView.h"
@implementation PhotoView
@synthesize touchPoint1;
@synthesize touchPoint2;
- (id)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
// Initialization code
self.userInteractionEnabled = YES;
return self;
- (void)drawRect:(CGRect)rect {
// Drawing code
// Handles the start of a touch
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
UITouch *touch = [touches anyObject];
touchPoint1 = [touch locationInView:self];
// Handles the end of a touch event.
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
UITouch *touch = [touches anyObject];
touchPoint2 = [touch locationInView:self];
if(touchPoint1.x>touchPoint2.x)
//move Left
NSLog(@"Move Left");
if(touchPoint1.x<touchPoint2.x)
//move Right
NSLog(@"Move Right");
- (void)dealloc {
[super dealloc];
@end
// TestTouchAppDelegate.m
// TestTouch
// Created by Victor on 6/17/08.
// Copyright _MyCompanyName_ 2008. All rights reserved.
#import "TestTouchAppDelegate.h"
#import "RootViewController.h"
#import "PhotoView.h"
@implementation TestTouchAppDelegate
@synthesize window;
@synthesize navigationController;
- (id)init {
if (self = [super init]) {
return self;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Configure and show the window
//[window addSubview:[navigationController view]];
UIImage *myImage= [UIImage imageNamed: @"scene1.jpg"];
CGRect frame = CGRectMake (0, 20, 300, 400);
PhotoView *myImageView1 = [[UIImageView alloc ] initWithFrame:frame];
myImageView1.userInteractionEnabled = YES;
myImageView1.image = myImage;
[window addSubview:myImageView1];
[window makeKeyAndVisible];
- (void)applicationWillTerminate:(UIApplication *)application {
// Save data if appropriate
- (void)dealloc {
[navigationController release];
[window release];
[super dealloc];
@end
Message was edited by: Victor Zhang

Similar Messages

  • Not Receiving Sync Event

    Hello, All!!!
    I am creating one Application with the FMS 3.
    I am creating a connection on the FMS 3.
    I can see that user is connected to the Flash Media Server3.
    But I am unable to receiving the Event of the Sync of the
    Remote Shared Object.
    Even I have tried the documentation Sample named
    "SharedBalls" Application of the FMS.
    Even in this application I am not Receiving Sync
    Event.
    I am using Flash Prof CS4 and Windows 7.
    Help me to solve this...
    Thanks in Advance.....

    Hi,
    Using the same application which you have mentioned, i am able to get the sync event triggered at the client side. But i tried in WIndows XP as client. Can you pls give me the exact player version which you are publishing and the flash player associated with the Flash CS4. Which version of FMS are you using?
    Regards,
    Janaki L

  • Did not receive activation code for lightroom purchase via email

    did not receive activation code for lightroom purchase via email

    Cloud programs do not use serial numbers... you log in to your Cloud account to download & install & activate
    Some general information
    http://www.adobe.com/products/creativecloud/faq.html
    http://helpx.adobe.com/creative-cloud/help/install-apps.html to install or uninstall
    http://forums.adobe.com/community/download_install_setup/creative_cloud_faq
    what is http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html
    Cloud Getting Started https://helpx.adobe.com/creative-cloud/topics/getting-started.html

  • Not receiving verification email for Apple ID very frustrating

    Not receiving verification email for Apple ID very frustrating

    Hello Seahawks2014,
    Thanks for using Apple Support Communities.
    I'd like you to please take a look at the article below for this issue where you have not yet received your Apple ID verification email.
    If you didn't receive your verification or reset email - Apple Support
    Take care and go Hawks!
    Alex H.

  • Not receiving verification email for Apple ID

    Not receiving verification email for Apple ID

    Come on apple this issue is been ongoing for lots of your customers and no response or answers

  • I do not receive verification email for changing my iCloud email address

    i would like to change my iCloud email address e.g.   change from: [email protected], to: [email protected]
    I do not receive verification email for changing my iCloud email address, even though it says verification email sent.
    I also tried the "forgot apple ID" option to change it that way, i received an email but it was for resetting my password.
    is there anyway i can change it?

    Hello, skengzz. 
    Thank you for visiting Apple Support Communities.
    I see you are experiencing an issue receiving the verification email.  Here are a couple articles that will help you with this.  Make sure to also check your junk folder on your mail account for this email.
    If you didn't receive your Apple ID verification or reset email
    http://support.apple.com/kb/TS5404
    Apple ID: Contacting Apple for help with your Apple ID
    http://support.apple.com/kb/HT5699
    Cheers,
    Jason H.

  • Not receiving Email authentication for apple id..

    I was helping my mom create and apple id for her all ne Ipad and we are not receiving Email authentication for apple id.. Security question is being answered correctly but said that "The authentication information provided does not match our records. Please verify your personal information and try again"
    We have already created to apple ids from 2 different email address and the issue is still the same.
    <Email Edited by Host>

    Do you have a rescue email address on the account ? If you do then you've checked the inbox and spam folder on that email account as well ? If it's not there either, and you've tried requesting the reset email again, then you could try contacting Support in your country and see if they can re-enable the account for you.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699

  • Hi, my apple ID verification email does not contain the link for me to click in order to verify my account. Re-submitting has not worked, what can i do to verify/activate my account

    Hi, my apple ID verification email does not contain the link for me to click in order to verify my account. Re-submitting has not worked, what can i do to verify/activate my account in order to access Icloud?

    If you want to change your iCloud ID or password on your phone go to Settings>iCloud and tap Delete Account, then sign back in with your updated information.  Note: this only deletes the account and any synced data from your phone, not from iCloud.  Provided you are signing back into the same account and not changing accounts it will be synced back to your device when you sign back in.

  • Wait for a mouse click

    Really need help with this one. I'm writing a program to simulate a Risk game and I need to write a method to make two countries neighbors, which would be done by adding each the neighbor country to each country's neighbor's array. To do this, I will need to click on the country, click on the map and then click on the other country. My method gets the country's name but how do I tell it to wait for a mouse click before trying to get the second country's name???? I've tried everything but to no avail. Any help would be appreciated.

    Some object has to be made a mouse listener for the components that are representing countries (I guess there are multiple of these) and the map.
    It should have a variable to represent first country clicked on - a variable that is initially null. It will need another variable to store the information it obtains from the click on the map (location, or whatever). It responds more or less as follows:
    Cick on country:
    Is firstCountry null?
        If so make firstCountry the country that was clicked on and finish
        If not, do we have mapInfo?
            If so use firstCountry, the country that was clicked on and mapInfo to update the neightbour list. Then make mapInfo and firstCountry null. Then finish.
            If not, just finish (because we are waiting for a click on the map).
    Click on map:
    Is firstCountry null?
        If so, just finish (because we are waiting to start the process with a click on a country).
        If not, extract the information from the map and place in mapInfo. Then finish.
    As you can see "waiting" in a GUI is quite a complex business - nothing really pauses, rather it continues as usual until an event of the right "type" occurs. The listener maintains enough "state" (information) to know what it is listening for and to remember necessary information that it has heard and will use later.
    This is somewhat general. It is difficult to be more specific unless you post some code. It should not be pages of GUI code - just enough to illustrate the task of three clicks and an action.

  • How to select a row in JTable for right mouse click ?

    Hi All,
    I need to select a row on JTable for right mouse click ?
    Can any one help me ?
    Thanks a lot.
    Seelam.

    Got solution...
    tabel.addRowSelectionInterval(..) works.
    thanks.

  • Macbook Pro Retina (July 2014) will not register TOUCH events when going through the AIR DEBUG LAUNCHER for MOBILE

    I recently purchased a MACBOOK PRO with a retina screen and have started to transition to it as a primary work computer.
    I have a game that is built on another Macbook Pro (non retina) that works fine in the AIR debug launcher for mobile but when I launch it from the RETINA device, the touch events seem to not register correctly.
    Has anyone else experienced this issue?

    To further clarify, it appears the touch simulator is cutting everything in half, maybe because of the pixel density?

  • Not receiving COMPLETE event in URLLoader

    Hi:
    I'm querying a web application in a remote server through XML files and receiving answers in the same file format. Until now, sometimes I received a connection error:
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://server/Services/startSesion.com
        at reg_jugadores_fla::MainTimeline/queryGQ()
        at reg_jugadores_fla::MainTimeline/reg_jugadores_fla::frame1()
    When this occurs, trying to access the services through a web browser, there's a test page where you can try queries, returns a "500 Internal server error". I managed that problem adding a listener to catch the error:
    xmlSendLoad.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
    But since yesterday I can't connect anymore using Flash while it's possible to access the test page. I'm not able to talk to any support guy as the company is closed for vacations! I added listeners to try to know what's happening and this is the result in the output window:
    openHandler: [Event type="open" bubbles=false cancelable=false eventPhase=2]
    progressHandler loaded:154 total: 154
    httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=200]
    AFAIK, status=200 means OK but why the COMPLETE event isn't dispatched?. So, is there anything I can do or just wait until the tech guys return from the beach?
    Thanks in advance
    queryGQ(sessionURL,sessionQS);  // Start session
    stop();
    function queryGQ(url:String,qs:String):void {
    var serviceURL:URLRequest = new URLRequest("http://server/Services/"+url);
    serviceURL.data = qs;
    serviceURL.contentType = "text/xml";
    serviceURL.method = URLRequestMethod.POST;
    var xmlSendLoad:URLLoader = new URLLoader();
    configureListeners(xmlSendLoad);
    xmlSendLoad.load(serviceURL);
    function configureListeners(dispatcher:IEventDispatcher):void {
    dispatcher.addEventListener(Event.COMPLETE, loadXML);
    dispatcher.addEventListener(Event.OPEN, openHandler);
    dispatcher.addEventListener(ProgressEvent.PROGRESS, progressHandler);
    dispatcher.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
    dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
    dispatcher.addEventListener(IOErrorEvent.IO_ERROR, catchIOError);
    function openHandler(event:Event):void {
    trace("openHandler: " + event);
    function progressHandler(event:ProgressEvent):void {
    trace("progressHandler loaded:" + event.bytesLoaded + " total: " + event.bytesTotal);
    function securityErrorHandler(event:SecurityErrorEvent):void {
    trace("securityErrorHandler: " + event);
    function httpStatusHandler(event:HTTPStatusEvent):void {
    trace("httpStatusHandler: " + event);
    function ioErrorHandler(event:IOErrorEvent):void {
    trace("ioErrorHandler: " + event);

    Hugo,
    View may not fire events. View may call method on other controller (component / custom) and this controller fires event.
    You are absolutely right: in WD only instantiated controllers receives the event, event itself does not cause controller instantiation.
    The only controller that is always instantiated is component controller.
    Custom controllers instantiated on demand when their context is accessed or user-defined method called.
    As far as view may not have externally visible context nodes and methods (you may not add view controller as required to other one and use nodes/methods of view), the only time when view is instantiated is when it get visible for first time.
    To solve your problem, try the following:
    1. Save event parameters to component controller context node element before firing event.
    2. Create mapped node in target view and set node from controller as source.
    3. In wdDoInit of target view insert the following code:
    wdThis.<eventHandlerName>(
    null, //no wdEvent
    wdConext.current<NameOfMappedNode>Element().get<NameOfParamA>(),
    wdConext.current<NameOfMappedNode>Element().get<NameOfParamB>(),
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Not Receiving Extra 10% for trade in's when I do it in store

    The last time I traded games in, I did not receive the extra 10% trade in credit.  The store's customer service (Christiansburg, VA store) said there was nothing they could do about it and told me to contact Best Buy customer service.  After several hours of being transferred between departments, I finally gave up and got on this website.  I private messaged someone from support here, and they were able to resolve the issue by adding the appropriate points to my account that I should have received plus the extra bonus that I should have received.  I recently traded in a game today and there is still no extra 10% being given to the trade in.  I gave them my phone number and email that the account is tied to, but it still is not showing up in my transaction history and I am not receiving the bonus nor the points that I should have received.  I would like someone to help me get the extra 10% I was due on the trade in ($40 trade in so $4 bonus, plus the points that I should have gotten for it), and I would especially like someone to help me figure out why this store seems incapable of doing the trade-in properly.  The store does not have a dedicated register in the gaming section and trade-ins have to be done at the customer service counter, not sure if this is the problem or not.  I love the prices that BB gives for their trade-in's, but if this issue persists I will have to stop trading in and shopping for my games there because this is getting too frustrating to have to deal wth everytime I trade in games.  Any help would be appreciated, thanks.

    Hey gang,
    Like radiantbc mentioned, your My Best Buy membership number does need to be scanned/entered in order for Gamers' Club benefits to be applied to any given trade-in. If the three of you have any recent trades where this may not have been done, I'd invite you to send me a private message -- I'd be glad to review them and make sure any applicable trade-in bonuses are properly applied.
    To send me a private message, simply sign into the forum and then click on either the link in my signature below or the letter icon in the upper right-hand corner of the page.
    Aaron|Social Media Specialist | Best Buy® Corporate
     Private Message

  • Not received skype credit for july month

    Hi, i have subscribed for 120 mins for 3 months.I got 120 minutes for may and june months.I have to get 120 min on  july 15th,2015, still i did not receive.

    Hi!Am sorry to hear about the trouble with your subscripton.  If you could please contact Skype customer service then they can help look into the matter.

  • TS3899 Not receiving push notifications for exchange email account since the IOS 8 update

    I Am not receiving exchange email push notifications since the IOS 8 update for iPhone 5s

    Hey TH7279,
    Thanks for the question. What happens when you attempt to send mail? Do you receive an error message? If so, check out the following resource for helpful information on common error messages:
    Get help with Mail on iPhone, iPad, and iPod touch - Apple Support
    http://support.apple.com/en-us/ts3899
    Thanks,
    Matt M.

Maybe you are looking for

  • Can't find music that is supposed to be available

    I don't know if I'm losing my mind, but two weeks ago when I did a search in the iTunes Music Store for Frank Zappa, about 20 different albums came up that were available for purchase. Yesterday when I went in to download some of this music, the sear

  • Downloading adobe x pro

    Where can I download adobe x pro?

  • Help to Salvage Sent Emails

    I was wondering if someone would be able to help me? I've got an over-sized sent mailbox which displayed the message, go online to download from server. I have read several articles such as: http://docs.info.apple.com/article.html?artnum=25812 http:/

  • Custom scrolller - issue with multiple objects....

    Hi, I'm developing a very simple custom scroller as a proof of concept. The idea is to have a background image(content_mc), lay multiple objects(myContent[i]) on top of the image, and scroll them all as a cohesive unit. However, I can not scroll myCo

  • HT1338 is it normal to take a long time to download OS X Lion?

    it is taking a very long time to download OS X Lion.  How long should it take?