From 693e74e8681c8e8de243eee64c594339dc5bd8cf Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Tue, 11 Jul 2017 12:17:28 -0400 Subject: [PATCH] Adapt conversation settings view to RTL. // FREEBIE --- .../NavBarBackRTL.imageset/Contents.json | 23 ++++++++ .../NavBarBackWhiteRTL@1x.png | Bin 0 -> 1416 bytes .../NavBarBackWhiteRTL@2x.png | Bin 0 -> 1709 bytes .../NavBarBackWhiteRTL@3x.png | Bin 0 -> 2008 bytes .../ConversationView/MessagesViewController.m | 7 ++- ...SConversationSettingsTableViewController.m | 52 ++++++++++++------ .../SelectThreadViewController.m | 1 - .../ViewControllers/SignalsViewController.h | 5 +- Signal/src/util/UIViewController+OWS.m | 11 ++-- 9 files changed, 71 insertions(+), 28 deletions(-) create mode 100644 Signal/Images.xcassets/NavBarBackRTL.imageset/Contents.json create mode 100644 Signal/Images.xcassets/NavBarBackRTL.imageset/NavBarBackWhiteRTL@1x.png create mode 100644 Signal/Images.xcassets/NavBarBackRTL.imageset/NavBarBackWhiteRTL@2x.png create mode 100644 Signal/Images.xcassets/NavBarBackRTL.imageset/NavBarBackWhiteRTL@3x.png diff --git a/Signal/Images.xcassets/NavBarBackRTL.imageset/Contents.json b/Signal/Images.xcassets/NavBarBackRTL.imageset/Contents.json new file mode 100644 index 000000000..ff07ee435 --- /dev/null +++ b/Signal/Images.xcassets/NavBarBackRTL.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "NavBarBackWhiteRTL@1x.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "NavBarBackWhiteRTL@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "NavBarBackWhiteRTL@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Signal/Images.xcassets/NavBarBackRTL.imageset/NavBarBackWhiteRTL@1x.png b/Signal/Images.xcassets/NavBarBackRTL.imageset/NavBarBackWhiteRTL@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..bf1c39342a8c0443bb95376bd7cf1d1b38d59ed0 GIT binary patch literal 1416 zcmeAS@N?(olHy`uVBq!ia0vp^LO?9a!3HF~Pw#sVq*&4&eH|GXHuiJ>Nn{1`ISV`@ ziy0UcEkKyjb(&!UP>o7vNJL45ua8x7ey(0(N`6wRUPW#JP&EUCO@$SZnVVXYs8Erc zlUHn2VXFjIVFhG^g!Ppaz)DK8ZIvQ?0~DO|i&7O#^-S~(l1A zfjnEKjFOT9D}DX)@^Za$W4-*MbbUihOG|wNBYh(yU7!lx;>x^|#0uTKVr7USFmqf| zi<65o3raHc^AtelCMM;Vme?vOfh>Xph&xL%(-1c06+^uR^q@XSM&D4+Kp&g7)QU_T z+CVZmwWTD(eN|9elmqrtO0s@xPHJvyUP&=fpCMN3fME;Qh~mhK!~%$A;6Q}<%?9Lh ztDw~4{G3uy5QOGsme?8DfIWmRj0h2kF6aE*f}+&oVxTrVQ>YeXF?9722y5(&49%cA zkVVmT_!ngYy_yJen4KY1J+c_O`bexcAd4dD00q8PKxRd1PJ~M)Fi64vFto7I$0~uY z(K$aSzbLpMF*z0FGO!jTA#~MXYa$WW7{Tz_eiHo1c=IR_T&hl4@sUU}$b-U~Xk-s9KgSO2*jx}-!B`I%f9Ud1tv33ge1w#*Aej~{3e2^3TtJ<$62OkjZ$R80 zetnNEM*L>4dxHNO$nR5p6H+)~~Y}%e!z`%JSwpo`a?6=4SL9gFUy^OXO)-#+k zblSI9^sHk>)4dgI^qT`Vo6Z-Suy@xY{z;Sil0;0@r>>sy^j++Ps61)Epn1zDdnLT# znW+Bf0(;7GhZO&3r@C(Qa^{+J+%9^O&!AH4aAkYkw8!^6FZR}?#jmhla>rJ|c*>OL b+aAlmxIOa}Z_|w>pt8}^)z4*}Q$iB}fJ@Qy literal 0 HcmV?d00001 diff --git a/Signal/Images.xcassets/NavBarBackRTL.imageset/NavBarBackWhiteRTL@2x.png b/Signal/Images.xcassets/NavBarBackRTL.imageset/NavBarBackWhiteRTL@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..87eced2d2e68eb8af4d3bdd9fabf0e71e1070420 GIT binary patch literal 1709 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 O)wQ0kelF{r5}E*kV*{W7 literal 0 HcmV?d00001 diff --git a/Signal/src/ViewControllers/ConversationView/MessagesViewController.m b/Signal/src/ViewControllers/ConversationView/MessagesViewController.m index bf4a25a6d..76cffb563 100644 --- a/Signal/src/ViewControllers/ConversationView/MessagesViewController.m +++ b/Signal/src/ViewControllers/ConversationView/MessagesViewController.m @@ -1079,6 +1079,7 @@ typedef enum : NSUInteger { // This method gets called multiple times, so it's important we re-layout the unread badge // with respect to the new backItem. [backItem.customView addSubview:_backButtonUnreadCountView]; + // TODO: [_backButtonUnreadCountView autoPinEdgeToSuperviewEdge:ALEdgeTop withInset:-6]; [_backButtonUnreadCountView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:1]; [_backButtonUnreadCountView autoSetDimension:ALDimensionHeight toSize:unreadCountViewDiameter]; @@ -1097,7 +1098,7 @@ typedef enum : NSUInteger { const CGFloat kTitleVSpacing = 0.f; if (!self.navigationBarTitleView) { - self.navigationBarTitleView = [UIView new]; + self.navigationBarTitleView = [UIView containerView]; [self.navigationBarTitleView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(navigationTitleTapped:)]]; @@ -1161,7 +1162,9 @@ typedef enum : NSUInteger { + kTitleVSpacing); self.navigationBarTitleLabel.frame = CGRectMake(0, 0, titleViewWidth, self.navigationBarTitleLabel.frame.size.height); - self.navigationBarSubtitleLabel.frame = CGRectMake(0, + self.navigationBarSubtitleLabel.frame = CGRectMake((self.view.isRTL ? self.navigationBarTitleView.frame.size.width + - self.navigationBarSubtitleLabel.frame.size.width + : 0), self.navigationBarTitleView.frame.size.height - self.navigationBarSubtitleLabel.frame.size.height, titleViewWidth, self.navigationBarSubtitleLabel.frame.size.height); diff --git a/Signal/src/ViewControllers/OWSConversationSettingsTableViewController.m b/Signal/src/ViewControllers/OWSConversationSettingsTableViewController.m index 95a5d94b7..dba59d2f0 100644 --- a/Signal/src/ViewControllers/OWSConversationSettingsTableViewController.m +++ b/Signal/src/ViewControllers/OWSConversationSettingsTableViewController.m @@ -293,18 +293,20 @@ NS_ASSUME_NONNULL_BEGIN [mainSection addItem:[OWSTableItem itemWithCustomCellBlock:^{ UITableViewCell *cell = [UITableViewCell new]; + cell.preservesSuperviewLayoutMargins = YES; + cell.contentView.preservesSuperviewLayoutMargins = YES; cell.selectionStyle = UITableViewCellSelectionStyleNone; - UIView *topView = [UIView new]; + UIView *topView = [UIView containerView]; [cell.contentView addSubview:topView]; - [topView autoPinWidthToSuperview]; + [topView autoPinLeadingAndTrailingToSuperview]; [topView autoPinEdgeToSuperviewEdge:ALEdgeTop]; [topView autoSetDimension:ALDimensionHeight toSize:kOWSTable_DefaultCellHeight]; UIImageView *iconView = [self viewForIconWithName:@"table_ic_hourglass"]; [topView addSubview:iconView]; [iconView autoVCenterInSuperview]; - [iconView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:16.f]; + [iconView autoPinLeadingToSuperView]; UILabel *rowLabel = [UILabel new]; rowLabel.text = NSLocalizedString(@"DISAPPEARING_MESSAGES", @"table cell label in conversation settings"); @@ -313,7 +315,7 @@ NS_ASSUME_NONNULL_BEGIN rowLabel.lineBreakMode = NSLineBreakByTruncatingTail; [topView addSubview:rowLabel]; [rowLabel autoVCenterInSuperview]; - [rowLabel autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:iconView withOffset:12.f]; + [rowLabel autoPinLeadingToTrailingOfView:iconView margin:weakSelf.iconSpacing]; UISwitch *switchView = [UISwitch new]; switchView.on = self.disappearingMessagesConfiguration.isEnabled; @@ -322,7 +324,8 @@ NS_ASSUME_NONNULL_BEGIN forControlEvents:UIControlEventValueChanged]; [topView addSubview:switchView]; [switchView autoVCenterInSuperview]; - [switchView autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:16.f]; + [switchView autoPinLeadingToTrailingOfView:rowLabel margin:weakSelf.iconSpacing]; + [switchView autoPinTrailingToSuperView]; UILabel *subtitleLabel = [UILabel new]; subtitleLabel.text @@ -333,8 +336,8 @@ NS_ASSUME_NONNULL_BEGIN subtitleLabel.lineBreakMode = NSLineBreakByWordWrapping; [cell.contentView addSubview:subtitleLabel]; [subtitleLabel autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:topView]; - [subtitleLabel autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:rowLabel]; - [subtitleLabel autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:16.f]; + [subtitleLabel autoPinEdge:ALEdgeLeading toEdge:ALEdgeLeading ofView:rowLabel]; + [subtitleLabel autoPinTrailingToSuperView]; return cell; } @@ -347,18 +350,20 @@ NS_ASSUME_NONNULL_BEGIN addItem:[OWSTableItem itemWithCustomCellBlock:^{ UITableViewCell *cell = [UITableViewCell new]; + cell.preservesSuperviewLayoutMargins = YES; + cell.contentView.preservesSuperviewLayoutMargins = YES; cell.selectionStyle = UITableViewCellSelectionStyleNone; - UIView *topView = [UIView new]; + UIView *topView = [UIView containerView]; [cell.contentView addSubview:topView]; - [topView autoPinWidthToSuperview]; + [topView autoPinLeadingAndTrailingToSuperview]; [topView autoPinEdgeToSuperviewEdge:ALEdgeTop]; [topView autoSetDimension:ALDimensionHeight toSize:kOWSTable_DefaultCellHeight]; UIImageView *iconView = [self viewForIconWithName:@"table_ic_hourglass"]; [topView addSubview:iconView]; [iconView autoVCenterInSuperview]; - [iconView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:16.f]; + [iconView autoPinLeadingToSuperView]; UILabel *rowLabel = self.disappearingMessagesDurationLabel; [self updateDisappearingMessagesDurationLabel]; @@ -367,7 +372,7 @@ NS_ASSUME_NONNULL_BEGIN rowLabel.lineBreakMode = NSLineBreakByTruncatingTail; [topView addSubview:rowLabel]; [rowLabel autoVCenterInSuperview]; - [rowLabel autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:iconView withOffset:12.f]; + [rowLabel autoPinLeadingToTrailingOfView:iconView margin:weakSelf.iconSpacing]; UISlider *slider = [UISlider new]; slider.maximumValue = (float)(self.disappearingMessagesDurations.count - 1); @@ -379,8 +384,8 @@ NS_ASSUME_NONNULL_BEGIN forControlEvents:UIControlEventValueChanged]; [cell.contentView addSubview:slider]; [slider autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:topView]; - [slider autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:rowLabel]; - [slider autoPinEdgeToSuperviewEdge:ALEdgeRight withInset:16.f]; + [slider autoPinEdge:ALEdgeLeading toEdge:ALEdgeLeading ofView:rowLabel]; + [slider autoPinTrailingToSuperView]; return cell; } @@ -431,12 +436,14 @@ NS_ASSUME_NONNULL_BEGIN OWSTableSection *muteSection = [OWSTableSection new]; [muteSection addItem:[OWSTableItem itemWithCustomCellBlock:^{ UITableViewCell *cell = [UITableViewCell new]; + cell.preservesSuperviewLayoutMargins = YES; + cell.contentView.preservesSuperviewLayoutMargins = YES; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; UIImageView *iconView = [self viewForIconWithName:@"table_ic_mute_thread"]; [cell.contentView addSubview:iconView]; [iconView autoVCenterInSuperview]; - [iconView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:16.f]; + [iconView autoPinLeadingToSuperView]; UILabel *rowLabel = [UILabel new]; rowLabel.text = NSLocalizedString( @@ -446,7 +453,7 @@ NS_ASSUME_NONNULL_BEGIN rowLabel.lineBreakMode = NSLineBreakByTruncatingTail; [cell.contentView addSubview:rowLabel]; [rowLabel autoVCenterInSuperview]; - [rowLabel autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:iconView withOffset:12.f]; + [rowLabel autoPinLeadingToTrailingOfView:iconView margin:weakSelf.iconSpacing]; NSString *muteStatus = NSLocalizedString( @"CONVERSATION_SETTINGS_MUTE_NOT_MUTED", @"Indicates that the current thread is not muted."); @@ -481,7 +488,8 @@ NS_ASSUME_NONNULL_BEGIN statusLabel.text = muteStatus; [cell.contentView addSubview:statusLabel]; [statusLabel autoVCenterInSuperview]; - [statusLabel autoPinEdgeToSuperviewEdge:ALEdgeRight]; + // [statusLabel autoPinLeadingToTrailingOfView:rowLabel margin:weakSelf.iconSpacing]; + [statusLabel autoPinTrailingToSuperView]; return cell; } customRowHeight:45.f @@ -523,18 +531,25 @@ NS_ASSUME_NONNULL_BEGIN [self.tableView reloadData]; } +- (CGFloat)iconSpacing +{ + return 12.f; +} + - (UITableViewCell *)disclosureCellWithName:(NSString *)name iconName:(NSString *)iconName { OWSAssert(name.length > 0); OWSAssert(iconName.length > 0); UITableViewCell *cell = [UITableViewCell new]; + cell.preservesSuperviewLayoutMargins = YES; + cell.contentView.preservesSuperviewLayoutMargins = YES; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; UIImageView *iconView = [self viewForIconWithName:iconName]; [cell.contentView addSubview:iconView]; [iconView autoVCenterInSuperview]; - [iconView autoPinEdgeToSuperviewEdge:ALEdgeLeft withInset:16.f]; + [iconView autoPinLeadingToSuperView]; UILabel *rowLabel = [UILabel new]; rowLabel.text = name; @@ -543,7 +558,8 @@ NS_ASSUME_NONNULL_BEGIN rowLabel.lineBreakMode = NSLineBreakByTruncatingTail; [cell.contentView addSubview:rowLabel]; [rowLabel autoVCenterInSuperview]; - [rowLabel autoPinEdge:ALEdgeLeft toEdge:ALEdgeRight ofView:iconView withOffset:12.f]; + [rowLabel autoPinLeadingToTrailingOfView:iconView margin:self.iconSpacing]; + [rowLabel autoPinTrailingToSuperView]; return cell; } diff --git a/Signal/src/ViewControllers/SelectThreadViewController.m b/Signal/src/ViewControllers/SelectThreadViewController.m index c4dd7db05..6c1b10505 100644 --- a/Signal/src/ViewControllers/SelectThreadViewController.m +++ b/Signal/src/ViewControllers/SelectThreadViewController.m @@ -7,7 +7,6 @@ #import "ContactTableViewCell.h" #import "ContactsViewHelper.h" #import "Environment.h" -#import "InboxTableViewCell.h" #import "OWSContactsManager.h" #import "OWSContactsSearcher.h" #import "OWSTableViewController.h" diff --git a/Signal/src/ViewControllers/SignalsViewController.h b/Signal/src/ViewControllers/SignalsViewController.h index 3cc126370..fd6b54335 100644 --- a/Signal/src/ViewControllers/SignalsViewController.h +++ b/Signal/src/ViewControllers/SignalsViewController.h @@ -3,9 +3,8 @@ // #import -#import "InboxTableViewCell.h" -#import "Contact.h" -#import "TSGroupModel.h" + +@class TSThread; @interface SignalsViewController : UIViewController diff --git a/Signal/src/util/UIViewController+OWS.m b/Signal/src/util/UIViewController+OWS.m index 79d04a01e..7d47dafa0 100644 --- a/Signal/src/util/UIViewController+OWS.m +++ b/Signal/src/util/UIViewController+OWS.m @@ -2,6 +2,7 @@ // Copyright (c) 2017 Open Whisper Systems. All rights reserved. // +#import "UIView+OWS.h" #import "UIViewController+OWS.h" NS_ASSUME_NONNULL_BEGIN @@ -18,13 +19,16 @@ NS_ASSUME_NONNULL_BEGIN OWSAssert(target); OWSAssert(selector); + UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; + BOOL isRTL = [backButton isRTL]; + // Nudge closer to the left edge to match default back button item. - const CGFloat kExtraLeftPadding = -8; + const CGFloat kExtraLeftPadding = isRTL ? +0 : -8; // Give some extra hit area to the back button. This is a little smaller // than the default back button, but makes sense for our left aligned title // view in the MessagesViewController - const CGFloat kExtraRightPadding = 10; + const CGFloat kExtraRightPadding = isRTL ? -0 : +10; // Extra hit area above/below const CGFloat kExtraHeightPadding = 4; @@ -33,10 +37,9 @@ NS_ASSUME_NONNULL_BEGIN // We can't just adjust the imageEdgeInsets on a UIBarButtonItem directly, // so we adjust the imageEdgeInsets on a UIButton, then wrap that // in a UIBarButtonItem. - UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; [backButton addTarget:target action:selector forControlEvents:UIControlEventTouchUpInside]; - UIImage *backImage = [UIImage imageNamed:@"NavBarBack"]; + UIImage *backImage = [UIImage imageNamed:(isRTL ? @"NavBarBackRTL" : @"NavBarBack")]; OWSAssert(backImage); [backButton setImage:backImage forState:UIControlStateNormal];