Improve UI to be more HIG friendly.
[IMPROVED] Use action sheets instead of alerts when showing destructive action choices. [IMPROVED] Make tappable regions at least 44x44pt. [IMPROVED] Title/message for alert/sheets.
This commit is contained in:
parent
94c9d50a12
commit
5b65c8c6bd
2
External/Pearl
vendored
2
External/Pearl
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 546be28a52b1e56fef4a82e2bd943cfd69d6a264
|
Subproject commit 201de69bbfcbb02322aec9e5351bd23b1186dc4c
|
@ -449,7 +449,7 @@
|
|||||||
case 4: {
|
case 4: {
|
||||||
inf(@"Action: Feedback via Mail");
|
inf(@"Action: Feedback via Mail");
|
||||||
if (![MFMailComposeViewController canSendMail])
|
if (![MFMailComposeViewController canSendMail])
|
||||||
[PearlAlert showAlertWithTitle:@"Feedback"
|
[PearlAlert showAlertWithTitle:@"Sending Feedback"
|
||||||
message:
|
message:
|
||||||
@"We'd love to hear what you think!\n\n"
|
@"We'd love to hear what you think!\n\n"
|
||||||
@"Please send any comments or reports to:\n"
|
@"Please send any comments or reports to:\n"
|
||||||
@ -459,7 +459,7 @@
|
|||||||
otherTitles:nil];
|
otherTitles:nil];
|
||||||
|
|
||||||
else {
|
else {
|
||||||
[PearlAlert showAlertWithTitle:@"Feedback"
|
[PearlAlert showAlertWithTitle:@"Sending Feedback"
|
||||||
message:
|
message:
|
||||||
@"We'd love to hear what you think!\n\n"
|
@"We'd love to hear what you think!\n\n"
|
||||||
@"If you're having trouble, it may help us if you can first reproduce the problem "
|
@"If you're having trouble, it may help us if you can first reproduce the problem "
|
||||||
|
@ -618,23 +618,19 @@
|
|||||||
if (!targetedUser)
|
if (!targetedUser)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
[PearlAlert showAlertWithTitle:@"Delete Or Reset User"
|
[PearlSheet showSheetWithTitle:targetedUser.name
|
||||||
message:
|
message:nil
|
||||||
PearlString(@"Do you want to reset the master password or delete all record of the following user?\n\n%@",
|
viewStyle:UIActionSheetStyleBlackTranslucent
|
||||||
targetedUser.name)
|
tappedButtonBlock:^(UIActionSheet *sheet, NSInteger buttonIndex) {
|
||||||
viewStyle:UIAlertViewStyleDefault
|
if (buttonIndex == [sheet cancelButtonIndex])
|
||||||
initAlert:nil tappedButtonBlock:^(UIAlertView *alert, NSInteger buttonIndex) {
|
return;
|
||||||
if (buttonIndex == [alert cancelButtonIndex])
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (buttonIndex == [alert firstOtherButtonIndex]) {
|
if (buttonIndex == [sheet destructiveButtonIndex]) {
|
||||||
[[MPAppDelegate get].managedObjectContext deleteObject:targetedUser];
|
[[MPAppDelegate get].managedObjectContext deleteObject:targetedUser];
|
||||||
[[MPAppDelegate get] saveContext];
|
[[MPAppDelegate get] saveContext];
|
||||||
[self updateUsers];
|
[self updateUsers];
|
||||||
} else if (buttonIndex == [alert firstOtherButtonIndex] + 1) {
|
} else if (buttonIndex == [sheet firstOtherButtonIndex])
|
||||||
[[MPAppDelegate get] changeMasterPasswordFor:targetedUser];
|
[[MPAppDelegate get] changeMasterPasswordFor:targetedUser];
|
||||||
}
|
} cancelTitle:[PearlStrings get].commonButtonCancel destructiveTitle:@"Delete User" otherTitles:@"Reset Password", nil];
|
||||||
|
|
||||||
} cancelTitle:[PearlStrings get].commonButtonCancel otherTitles:@"Delete", @"Reset", nil];
|
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
@ -491,7 +491,7 @@ Your passwords will be AES-encrypted with your master password.</string>
|
|||||||
</connections>
|
</connections>
|
||||||
</textField>
|
</textField>
|
||||||
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" alpha="0.50000000000000011" contentMode="left" text="1" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="Iuf-np-e9C">
|
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" alpha="0.50000000000000011" contentMode="left" text="1" textAlignment="right" lineBreakMode="tailTruncation" minimumFontSize="10" id="Iuf-np-e9C">
|
||||||
<rect key="frame" x="240" y="27" width="40" height="20"/>
|
<rect key="frame" x="230" y="31" width="41" height="20"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||||
<fontDescription key="fontDescription" name="Copperplate-Bold" family="Copperplate" pointSize="17"/>
|
<fontDescription key="fontDescription" name="Copperplate-Bold" family="Copperplate" pointSize="17"/>
|
||||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
@ -500,11 +500,11 @@ Your passwords will be AES-encrypted with your master password.</string>
|
|||||||
<size key="shadowOffset" width="0.0" height="1"/>
|
<size key="shadowOffset" width="0.0" height="1"/>
|
||||||
</label>
|
</label>
|
||||||
<button opaque="NO" alpha="0.50000000000000011" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="jec-mu-nPt">
|
<button opaque="NO" alpha="0.50000000000000011" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="jec-mu-nPt">
|
||||||
<rect key="frame" x="272.5" y="18.5" width="36.5" height="36"/>
|
<rect key="frame" x="265" y="18.5" width="44" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||||
<gestureRecognizers/>
|
<gestureRecognizers/>
|
||||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||||
<inset key="contentEdgeInsets" minX="5" minY="5" maxX="5" maxY="5"/>
|
<inset key="contentEdgeInsets" minX="6" minY="6" maxX="6" maxY="6"/>
|
||||||
<state key="normal" image="icon_plus.png">
|
<state key="normal" image="icon_plus.png">
|
||||||
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
@ -518,10 +518,10 @@ Your passwords will be AES-encrypted with your master password.</string>
|
|||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
<button opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="9FS-fS-xH6">
|
<button opaque="NO" alpha="0.5" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="9FS-fS-xH6">
|
||||||
<rect key="frame" x="273" y="18.5" width="36" height="36"/>
|
<rect key="frame" x="265" y="18.5" width="44" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||||
<inset key="contentEdgeInsets" minX="5" minY="5" maxX="5" maxY="5"/>
|
<inset key="contentEdgeInsets" minX="6" minY="6" maxX="6" maxY="6"/>
|
||||||
<state key="normal" image="icon_edit.png">
|
<state key="normal" image="icon_edit.png">
|
||||||
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
@ -600,7 +600,7 @@ L4m3P4sSw0rD</string>
|
|||||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||||
</textView>
|
</textView>
|
||||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="cX2-vD-vjc">
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="cX2-vD-vjc">
|
||||||
<rect key="frame" x="259" y="5" width="32" height="32"/>
|
<rect key="frame" x="256" y="0.0" width="44" height="44"/>
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
|
||||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||||
<state key="normal" image="icon_cancel.png">
|
<state key="normal" image="icon_cancel.png">
|
||||||
@ -876,7 +876,7 @@ L4m3P4sSw0rD</string>
|
|||||||
<rect key="frame" x="10" y="28" width="260" height="60"/>
|
<rect key="frame" x="10" y="28" width="260" height="60"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||||
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="36"/>
|
<fontDescription key="fontDescription" name="Copperplate" family="Copperplate" pointSize="36"/>
|
||||||
<textInputTraits key="textInputTraits" enablesReturnKeyAutomatically="YES" secureTextEntry="YES"/>
|
<textInputTraits key="textInputTraits" enablesReturnKeyAutomatically="YES" secureTextEntry="YES"/>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="delegate" destination="Nbn-Rv-sP1" id="Y0T-cI-gF1"/>
|
<outlet property="delegate" destination="Nbn-Rv-sP1" id="Y0T-cI-gF1"/>
|
||||||
@ -1433,6 +1433,6 @@ L4m3P4sSw0rD</string>
|
|||||||
<simulatedScreenMetrics key="destination"/>
|
<simulatedScreenMetrics key="destination"/>
|
||||||
</simulatedMetricsContainer>
|
</simulatedMetricsContainer>
|
||||||
<inferredMetricsTieBreakers>
|
<inferredMetricsTieBreakers>
|
||||||
<segue reference="KIl-ZW-M7G"/>
|
<segue reference="vw4-Vd-O6q"/>
|
||||||
</inferredMetricsTieBreakers>
|
</inferredMetricsTieBreakers>
|
||||||
</document>
|
</document>
|
Loading…
Reference in New Issue
Block a user