Log in or register to post comments

Display images for different target image

June 30, 2014 - 2:05am #1

I have 2 target. When scan the first target need to display image1 and scan the second target need to display image2. But image1 displaying for all the target scan. How to get trackable name and use if condition. Annotaion is the parentview.

 

if(trackable.getName(), "focusvideo"){

               dispatch_async(dispatch_get_main_queue(), ^(void) {

                 if (!annotation.superview) {

                     [self addSubview:annotation];

 UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(150, 200, 500, 500)];

                    

                    imgView.image = [UIImage imageNamed:@"video.jpg"];

                         [annotation addSubview: imgView];

    }

            });

          }

         

if(trackable.getName(), "focusbrain"){

               dispatch_async(dispatch_get_main_queue(), ^(void) {

                 if (!annotation.superview) {

                     [self addSubview:annotation];

 UIImageView *imgView = [[UIImageView allocinitWithFrame:CGRectMake(150200500500)];

                    

                    imgView.image = [UIImage imageNamed:@"brain.jpg"];

                         [annotation addSubview: imgView];

    }

            });

          }

 
Log in or register to post comments