diff --git a/.gitmodules b/.gitmodules index 5e9ec349..32520cec 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "External/iCloudStoreManager"] path = External/iCloudStoreManager url = git://github.com/lhunath/iCloudStoreManager.git +[submodule "External/FontReplacer"] + path = External/FontReplacer + url = git://github.com/0xced/FontReplacer.git diff --git a/External/FontReplacer b/External/FontReplacer new file mode 160000 index 00000000..4e3dea08 --- /dev/null +++ b/External/FontReplacer @@ -0,0 +1 @@ +Subproject commit 4e3dea08702906fc5d51c8b75dda5da29c545a74 diff --git a/MasterPassword/iOS/MPGuideViewController.h b/MasterPassword/iOS/MPGuideViewController.h index 215ebf6b..a7e4e656 100644 --- a/MasterPassword/iOS/MPGuideViewController.h +++ b/MasterPassword/iOS/MPGuideViewController.h @@ -8,9 +8,10 @@ #import -@interface MPGuideViewController : UIViewController +@interface MPGuideViewController : UIViewController @property (weak, nonatomic) IBOutlet UIScrollView *scrollView; +@property (weak, nonatomic) IBOutlet UIPageControl *pageControl; - (IBAction)close; diff --git a/MasterPassword/iOS/MPGuideViewController.m b/MasterPassword/iOS/MPGuideViewController.m index 6308ce6f..949a9263 100644 --- a/MasterPassword/iOS/MPGuideViewController.m +++ b/MasterPassword/iOS/MPGuideViewController.m @@ -11,6 +11,7 @@ @implementation MPGuideViewController @synthesize scrollView; +@synthesize pageControl; - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { @@ -48,6 +49,7 @@ - (void)viewDidUnload { [self setScrollView:nil]; + [self setPageControl:nil]; [super viewDidUnload]; } @@ -56,4 +58,12 @@ [self.presentingViewController dismissModalViewControllerAnimated:YES]; } +- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView_ { + + NSInteger page = (NSInteger)(self.scrollView.contentOffset.x / self.scrollView.bounds.size.width); + + self.pageControl.currentPage = page; + self.pageControl.hidden = (page == self.pageControl.numberOfPages - 1); +} + @end diff --git a/MasterPassword/iOS/MPMainViewController.m b/MasterPassword/iOS/MPMainViewController.m index 83883973..d9c1fe42 100644 --- a/MasterPassword/iOS/MPMainViewController.m +++ b/MasterPassword/iOS/MPMainViewController.m @@ -68,6 +68,9 @@ - (void)viewDidLoad { + self.resetPasswordCounterGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(resetPasswordCounter:)]; + [self.passwordIncrementer addGestureRecognizer:self.resetPasswordCounterGesture]; + self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"ui_background"]]; self.contentField.font = [UIFont fontWithName:@"Exo-Black" size:self.contentField.font.pointSize]; diff --git a/MasterPassword/iOS/MPUnlockViewController.m b/MasterPassword/iOS/MPUnlockViewController.m index f3d1a943..02031e3c 100644 --- a/MasterPassword/iOS/MPUnlockViewController.m +++ b/MasterPassword/iOS/MPUnlockViewController.m @@ -624,7 +624,7 @@ tappedButtonBlock:^(UIActionSheet *sheet, NSInteger buttonIndex) { if (buttonIndex == [sheet cancelButtonIndex]) return; - + if (buttonIndex == [sheet destructiveButtonIndex]) { [[MPAppDelegate get].managedObjectContext deleteObject:targetedUser]; [[MPAppDelegate get] saveContext]; diff --git a/MasterPassword/iOS/MainStoryboard_iPhone.storyboard b/MasterPassword/iOS/MainStoryboard_iPhone.storyboard index 7b6d1e31..de7b085e 100644 --- a/MasterPassword/iOS/MainStoryboard_iPhone.storyboard +++ b/MasterPassword/iOS/MainStoryboard_iPhone.storyboard @@ -68,7 +68,7 @@