Log in or register to post comments

How to stop alertview click ok button

June 19, 2014 - 4:30am #1

I'm displaying alertview while chips target detect only, not for all. After detecting chips target i can able to display alertview, but it keeps displaying after cancel.


int targetIndex = 0; // "stones"

        if (!strcmp(trackable.getName(), "chips"))

            targetIndex = 1;

        else if (!strcmp(trackable.getName(), "tarmac"))

            targetIndex = 2;


        if(targetIndex == 1){

       [self performSelectorOnMainThread:@selector(DisplayAlertView

     ) withObject:nil waitUntilDone:false];



- (void)DisplayAlertView
    UIAlertView *alert =
    [[UIAlertView alloc] initWithTitle:@"Info" message:@"Hello Vuforia!"
                              delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [alert show];
Log in or register to post comments