Sample
Closed this issue · 2 comments
muuuh commented
Hi,
could you please provide a sample for hiding the tutorial view?
The buttons don't seem to be connected to the delegate yet (didClickOnButton1), but I would prefer an option to hide the tutorial view by swiping right like seen at https://github.com/MatthewYork/iPhone-IntroductionTutorial
Thanks and best regards
icepat commented
Hi muuuh.
The component is a UIViewController, you can easily use it within a UINavigationController (and hidding the UINavigationBar) then just present or dismiss the controller with :
[self presentViewController:<#(UIViewController *)#> animated:<#(BOOL)#> completion:<#^(void)completion#>]
[self dismissViewControllerAnimated:<#(BOOL)#> completion:<#^(void)completion#>]
The buttons are currently working with blocks, I got a pull request to implement a delegate. If you want to use blocks, just proceed like this :
// Set button 1 action.
[self.viewController setButton1Block:^(UIButton *button){
NSLog(@"Button 1 pressed.");
}];
// Set button 2 action, stop the scrolling.
__unsafe_unretained typeof(self) weakSelf = self;
[self.viewController setButton2Block:^(UIButton *button){
NSLog(@"Button 2 pressed.");
NSLog(@"Auto-scrolling stopped.");
[weakSelf.viewController stopScrolling];
}];
muuuh commented
Thank you for your explanation!