Home Ask Login Register

Developers Planet

Your answer is one click away!

texas February 2016

Walking Tour for the first time app user

I am implementing walking tour for the first time user in the application. I do not know is there a better way of doing it, but I have implemented the following approach which detects user taps via tap gesture recognition.

I wonder how could I handle if I have more than one image? Or is there any better or recommended approach for the walking tour?

- (BOOL)application:(UIApplication *)application 
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  

    UIImageView *imageView = [[UIImageView alloc] 
    initWithImage:[UIImage imageNamed:@"yourimage.png"]];
    [self.window addSubview:imageView];

     UITapGestureRecognizer * recognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
     recognizer.delegate = self;
    [imageView addGestureRecognizer:recognizer];
    imageView.userInteractionEnabled =  YES;
    self.imageView = imageView;

- (void) handleTap:(UITapGestureRecognizer *)recognize
     [self.imageView removeFromSuperView];


rptwsthi February 2016

It is totally up to you how you want yo implement this. The approach you have mentioned have nothing wrong.

For your question if you have more than one images then you can create a container view on which you can add multiple imageViews. And On Touch on that container you can show hide image view based on your sequence.

Shehzad Ali February 2016

Using PageViewController will be another good option for this. You can try this control.


Post Status

Asked in February 2016
Viewed 3,832 times
Voted 8
Answered 2 times


Leave an answer

Quote of the day: live life