diff --git a/MasterPassword/ObjC/iOS/MPAvatarCell.m b/MasterPassword/ObjC/iOS/MPAvatarCell.m index 391fcee8..f9dbb213 100644 --- a/MasterPassword/ObjC/iOS/MPAvatarCell.m +++ b/MasterPassword/ObjC/iOS/MPAvatarCell.m @@ -26,9 +26,10 @@ const long MPAvatarAdd = 10000; @property(strong, nonatomic) IBOutlet UILabel *nameLabel; @property(strong, nonatomic) IBOutlet UIView *nameContainer; @property(strong, nonatomic) IBOutlet UIImageView *spinner; -@property(strong, nonatomic) IBOutlet NSLayoutConstraint *nameCenterConstraint; +@property(strong, nonatomic) IBOutlet NSLayoutConstraint *nameToCenterConstraint; @property(strong, nonatomic) IBOutlet NSLayoutConstraint *avatarSizeConstraint; -@property(strong, nonatomic) IBOutlet NSLayoutConstraint *avatarTopConstraint; +@property(strong, nonatomic) IBOutlet NSLayoutConstraint *avatarToTopConstraint; +@property(strong, nonatomic) IBOutlet NSLayoutConstraint *avatarRaisedConstraint; @end @@ -184,8 +185,9 @@ const long MPAvatarAdd = 10000; case MPAvatarModeLowered: { self.avatarSizeConstraint.constant = self.avatarImageView.image.size.height; - self.avatarTopConstraint.priority = UILayoutPriorityDefaultLow; - self.nameCenterConstraint.priority = UILayoutPriorityDefaultLow; + self.avatarRaisedConstraint.priority = UILayoutPriorityDefaultLow; + self.avatarToTopConstraint.priority = UILayoutPriorityDefaultLow; + self.nameToCenterConstraint.priority = UILayoutPriorityDefaultLow; self.nameContainer.alpha = self.visibility; self.nameContainer.backgroundColor = [UIColor clearColor]; self.avatarImageView.alpha = self.visibility / 0.7f + 0.3f; @@ -194,8 +196,9 @@ const long MPAvatarAdd = 10000; } case MPAvatarModeRaisedButInactive: { self.avatarSizeConstraint.constant = self.avatarImageView.image.size.height; - self.avatarTopConstraint.priority = UILayoutPriorityDefaultLow; - self.nameCenterConstraint.priority = UILayoutPriorityDefaultLow; + self.avatarRaisedConstraint.priority = UILayoutPriorityDefaultHigh; + self.avatarToTopConstraint.priority = UILayoutPriorityDefaultLow; + self.nameToCenterConstraint.priority = UILayoutPriorityDefaultLow; self.nameContainer.alpha = self.visibility; self.nameContainer.backgroundColor = [UIColor clearColor]; self.avatarImageView.alpha = 0; @@ -204,8 +207,9 @@ const long MPAvatarAdd = 10000; } case MPAvatarModeRaisedAndActive: { self.avatarSizeConstraint.constant = self.avatarImageView.image.size.height; - self.avatarTopConstraint.priority = UILayoutPriorityDefaultLow; - self.nameCenterConstraint.priority = UILayoutPriorityDefaultHigh; + self.avatarRaisedConstraint.priority = UILayoutPriorityDefaultHigh; + self.avatarToTopConstraint.priority = UILayoutPriorityDefaultLow; + self.nameToCenterConstraint.priority = UILayoutPriorityDefaultHigh; self.nameContainer.alpha = self.visibility; self.nameContainer.backgroundColor = [UIColor blackColor]; self.avatarImageView.alpha = 1; @@ -214,8 +218,9 @@ const long MPAvatarAdd = 10000; } case MPAvatarModeRaisedAndHidden: { self.avatarSizeConstraint.constant = self.avatarImageView.image.size.height; - self.avatarTopConstraint.priority = UILayoutPriorityDefaultLow; - self.nameCenterConstraint.priority = UILayoutPriorityDefaultHigh; + self.avatarRaisedConstraint.priority = UILayoutPriorityDefaultHigh; + self.avatarToTopConstraint.priority = UILayoutPriorityDefaultLow; + self.nameToCenterConstraint.priority = UILayoutPriorityDefaultHigh; self.nameContainer.alpha = 0; self.nameContainer.backgroundColor = [UIColor blackColor]; self.avatarImageView.alpha = 0; @@ -224,8 +229,9 @@ const long MPAvatarAdd = 10000; } case MPAvatarModeRaisedAndMinimized: { self.avatarSizeConstraint.constant = 36; - self.avatarTopConstraint.priority = UILayoutPriorityDefaultHigh; - self.nameCenterConstraint.priority = UILayoutPriorityDefaultHigh; + self.avatarRaisedConstraint.priority = UILayoutPriorityDefaultLow; + self.avatarToTopConstraint.priority = UILayoutPriorityDefaultHigh; + self.nameToCenterConstraint.priority = UILayoutPriorityDefaultHigh; self.nameContainer.alpha = 0; self.nameContainer.backgroundColor = [UIColor blackColor]; self.avatarImageView.alpha = 1; @@ -234,8 +240,8 @@ const long MPAvatarAdd = 10000; } } [self.avatarSizeConstraint apply]; - [self.avatarTopConstraint apply]; - [self.nameCenterConstraint apply]; + [self.avatarToTopConstraint apply]; + [self.nameToCenterConstraint apply]; // Avatar selection and spinner. if (self.mode != MPAvatarModeRaisedAndMinimized && (self.selected || self.highlighted) && !self.spinnerActive) diff --git a/MasterPassword/ObjC/iOS/MPUsersViewController.m b/MasterPassword/ObjC/iOS/MPUsersViewController.m index 203393f1..50af9c85 100644 --- a/MasterPassword/ObjC/iOS/MPUsersViewController.m +++ b/MasterPassword/ObjC/iOS/MPUsersViewController.m @@ -128,6 +128,7 @@ typedef NS_ENUM(NSUInteger, MPActiveUserState) { usingMasterPassword:self.entryField.text]; [[NSOperationQueue mainQueue] addOperationWithBlock:^{ + self.entryField.text = @""; [self selectedAvatar].spinnerActive = NO; if (!signedIn) { @@ -191,6 +192,7 @@ typedef NS_ENUM(NSUInteger, MPActiveUserState) { BOOL signedIn = [[MPiOSAppDelegate get] signInAsUser:user saveInContext:context usingMasterPassword:masterPassword]; [[NSOperationQueue mainQueue] addOperationWithBlock:^{ + self.entryField.text = @""; [self selectedAvatar].spinnerActive = NO; if (!signedIn) { diff --git a/MasterPassword/ObjC/iOS/MasterPassword-iOS.xcodeproj/project.pbxproj b/MasterPassword/ObjC/iOS/MasterPassword-iOS.xcodeproj/project.pbxproj index aef87614..879ba5e5 100644 --- a/MasterPassword/ObjC/iOS/MasterPassword-iOS.xcodeproj/project.pbxproj +++ b/MasterPassword/ObjC/iOS/MasterPassword-iOS.xcodeproj/project.pbxproj @@ -1328,6 +1328,7 @@ DACA29BB1705E2DE002C6C22 /* UIColor+HSV.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+HSV.m"; sourceTree = ""; }; DAD3127115528CD200A3F9ED /* libLocalytics.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libLocalytics.a; sourceTree = BUILT_PRODUCTS_DIR; }; DAD312C01552A20800A3F9ED /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; + DADBB55918DB0CFC00D099FE /* keyboard-dark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "keyboard-dark@2x.png"; sourceTree = ""; }; DADEF4061810D2940052CA3E /* love-lyndir.button.green.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "love-lyndir.button.green.png"; sourceTree = ""; }; DADEF4071810D2940052CA3E /* love-lyndir.button.green@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "love-lyndir.button.green@2x.png"; sourceTree = ""; }; DADEF4081810D2940052CA3E /* love-lyndir.button.grey.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "love-lyndir.button.grey.png"; sourceTree = ""; }; @@ -1763,6 +1764,7 @@ DABD360D1711E29400CF925C /* Media */ = { isa = PBXGroup; children = ( + DADBB55918DB0CFC00D099FE /* keyboard-dark@2x.png */, DA945C8617E3F3FD0053236B /* Images.xcassets */, DA5E5C3C1723681B003798D8 /* Square-bottom.png */, DA5A09E8171BB0F7005284AB /* unlocked.png */, diff --git a/MasterPassword/ObjC/iOS/Storyboard.storyboard b/MasterPassword/ObjC/iOS/Storyboard.storyboard index 0be711be..a68d81f0 100644 --- a/MasterPassword/ObjC/iOS/Storyboard.storyboard +++ b/MasterPassword/ObjC/iOS/Storyboard.storyboard @@ -16,11 +16,11 @@ - + - + @@ -32,32 +32,29 @@ - + - - - - + - + - + - + - + @@ -66,7 +63,7 @@ - + - + - + @@ -125,27 +124,27 @@ - + - - +