iOS 8 Fixups

* ContactsUI framework is not available on ios<9.
  And it never was, so this framework should not be "required".

* Fix conversation settings title font on ios8

* Fix fingerprint not displaying on ios8

* ios8 safety number indented on third line.

* Fix glitchy table cell animation (not ios8 specific)

  The defaut slide-under animation only looks good if you're using a
  standard table cell height, but our duration slider is taller than the
  rest of the table's cells.

  Plus add a little bottom padding to the slider cell

// FREEBIE
pull/1/head
Michael Kirk 9 years ago
parent 2edd2b8f81
commit b95112356c

@ -404,7 +404,7 @@
B69CD25119773E79005CE69A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B69CD25019773E79005CE69A /* XCTest.framework */; };
B6A3EB4B1A423B3800B2236B /* TSPhotoAdapter.m in Sources */ = {isa = PBXBuildFile; fileRef = B6A3EB4A1A423B3800B2236B /* TSPhotoAdapter.m */; };
B6B1013C196D213F007E3930 /* SignalKeyingStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B1013B196D213F007E3930 /* SignalKeyingStorage.m */; };
B6B226971BE4B7D200860F4D /* ContactsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6B226961BE4B7D200860F4D /* ContactsUI.framework */; };
B6B226971BE4B7D200860F4D /* ContactsUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B6B226961BE4B7D200860F4D /* ContactsUI.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
B6B9ECFC198B31BA00C620D3 /* PushManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B6B9ECFB198B31BA00C620D3 /* PushManager.m */; };
B6BADBE71B88D1AC0086A80D /* LockInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = B6BADBE61B88D1AC0086A80D /* LockInteractionController.m */; };
B6C6AE551A305ED1006BAF8F /* redphone.cer in Resources */ = {isa = PBXBuildFile; fileRef = B6C6AE531A305ED1006BAF8F /* redphone.cer */; };

@ -38,7 +38,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>2.6.0.9</string>
<string>2.6.0.10</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LOGS_EMAIL</key>

@ -191,7 +191,7 @@
<constraints>
<constraint firstAttribute="height" constant="70" id="k9r-Fg-1QJ"/>
</constraints>
<fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="24"/>
<fontDescription key="fontDescription" name="Menlo-Regular" family="Menlo" pointSize="23"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
@ -318,7 +318,7 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+13235551234" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tmV-r0-09O" userLabel="Signal ID">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+1 323-555-1234" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tmV-r0-09O" userLabel="Signal ID">
<fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
@ -405,11 +405,11 @@
<outlet property="accessoryView" destination="0dO-mx-W3I" id="1np-R6-rf7"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="84" id="3dL-aW-P1A">
<rect key="frame" x="0.0" y="188" width="375" height="84"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="88" id="3dL-aW-P1A">
<rect key="frame" x="0.0" y="188" width="375" height="88"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="3dL-aW-P1A" id="2a2-Po-p8O">
<frame key="frameInset" width="375" height="83"/>
<frame key="frameInset" width="375" height="87"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="table_ic_hourglass_empty" translatesAutoresizingMaskIntoConstraints="NO" id="X7n-1t-1Q7">
@ -446,7 +446,7 @@
<constraint firstItem="X7n-1t-1Q7" firstAttribute="trailing" secondItem="4Hn-9p-qsR" secondAttribute="leading" constant="-22" id="BIH-vZ-UBx"/>
<constraint firstItem="atL-Pg-VhA" firstAttribute="leading" secondItem="4Hn-9p-qsR" secondAttribute="trailing" constant="22" id="Bbq-jp-v8d"/>
<constraint firstAttribute="trailingMargin" secondItem="atL-Pg-VhA" secondAttribute="trailing" id="JtZ-TH-VqO"/>
<constraint firstAttribute="bottomMargin" secondItem="4Hn-9p-qsR" secondAttribute="bottom" id="OrV-vw-IeD"/>
<constraint firstAttribute="bottomMargin" secondItem="4Hn-9p-qsR" secondAttribute="bottom" constant="4" id="OrV-vw-IeD"/>
<constraint firstItem="atL-Pg-VhA" firstAttribute="centerY" secondItem="4Hn-9p-qsR" secondAttribute="centerY" id="SNj-vr-psP"/>
<constraint firstAttribute="trailingMargin" secondItem="c6Q-rV-1LO" secondAttribute="trailing" id="Td0-xm-0jB"/>
<constraint firstItem="4Hn-9p-qsR" firstAttribute="top" secondItem="c6Q-rV-1LO" secondAttribute="bottom" constant="8" id="cFF-k2-V3P"/>
@ -460,7 +460,7 @@
<tableViewSection headerTitle="Group Management" id="z5m-Fe-GK8">
<cells>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="NxZ-wa-xV9" style="IBUITableViewCellStyleDefault" id="XHr-b6-Gvn" userLabel="Update Group">
<rect key="frame" x="0.0" y="328" width="375" height="44"/>
<rect key="frame" x="0.0" y="333" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="XHr-b6-Gvn" id="Epj-vT-UYL">
<frame key="frameInset" width="342" height="43"/>
@ -480,7 +480,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="geN-YN-TQg" style="IBUITableViewCellStyleDefault" id="w57-rz-BWN" userLabel="Leave Group">
<rect key="frame" x="0.0" y="372" width="375" height="44"/>
<rect key="frame" x="0.0" y="377" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="w57-rz-BWN" id="Pgy-Fc-U25">
<frame key="frameInset" width="342" height="43"/>
@ -497,7 +497,7 @@
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" textLabel="Zml-Zn-2fd" style="IBUITableViewCellStyleDefault" id="Dnq-Ko-46l" userLabel="Group Members">
<rect key="frame" x="0.0" y="416" width="375" height="44"/>
<rect key="frame" x="0.0" y="421" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Dnq-Ko-46l" id="VRQ-31-E5Y">
<frame key="frameInset" width="342" height="43"/>

@ -24,5 +24,6 @@
#pragma mark Dynamic Type
+ (UIFont *)ows_dynamicTypeBodyFont;
+ (UIFont *)ows_dynamicTypeTitle2Font;
@end

@ -7,6 +7,7 @@
//
#import "UIFont+OWS.h"
#import "iOSVersions.h"
@implementation UIFont (OWS)
@ -36,4 +37,16 @@
return [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
}
+ (UIFont *)ows_dynamicTypeTitle2Font {
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(_iOS_9)) {
return [UIFont preferredFontForTextStyle:UIFontTextStyleTitle2];
} else {
// Dynamic title font for ios8 defaults to bold 12.0 pt, whereas ios9+ it's 22.0pt regular weight.
// Here we chose to break dynamic font, in order to have uniform style across versions.
// It's already huge, so it's unlikely to present a usability issue.
// Handy font translations: http://swiftiostutorials.com/comparison-of-system-fonts-on-ios-8-and-ios-9/
return [self ows_regularFontWithSize:22.0];
}
}
@end

@ -103,6 +103,10 @@ NS_ASSUME_NONNULL_BEGIN
{
[super viewDidLayoutSubviews];
// On iOS8, the QRCodeFrame hasn't been layed out yet (causing the QRCode to be hidden), force it here.
[self.privacyVerificationQRCodeFrame setNeedsLayout];
[self.privacyVerificationQRCodeFrame layoutIfNeeded];
// Round QR Code.
self.privacyVerificationQRCodeFrame.layer.masksToBounds = YES;
self.privacyVerificationQRCodeFrame.layer.cornerRadius = self.privacyVerificationQRCodeFrame.frame.size.height / 2;
}

@ -10,6 +10,7 @@
#import "PhoneNumber.h"
#import "ShowGroupMembersViewController.h"
#import "UIUtil.h"
#import "UIFont+OWS.h"
#import <25519/Curve25519.h>
#import <SignalServiceKit/NSDate+millisecondTimeStamp.h>
#import <SignalServiceKit/OWSDisappearingConfigurationUpdateInfoMessage.h>
@ -138,6 +139,7 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
self.signalIdLabel.text = nil;
}
self.avatar.image = [OWSAvatarBuilder buildImageForThread:self.thread contactsManager:self.contactsManager];
self.nameLabel.font = [UIFont ows_dynamicTypeTitle2Font];
// Translations
self.title = NSLocalizedString(@"CONVERSATION_SETTINGS", @"title for conversation settings screen");
@ -255,6 +257,8 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [self tableView:tableView cellForRowAtIndexPath:indexPath];
// group vs. contact thread has duration slider at different index.
if (cell == self.disappearingMessagesDurationCell) {
NSIndexPath *originalDurationSliderIndexPath = [NSIndexPath
indexPathForRow:OWSConversationSettingsTableViewControllerCellIndexSetDisappearingMessagesDuration
@ -380,10 +384,10 @@ static NSString *const OWSConversationSettingsTableViewControllerSegueShowGroupM
// Animate show/hide of duration settings.
if (flag) {
[self.tableView insertRowsAtIndexPaths:@[ self.indexPathForDurationSlider ]
withRowAnimation:UITableViewRowAnimationAutomatic];
withRowAnimation:UITableViewRowAnimationFade];
} else {
[self.tableView deleteRowsAtIndexPaths:@[ self.indexPathForDurationSlider ]
withRowAnimation:UITableViewRowAnimationTop];
withRowAnimation:UITableViewRowAnimationFade];
}
}

Loading…
Cancel
Save