From 61bed8b29ca0ae192c35770ecaf6f4df9aa07674 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Fri, 12 Sep 2014 00:41:17 -0400 Subject: [PATCH] Fixes for positioning of avatars in different states. --- MasterPassword/ObjC/iOS/MPAvatarCell.m | 2 +- .../ObjC/iOS/MPUsersViewController.m | 1 + MasterPassword/ObjC/iOS/Storyboard.storyboard | 61 +++++++++++++------ 3 files changed, 45 insertions(+), 19 deletions(-) diff --git a/MasterPassword/ObjC/iOS/MPAvatarCell.m b/MasterPassword/ObjC/iOS/MPAvatarCell.m index 0c1db32f..828570e0 100644 --- a/MasterPassword/ObjC/iOS/MPAvatarCell.m +++ b/MasterPassword/ObjC/iOS/MPAvatarCell.m @@ -197,7 +197,7 @@ const long MPAvatarAdd = 10000; [UIView animateWithDuration:animated? 0.2f: 0 animations:^{ self.avatarImageView.transform = CGAffineTransformIdentity; }]; - [UIView animateWithDuration:animated? 0.7f: 0 delay:0 + [UIView animateWithDuration:animated? 0.5f: 0 delay:0 options:UIViewAnimationOptionOverrideInheritedDuration | UIViewAnimationOptionBeginFromCurrentState animations:^{ self.alpha = 1; diff --git a/MasterPassword/ObjC/iOS/MPUsersViewController.m b/MasterPassword/ObjC/iOS/MPUsersViewController.m index c787751b..ad93178f 100644 --- a/MasterPassword/ObjC/iOS/MPUsersViewController.m +++ b/MasterPassword/ObjC/iOS/MPUsersViewController.m @@ -287,6 +287,7 @@ typedef NS_ENUM( NSUInteger, MPActiveUserState ) { if (collectionView == self.avatarCollectionView) { MPAvatarCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:[MPAvatarCell reuseIdentifier] forIndexPath:indexPath]; + cell.contentView.frame = cell.bounds; [cell addGestureRecognizer:[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector( didLongPress: )]]; [self updateModeForAvatar:cell atIndexPath:indexPath animated:NO]; [self updateVisibilityForAvatar:cell atIndexPath:indexPath animated:NO]; diff --git a/MasterPassword/ObjC/iOS/Storyboard.storyboard b/MasterPassword/ObjC/iOS/Storyboard.storyboard index ee8d6608..4ec52333 100644 --- a/MasterPassword/ObjC/iOS/Storyboard.storyboard +++ b/MasterPassword/ObjC/iOS/Storyboard.storyboard @@ -5,6 +5,7 @@ + @@ -87,6 +88,14 @@ + @@ -97,7 +106,7 @@ - + @@ -106,18 +115,25 @@ - - - - + + + - + - + @@ -125,7 +141,7 @@ - + + + - + - + + + + + - + - + @@ -184,7 +206,7 @@ - + - - - @@ -362,9 +381,15 @@ + + + + + +