2
0

UI fixes to do with password type button and help.

[FIXED]     Password type button goes off-screen.
This commit is contained in:
Maarten Billemont 2012-07-29 13:43:11 +02:00
parent 830dcb45ff
commit 918a240dba
2 changed files with 15 additions and 11 deletions

View File

@ -80,10 +80,13 @@
self.searchDisplayController.searchResultsDelegate = self.searchDelegate; self.searchDisplayController.searchResultsDelegate = self.searchDelegate;
self.searchDisplayController.searchResultsDataSource = self.searchDelegate; self.searchDisplayController.searchResultsDataSource = self.searchDelegate;
[self.passwordIncrementer addGestureRecognizer:[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(resetPasswordCounter:)]]; [self.passwordIncrementer addGestureRecognizer:[[UILongPressGestureRecognizer alloc] initWithTarget:self
[self.userNameContainer addGestureRecognizer:[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(editUserName:)]]; action:@selector(resetPasswordCounter:)]];
[self.userNameContainer addGestureRecognizer:[[UILongPressGestureRecognizer alloc] initWithTarget:self
action:@selector(editUserName:)]];
[self.userNameContainer addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(copyUserName:)]]; [self.userNameContainer addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(copyUserName:)]];
[self.outdatedAlertBack addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(searchOutdatedElements:)]]; [self.outdatedAlertBack addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self
action:@selector(searchOutdatedElements:)]];
self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"ui_background"]]; self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"ui_background"]];
@ -309,8 +312,9 @@
} }
if ([[MPiOSConfig get].helpHidden boolValue]) { if ([[MPiOSConfig get].helpHidden boolValue]) {
self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, self.view.bounds.size.height - 44); self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, self.view.bounds.size.height - 44 /* search bar */);
self.helpContainer.frame = CGRectSetY(self.helpContainer.frame, self.view.bounds.size.height); self.helpContainer.frame = CGRectSetY(self.helpContainer.frame,
self.view.bounds.size.height + 20 /* view moves up a bit when search appears. */);
} else { } else {
self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, 225); self.contentContainer.frame = CGRectSetHeight(self.contentContainer.frame, 225);
self.helpContainer.frame = CGRectSetY(self.helpContainer.frame, 266); self.helpContainer.frame = CGRectSetY(self.helpContainer.frame, 266);
@ -650,7 +654,7 @@
- (IBAction)searchOutdatedElements:(UITapGestureRecognizer *)sender { - (IBAction)searchOutdatedElements:(UITapGestureRecognizer *)sender {
self.searchDisplayController.searchBar.selectedScopeButtonIndex = MPSearchScopeOutdated; self.searchDisplayController.searchBar.selectedScopeButtonIndex = MPSearchScopeOutdated;
self.searchDisplayController.searchBar.searchResultsButtonSelected = YES; self.searchDisplayController.searchBar.searchResultsButtonSelected = YES;
[self.searchDisplayController.searchBar becomeFirstResponder]; [self.searchDisplayController.searchBar becomeFirstResponder];
} }
@ -873,9 +877,6 @@
} }
}]; }];
[self.searchDisplayController setActive:NO animated:YES];
self.searchDisplayController.searchBar.text = self.activeElement.name;
[[NSNotificationCenter defaultCenter] postNotificationName:MPNotificationElementUpdated object:self.activeElement]; [[NSNotificationCenter defaultCenter] postNotificationName:MPNotificationElementUpdated object:self.activeElement];
[TestFlight passCheckpoint:PearlString(MPCheckpointUseType @"_%@", self.activeElement.typeShortName)]; [TestFlight passCheckpoint:PearlString(MPCheckpointUseType @"_%@", self.activeElement.typeShortName)];
[[LocalyticsSession sharedLocalyticsSession] tagEvent:MPCheckpointUseType attributes:[NSDictionary dictionaryWithObjectsAndKeys: [[LocalyticsSession sharedLocalyticsSession] tagEvent:MPCheckpointUseType attributes:[NSDictionary dictionaryWithObjectsAndKeys:
@ -886,6 +887,9 @@
nil]]; nil]];
} }
[self.searchDisplayController setActive:NO animated:YES];
self.searchDisplayController.searchBar.text = self.activeElement.name;
[self updateAnimated:YES]; [self updateAnimated:YES];
} }

View File

@ -600,7 +600,7 @@ Your passwords will be AES-encrypted with your master password.</string>
</view> </view>
<view clipsSubviews="YES" contentMode="scaleToFill" id="61G-By-qLB" userLabel="View - Help"> <view clipsSubviews="YES" contentMode="scaleToFill" id="61G-By-qLB" userLabel="View - Help">
<rect key="frame" x="0.0" y="266" width="320" height="150"/> <rect key="frame" x="0.0" y="266" width="320" height="150"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
<subviews> <subviews>
<imageView userInteractionEnabled="NO" contentMode="bottom" image="Square-bottom.png" id="lbm-A0-3PK"> <imageView userInteractionEnabled="NO" contentMode="bottom" image="Square-bottom.png" id="lbm-A0-3PK">
<rect key="frame" x="0.0" y="0.0" width="320" height="58"/> <rect key="frame" x="0.0" y="0.0" width="320" height="58"/>