From 75c9a6b8051c50d55ee528eb13a0559709193683 Mon Sep 17 00:00:00 2001 From: Pabel Nunez L Date: Thu, 25 Aug 2016 12:01:24 -0400 Subject: [PATCH 1/2] Library is more customizable now Implemented enableContinueLabel and enableSkipButton from workshirt/WSCoachMarksView. Added lblFontSize, enableTapAction property because in my personal case i triggered every action with a timer and i dont wanted the user to tap and wanted the font to be bigger for continue label and skip button. EnableContinueLabel default = NO EnableSkipButton default = NO LblFontSize default = 16.0f --- .DS_Store | Bin 6148 -> 6148 bytes Coach Marks/DDCoachMarksView.h | 6 +++ Coach Marks/DDCoachMarksView.m | 73 ++++++++++++++++++++++++++++++++- 3 files changed, 77 insertions(+), 2 deletions(-) diff --git a/.DS_Store b/.DS_Store index daa9c9285993b5972e6cda93a337ed5d093f02d7..5aedab01910cb7999c9f05fc4838115f01929636 100644 GIT binary patch delta 70 zcmZoMXffE3&dSI*nTJJcaue$$ri~vb_p$2n<>tG%q?DEm 0 && lblContinue != nil) { + // Otherwise, remove the lbl + [lblContinue removeFromSuperview]; + lblContinue = nil; + } + } + + if (self.enableSkipButton) { + btnSkipCoach = [[UIButton alloc] initWithFrame:(CGRect){{lblContinueWidth, self.bounds.size.height - 30.0f}, {btnSkipWidth, 30.0f}}]; + [btnSkipCoach addTarget:self action:@selector(skipCoach) forControlEvents:UIControlEventTouchUpInside]; + [btnSkipCoach setTitle:@"Skip" forState:UIControlStateNormal]; + btnSkipCoach.titleLabel.font = [UIFont boldSystemFontOfSize:self.LblFontSize]; + btnSkipCoach.alpha = 0.0f; + btnSkipCoach.tintColor = [UIColor whiteColor]; + [self addSubview:btnSkipCoach]; + [UIView animateWithDuration:0.3f delay:1.0f options:0 animations:^{ + btnSkipCoach.alpha = 1.0f; + } completion:nil]; + } } #pragma mark - Swipe Animation From ff6586b124bfd39d49657c6375697236f2465278 Mon Sep 17 00:00:00 2001 From: Pabel Nunez L Date: Thu, 25 Aug 2016 12:01:24 -0400 Subject: [PATCH 2/2] Library is more customizable now Implemented enableContinueLabel and enableSkipButton from workshirt/WSCoachMarksView. Added lblFontSize, enableTapAction property because in my personal case i triggered every action with a timer and i dont wanted the user to tap and wanted the font to be bigger for continue label and skip button. Added a stop method. [self.coachMarksView stop]; EnableContinueLabel default = NO EnableSkipButton default = NO LblFontSize default = 16.0f --- .DS_Store | Bin 6148 -> 6148 bytes Coach Marks/DDCoachMarksView.h | 6 +++ Coach Marks/DDCoachMarksView.m | 73 ++++++++++++++++++++++++++++++++- 3 files changed, 77 insertions(+), 2 deletions(-) diff --git a/.DS_Store b/.DS_Store index daa9c9285993b5972e6cda93a337ed5d093f02d7..5aedab01910cb7999c9f05fc4838115f01929636 100644 GIT binary patch delta 70 zcmZoMXffE3&dSI*nTJJcaue$$ri~vb_p$2n<>tG%q?DEm 0 && lblContinue != nil) { + // Otherwise, remove the lbl + [lblContinue removeFromSuperview]; + lblContinue = nil; + } + } + + if (self.enableSkipButton) { + btnSkipCoach = [[UIButton alloc] initWithFrame:(CGRect){{lblContinueWidth, self.bounds.size.height - 30.0f}, {btnSkipWidth, 30.0f}}]; + [btnSkipCoach addTarget:self action:@selector(skipCoach) forControlEvents:UIControlEventTouchUpInside]; + [btnSkipCoach setTitle:@"Skip" forState:UIControlStateNormal]; + btnSkipCoach.titleLabel.font = [UIFont boldSystemFontOfSize:self.LblFontSize]; + btnSkipCoach.alpha = 0.0f; + btnSkipCoach.tintColor = [UIColor whiteColor]; + [self addSubview:btnSkipCoach]; + [UIView animateWithDuration:0.3f delay:1.0f options:0 animations:^{ + btnSkipCoach.alpha = 1.0f; + } completion:nil]; + } } #pragma mark - Swipe Animation