Use OWSNavigationController instead of UINavigationController

- [ ] document picker
- [ ] camera picker
- [ ] image picker
- [ ] restore "confirm to go back" behavior (interactive pop gesture?)

// FREEBIE
This commit is contained in:
Michael Kirk 2018-05-16 22:42:00 -04:00 committed by Matthew Chen
parent 33eb4c38cd
commit 29d08545e2
27 changed files with 141 additions and 114 deletions

View File

@ -144,7 +144,6 @@
34612A011FD5F31400532771 /* OWS104CreateRecipientIdentities.h in Headers */ = {isa = PBXBuildFile; fileRef = 346129F41FD5F31400532771 /* OWS104CreateRecipientIdentities.h */; };
34612A061FD7238600532771 /* OWSContactsSyncing.h in Headers */ = {isa = PBXBuildFile; fileRef = 34612A041FD7238500532771 /* OWSContactsSyncing.h */; settings = {ATTRIBUTES = (Public, ); }; };
34612A071FD7238600532771 /* OWSContactsSyncing.m in Sources */ = {isa = PBXBuildFile; fileRef = 34612A051FD7238500532771 /* OWSContactsSyncing.m */; };
34641E1220878FB000E2EDE5 /* OWSWindowManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34641E1020878FAF00E2EDE5 /* OWSWindowManager.m */; };
34641E182088D7E900E2EDE5 /* OWSScreenLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34641E172088D7E900E2EDE5 /* OWSScreenLock.swift */; };
34641E1B2088DA4100E2EDE5 /* ScreenLockViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34641E192088DA3F00E2EDE5 /* ScreenLockViewController.m */; };
34641E1C2088DA4100E2EDE5 /* ScreenLockViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 34641E1A2088DA4000E2EDE5 /* ScreenLockViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
@ -189,7 +188,6 @@
34C3C78F2040A4F70000134C /* sonarping.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 34C3C78E2040A4F70000134C /* sonarping.mp3 */; };
34C3C7922040B0DD0000134C /* OWSAudioPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 34C3C7902040B0DC0000134C /* OWSAudioPlayer.h */; settings = {ATTRIBUTES = (Public, ); }; };
34C3C7932040B0DD0000134C /* OWSAudioPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C3C7912040B0DC0000134C /* OWSAudioPlayer.m */; };
34C42D5B1F45F7A80072EC04 /* OWSNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C42D5A1F45F7A80072EC04 /* OWSNavigationController.m */; };
34C6B0A91FA0E46F00D35993 /* test-gif.gif in Resources */ = {isa = PBXBuildFile; fileRef = 34C6B0A51FA0E46F00D35993 /* test-gif.gif */; };
34C6B0AB1FA0E46F00D35993 /* test-mp3.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 34C6B0A71FA0E46F00D35993 /* test-mp3.mp3 */; };
34C6B0AC1FA0E46F00D35993 /* test-mp4.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 34C6B0A81FA0E46F00D35993 /* test-mp4.mp4 */; };
@ -249,6 +247,13 @@
450998681FD8C0FF00D89EB3 /* AttachmentSharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 34B3F83A1E8DF1700035BE1A /* AttachmentSharing.m */; };
450998691FD8C10200D89EB3 /* AttachmentSharing.h in Headers */ = {isa = PBXBuildFile; fileRef = 34B3F8391E8DF1700035BE1A /* AttachmentSharing.h */; settings = {ATTRIBUTES = (Public, ); }; };
4509E79A1DD653700025A59F /* WebRTC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4509E7991DD653700025A59F /* WebRTC.framework */; };
450C800C20AD191E00F3A091 /* OWSNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34C42D5A1F45F7A80072EC04 /* OWSNavigationController.m */; };
450C800D20AD193100F3A091 /* OWSNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 34C42D591F45F7A80072EC04 /* OWSNavigationController.h */; settings = {ATTRIBUTES = (Public, ); }; };
450C800E20AD1A6500F3A091 /* OWSNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45FDA43420A4D22700396358 /* OWSNavigationBar.swift */; };
450C800F20AD1AB900F3A091 /* OWSWindowManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 34641E1020878FAF00E2EDE5 /* OWSWindowManager.m */; };
450C801020AD1AE400F3A091 /* OWSWindowManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 34641E1120878FB000E2EDE5 /* OWSWindowManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
450C801120AD1CDB00F3A091 /* ReturnToCallViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45A60E7220AC674100FB1ABF /* ReturnToCallViewController.swift */; };
450C801220AD1D5B00F3A091 /* UIDevice+featureSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45BB93371E688E14001E3939 /* UIDevice+featureSupport.swift */; };
450D19131F85236600970622 /* RemoteVideoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 450D19121F85236600970622 /* RemoteVideoView.m */; };
450DF2051E0D74AC003D14BE /* Platform.swift in Sources */ = {isa = PBXBuildFile; fileRef = 450DF2041E0D74AC003D14BE /* Platform.swift */; };
450DF2091E0DD2C6003D14BE /* UserNotificationsAdaptee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 450DF2081E0DD2C6003D14BE /* UserNotificationsAdaptee.swift */; };
@ -352,7 +357,6 @@
459B775C207BA46C0071D0AB /* OWSQuotedReplyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 459B775A207BA3A80071D0AB /* OWSQuotedReplyModel.m */; };
459B775D207BA4810071D0AB /* OWSQuotedReplyModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 459B7759207BA3A80071D0AB /* OWSQuotedReplyModel.h */; settings = {ATTRIBUTES = (Public, ); }; };
45A2F005204473A3002E978A /* NewMessage.aifc in Resources */ = {isa = PBXBuildFile; fileRef = 45A2F004204473A3002E978A /* NewMessage.aifc */; };
45A60E7320AC674100FB1ABF /* ReturnToCallViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45A60E7220AC674100FB1ABF /* ReturnToCallViewController.swift */; };
45A663C51F92EC760027B59E /* GroupTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45A663C41F92EC760027B59E /* GroupTableViewCell.swift */; };
45A6DAD61EBBF85500893231 /* ReminderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45A6DAD51EBBF85500893231 /* ReminderView.swift */; };
45AE48511E0732D6004D96C2 /* TurnServerInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45AE48501E0732D6004D96C2 /* TurnServerInfo.swift */; };
@ -382,7 +386,6 @@
45B74A892044AAB600CD42F8 /* circles-quiet.aifc in Resources */ = {isa = PBXBuildFile; fileRef = 45B74A702044AAB500CD42F8 /* circles-quiet.aifc */; };
45B74A8B2044AAB600CD42F8 /* synth.aifc in Resources */ = {isa = PBXBuildFile; fileRef = 45B74A722044AAB600CD42F8 /* synth.aifc */; };
45B74A8C2044AAB600CD42F8 /* input-quiet.aifc in Resources */ = {isa = PBXBuildFile; fileRef = 45B74A732044AAB600CD42F8 /* input-quiet.aifc */; };
45BB93381E688E14001E3939 /* UIDevice+featureSupport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45BB93371E688E14001E3939 /* UIDevice+featureSupport.swift */; };
45BC829D1FD9C4B400011CF3 /* ShareViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45BC829C1FD9C4B400011CF3 /* ShareViewDelegate.swift */; };
45BD60821DE9547E00A8F436 /* Contacts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 45BD60811DE9547E00A8F436 /* Contacts.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
45BE4EA22012AD2000935E59 /* DisappearingTimerConfigurationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45BE4EA12012AD2000935E59 /* DisappearingTimerConfigurationView.swift */; };
@ -408,7 +411,6 @@
45F659821E1BE77000444429 /* NonCallKitCallUIAdaptee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45F659811E1BE77000444429 /* NonCallKitCallUIAdaptee.swift */; };
45FBC5C81DF8575700E9B410 /* CallKitCallManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45FBC59A1DF8575700E9B410 /* CallKitCallManager.swift */; };
45FBC5D11DF8592E00E9B410 /* SignalCall.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45FBC5D01DF8592E00E9B410 /* SignalCall.swift */; };
45FDA43520A4D22700396358 /* SignalNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45FDA43420A4D22700396358 /* SignalNavigationBar.swift */; };
4AC4EA13C8A444455DAB351F /* Pods_SignalMessaging.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 264242150E87D10A357DB07B /* Pods_SignalMessaging.framework */; };
70377AAB1918450100CAF501 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 70377AAA1918450100CAF501 /* MobileCoreServices.framework */; };
768A1A2B17FC9CD300E00ED8 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 768A1A2A17FC9CD300E00ED8 /* libz.dylib */; };
@ -1062,7 +1064,7 @@
45F659811E1BE77000444429 /* NonCallKitCallUIAdaptee.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NonCallKitCallUIAdaptee.swift; sourceTree = "<group>"; };
45FBC59A1DF8575700E9B410 /* CallKitCallManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CallKitCallManager.swift; sourceTree = "<group>"; };
45FBC5D01DF8592E00E9B410 /* SignalCall.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignalCall.swift; sourceTree = "<group>"; };
45FDA43420A4D22700396358 /* SignalNavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignalNavigationBar.swift; sourceTree = "<group>"; };
45FDA43420A4D22700396358 /* OWSNavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OWSNavigationBar.swift; sourceTree = "<group>"; };
69349DE607F5BA6036C9AC60 /* Pods-SignalShareExtension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SignalShareExtension.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SignalShareExtension/Pods-SignalShareExtension.debug.xcconfig"; sourceTree = "<group>"; };
70377AAA1918450100CAF501 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
748A5CAEDD7C919FC64C6807 /* Pods_SignalTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SignalTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@ -1453,6 +1455,8 @@
34480B4F1FD0A7A300BC14EF /* OWSScrubbingLogFormatter.h */,
34480B511FD0A7A400BC14EF /* OWSScrubbingLogFormatter.m */,
346129331FD1A88700532771 /* OWSSwiftUtils.swift */,
34641E1120878FB000E2EDE5 /* OWSWindowManager.h */,
34641E1020878FAF00E2EDE5 /* OWSWindowManager.m */,
45360B8C1F9521F800FA666C /* Searcher.swift */,
347850581FD9972E007B8332 /* SwiftSingletons.swift */,
346129BD1FD2068600532771 /* ThreadUtil.h */,
@ -1468,6 +1472,7 @@
34480B5C1FD0A98800BC14EF /* categories */ = {
isa = PBXGroup;
children = (
45BB93371E688E14001E3939 /* UIDevice+featureSupport.swift */,
4551DB59205C562300C8AE75 /* Collection+OWS.swift */,
346129C51FD2072D00532771 /* NSAttributedString+OWS.h */,
346129C11FD2072D00532771 /* NSAttributedString+OWS.m */,
@ -1604,6 +1609,7 @@
451573952061B49500803601 /* GradientView.swift */,
346129CF1FD207F200532771 /* OWSAlerts.swift */,
454A965E1FD60EA2008D2A0E /* OWSFlatButton.swift */,
45FDA43420A4D22700396358 /* OWSNavigationBar.swift */,
348BB258209CF8E40047AEC2 /* TappableStackView.swift */,
348BB259209CF8E50047AEC2 /* TappableView.swift */,
3400C7971EAFB772008A8584 /* ThreadViewHelper.h */,
@ -1674,8 +1680,6 @@
45D2AC01204885170033C692 /* OWS2FAReminderViewController.swift */,
345BC30A2047030600257B7C /* OWS2FASettingsViewController.h */,
345BC30B2047030600257B7C /* OWS2FASettingsViewController.m */,
34C42D591F45F7A80072EC04 /* OWSNavigationController.h */,
34C42D5A1F45F7A80072EC04 /* OWSNavigationController.m */,
34CE88E51F2FB9A10098030F /* ProfileViewController.h */,
34CE88E61F2FB9A10098030F /* ProfileViewController.m */,
340FC875204DAC8C007AEB0F /* Registration */,
@ -1685,7 +1689,6 @@
340FC897204DAC8D007AEB0F /* ThreadSettings */,
34D1F0BE1F8EC1760066283D /* Utils */,
452B998F20A34B6B006F2F9E /* AddContactShareToExistingContactViewController.swift */,
45A60E7220AC674100FB1ABF /* ReturnToCallViewController.swift */,
);
path = ViewControllers;
sourceTree = "<group>";
@ -1855,10 +1858,13 @@
451F8A361FD7115D005CB9DA /* ViewControllers */ = {
isa = PBXGroup;
children = (
34C42D591F45F7A80072EC04 /* OWSNavigationController.h */,
34C42D5A1F45F7A80072EC04 /* OWSNavigationController.m */,
34B3F89D1E8DF5490035BE1A /* OWSTableViewController.h */,
34B3F89E1E8DF5490035BE1A /* OWSTableViewController.m */,
34D99C8A1F27B13B00D284D6 /* OWSViewController.h */,
34D99C8B1F27B13B00D284D6 /* OWSViewController.m */,
45A60E7220AC674100FB1ABF /* ReturnToCallViewController.swift */,
);
path = ViewControllers;
sourceTree = "<group>";
@ -2112,8 +2118,6 @@
34D2CCD120618B2F00CB1A14 /* OWSBackupLazyRestoreJob.swift */,
34D2CCD82062E7D000CB1A14 /* OWSScreenLockUI.h */,
34D2CCD92062E7D000CB1A14 /* OWSScreenLockUI.m */,
34641E1120878FB000E2EDE5 /* OWSWindowManager.h */,
34641E1020878FAF00E2EDE5 /* OWSWindowManager.m */,
4579431C1E7C8CE9008ED0C0 /* Pastelog.h */,
4579431D1E7C8CE9008ED0C0 /* Pastelog.m */,
450DF2041E0D74AC003D14BE /* Platform.swift */,
@ -2145,7 +2149,6 @@
45A6DAD51EBBF85500893231 /* ReminderView.swift */,
450D19111F85236600970622 /* RemoteVideoView.h */,
450D19121F85236600970622 /* RemoteVideoView.m */,
45FDA43420A4D22700396358 /* SignalNavigationBar.swift */,
);
name = Views;
path = views;
@ -2387,7 +2390,6 @@
children = (
45638BDE1F3DDB2200128435 /* MessageSender+Promise.swift */,
45C0DC1A1E68FE9000E04C47 /* UIApplication+OWS.swift */,
45BB93371E688E14001E3939 /* UIDevice+featureSupport.swift */,
45C0DC1D1E69011F00E04C47 /* UIStoryboard+OWS.swift */,
EF764C331DB67CC5000D9A87 /* UIViewController+Permissions.h */,
EF764C341DB67CC5000D9A87 /* UIViewController+Permissions.m */,
@ -2415,6 +2417,7 @@
34612A001FD5F31400532771 /* OWS105AttachmentFilePaths.h in Headers */,
346129F61FD5F31400532771 /* OWS103EnableVideoCalling.h in Headers */,
344F248A20069F0600CFB4F4 /* ViewControllerUtils.h in Headers */,
450C800D20AD193100F3A091 /* OWSNavigationController.h in Headers */,
346129A91FD1F0E000532771 /* OWSFormat.h in Headers */,
34480B551FD0A7A400BC14EF /* DebugLogger.h in Headers */,
344F248420069E9C00CFB4F4 /* CountryCodeViewController.h in Headers */,
@ -2439,6 +2442,7 @@
34480B611FD0A98800BC14EF /* UIColor+OWS.h in Headers */,
453518961FC63DBF00210559 /* SignalMessaging.h in Headers */,
3461295A1FD1D74C00532771 /* Environment.h in Headers */,
450C801020AD1AE400F3A091 /* OWSWindowManager.h in Headers */,
34D58730208E2C4200D2255A /* OWS109OutgoingMessageState.h in Headers */,
4598198E204E2F28009414F2 /* OWS108CallLoggingPreference.h in Headers */,
34480B631FD0A98800BC14EF /* UIView+OWS.h in Headers */,
@ -3121,6 +3125,7 @@
45194F8F1FD71FF500333B2C /* ThreadUtil.m in Sources */,
451F8A3B1FD71297005CB9DA /* UIUtil.m in Sources */,
451F8A331FD71083005CB9DA /* SelectThreadViewController.m in Sources */,
450C800F20AD1AB900F3A091 /* OWSWindowManager.m in Sources */,
454A965A1FD6017E008D2A0E /* SignalAttachment.swift in Sources */,
454A965B1FD601BF008D2A0E /* MediaMessageView.swift in Sources */,
45BC829D1FD9C4B400011CF3 /* ShareViewDelegate.swift in Sources */,
@ -3147,17 +3152,21 @@
45F59A082028E4FB00E8D2B0 /* OWSAudioSession.swift in Sources */,
34612A071FD7238600532771 /* OWSContactsSyncing.m in Sources */,
346129DF1FD5C02A00532771 /* LockInteractionController.m in Sources */,
450C801220AD1D5B00F3A091 /* UIDevice+featureSupport.swift in Sources */,
451F8A471FD715BA005CB9DA /* OWSAvatarBuilder.m in Sources */,
344D6CEB20069E070042AF96 /* SelectRecipientViewController.m in Sources */,
34480B591FD0A7A400BC14EF /* OWSScrubbingLogFormatter.m in Sources */,
451F8A441FD7156B005CB9DA /* BlockListUIUtils.m in Sources */,
34641E182088D7E900E2EDE5 /* OWSScreenLock.swift in Sources */,
451F8A381FD7117E005CB9DA /* OWSViewController.m in Sources */,
450C801120AD1CDB00F3A091 /* ReturnToCallViewController.swift in Sources */,
450C800C20AD191E00F3A091 /* OWSNavigationController.m in Sources */,
346129721FD1D74C00532771 /* SignalKeyingStorage.m in Sources */,
34480B561FD0A7A400BC14EF /* DebugLogger.m in Sources */,
459B775C207BA46C0071D0AB /* OWSQuotedReplyModel.m in Sources */,
34ABB2C42090C59700C727A6 /* OWSResaveCollectionDBMigration.m in Sources */,
4551DB5A205C562300C8AE75 /* Collection+OWS.swift in Sources */,
450C800E20AD1A6500F3A091 /* OWSNavigationBar.swift in Sources */,
3461293C1FD1D46A00532771 /* OWSMath.m in Sources */,
451F8A391FD711D6005CB9DA /* ContactsViewHelper.m in Sources */,
346129AF1FD1F5D900532771 /* SystemContactsFetcher.swift in Sources */,
@ -3276,7 +3285,6 @@
45D308AD2049A439000189E4 /* PinEntryView.m in Sources */,
340FC8B1204DAC8D007AEB0F /* BlockListViewController.m in Sources */,
45B5360E206DD8BB00D61655 /* UIResponder+OWS.swift in Sources */,
34641E1220878FB000E2EDE5 /* OWSWindowManager.m in Sources */,
45F659821E1BE77000444429 /* NonCallKitCallUIAdaptee.swift in Sources */,
45AE48511E0732D6004D96C2 /* TurnServerInfo.swift in Sources */,
34B3F8771E8DF1700035BE1A /* ContactsPicker.swift in Sources */,
@ -3299,8 +3307,6 @@
34BECE2E1F7ABCE000D7438D /* GifPickerViewController.swift in Sources */,
34D1F0C01F8EC1760066283D /* MessageRecipientStatusUtils.swift in Sources */,
45F659731E1BD99C00444429 /* CallKitCallUIAdaptee.swift in Sources */,
45FDA43520A4D22700396358 /* SignalNavigationBar.swift in Sources */,
45BB93381E688E14001E3939 /* UIDevice+featureSupport.swift in Sources */,
34277A5E20751BDC006049F2 /* OWSQuotedMessageView.m in Sources */,
458DE9D61DEE3FD00071BB03 /* PeerConnectionClient.swift in Sources */,
45DDA6242090CEB500DE97F8 /* ConversationHeaderView.swift in Sources */,
@ -3315,7 +3321,6 @@
34D1F0B11F867BFC0066283D /* OWSUnreadIndicatorCell.m in Sources */,
340FC8B5204DAC8D007AEB0F /* AboutTableViewController.m in Sources */,
34BECE2B1F74C12700D7438D /* DebugUIStress.m in Sources */,
34C42D5B1F45F7A80072EC04 /* OWSNavigationController.m in Sources */,
340FC8B9204DAC8D007AEB0F /* UpdateGroupViewController.m in Sources */,
B609597C1C2C0FC6004E8797 /* iRate.m in Sources */,
4574A5D61DD6704700C6B692 /* CallService.swift in Sources */,
@ -3328,7 +3333,6 @@
340FC8AE204DAC8D007AEB0F /* OWSSoundSettingsViewController.m in Sources */,
4579431E1E7C8CE9008ED0C0 /* Pastelog.m in Sources */,
340FC8B0204DAC8D007AEB0F /* AddToBlockListViewController.m in Sources */,
45A60E7320AC674100FB1ABF /* ReturnToCallViewController.swift in Sources */,
340FC8B3204DAC8D007AEB0F /* AppSettingsViewController.m in Sources */,
346B66311F4E29B200E5122F /* CropScaleImageViewController.swift in Sources */,
45E5A6991F61E6DE001E4A8A /* MarqueeLabel.swift in Sources */,

View File

@ -12,7 +12,6 @@
#import "NotificationsManager.h"
#import "OWS2FASettingsViewController.h"
#import "OWSBackup.h"
#import "OWSNavigationController.h"
#import "OWSScreenLockUI.h"
#import "Pastelog.h"
#import "PushManager.h"
@ -28,6 +27,7 @@
#import <SignalMessaging/OWSContactsManager.h>
#import <SignalMessaging/OWSContactsSyncing.h>
#import <SignalMessaging/OWSMath.h>
#import <SignalMessaging/OWSNavigationController.h>
#import <SignalMessaging/OWSPreferences.h>
#import <SignalMessaging/OWSProfileManager.h>
#import <SignalMessaging/Release.h>
@ -483,9 +483,9 @@ static NSTimeInterval launchStartedAt;
if ([url.scheme isEqualToString:kURLSchemeSGNLKey]) {
if ([url.host hasPrefix:kURLHostVerifyPrefix] && ![TSAccountManager isRegistered]) {
id signupController = SignalApp.sharedApp.signUpFlowNavigationController;
if ([signupController isKindOfClass:[UINavigationController class]]) {
UINavigationController *navController = (UINavigationController *)signupController;
UIViewController *controller = [navController.childViewControllers lastObject];
if ([signupController isKindOfClass:[OWSNavigationController class]]) {
OWSNavigationController *navController = (OWSNavigationController *)signupController;
UIViewController *controller = [navController.childViewControllers lastObject];
if ([controller isKindOfClass:[CodeVerificationViewController class]]) {
CodeVerificationViewController *cvvc = (CodeVerificationViewController *)controller;
NSString *verificationCode = [url.path substringFromIndex:1];
@ -628,7 +628,7 @@ static NSTimeInterval launchStartedAt;
@"%@ Skipping 2FA reminder since there isn't yet an initial view controller", self.logTag);
} else {
UIViewController *rootViewController = self.window.rootViewController;
UINavigationController *reminderNavController =
OWSNavigationController *reminderNavController =
[OWS2FAReminderViewController wrappedInNavController];
[rootViewController presentViewController:reminderNavController animated:YES completion:nil];

View File

@ -168,7 +168,7 @@ public class ContactShareViewHelper: NSObject, CNContactViewControllerDelegate {
// CNContactViewController incompatible with opaque navigation bar
UIUtil.applyDefaultSystemAppearence()
let modal = UINavigationController(rootViewController: contactViewController)
let modal = OWSNavigationController(rootViewController: contactViewController)
fromViewController.present(modal, animated: true)
}

View File

@ -60,6 +60,7 @@
#import <SignalMessaging/OWSContactOffersInteraction.h>
#import <SignalMessaging/OWSContactsManager.h>
#import <SignalMessaging/OWSFormat.h>
#import <SignalMessaging/OWSNavigationController.h>
#import <SignalMessaging/OWSUserProfile.h>
#import <SignalMessaging/TSUnreadIndicatorInteraction.h>
#import <SignalMessaging/ThreadUtil.h>
@ -2614,8 +2615,8 @@ typedef enum : NSUInteger {
contactsPicker.title
= NSLocalizedString(@"CONTACT_PICKER_TITLE", @"navbar title for contact picker when sharing a contact");
UINavigationController *navigationController =
[[UINavigationController alloc] initWithRootViewController:contactsPicker];
OWSNavigationController *navigationController =
[[OWSNavigationController alloc] initWithRootViewController:contactsPicker];
[self dismissKeyBoard];
[self presentViewController:navigationController animated:YES completion:nil];
}
@ -2656,7 +2657,7 @@ typedef enum : NSUInteger {
GifPickerViewController *view =
[[GifPickerViewController alloc] initWithThread:self.thread messageSender:self.messageSender];
view.delegate = self;
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:view];
OWSNavigationController *navigationController = [[OWSNavigationController alloc] initWithRootViewController:view];
[self dismissKeyBoard];
[self presentViewController:navigationController animated:YES completion:nil];

View File

@ -109,7 +109,7 @@ NS_ASSUME_NONNULL_BEGIN
[items addObject:[OWSTableItem itemWithTitle:@"Show 2FA Reminder"
actionBlock:^() {
UINavigationController *navController =
OWSNavigationController *navController =
[OWS2FAReminderViewController wrappedInNavController];
[[[UIApplication sharedApplication] frontmostViewController]
presentViewController:navController

View File

@ -154,7 +154,7 @@ class InviteFlow: NSObject, MFMessageComposeViewControllerDelegate, MFMailCompos
let picker = ContactsPicker(allowsMultipleSelection: true, subtitleCellType: .phoneNumber)
picker.contactsPickerDelegate = self
picker.title = NSLocalizedString("INVITE_FRIENDS_PICKER_TITLE", comment: "Navbar title")
let navigationController = UINavigationController(rootViewController: picker)
let navigationController = OWSNavigationController(rootViewController: picker)
self.presentingViewController.present(navigationController, animated: true)
}
}
@ -218,7 +218,7 @@ class InviteFlow: NSObject, MFMessageComposeViewControllerDelegate, MFMailCompos
let picker = ContactsPicker(allowsMultipleSelection: true, subtitleCellType: .email)
picker.contactsPickerDelegate = self
picker.title = NSLocalizedString("INVITE_FRIENDS_PICKER_TITLE", comment: "Navbar title")
let navigationController = UINavigationController(rootViewController: picker)
let navigationController = OWSNavigationController(rootViewController: picker)
self.presentingViewController.present(navigationController, animated: true)
}
}

View File

@ -184,7 +184,7 @@ protocol MediaGalleryDataSourceDelegate: class {
func mediaGalleryDataSource(_ mediaGalleryDataSource: MediaGalleryDataSource, deletedSections: IndexSet, deletedItems: [IndexPath])
}
class MediaGalleryViewController: UINavigationController, MediaGalleryDataSource, MediaTileViewControllerDelegate {
class MediaGalleryViewController: OWSNavigationController, MediaGalleryDataSource, MediaTileViewControllerDelegate {
private var pageViewController: MediaPageViewController?
@ -395,9 +395,9 @@ class MediaGalleryViewController: UINavigationController, MediaGalleryDataSource
// If we're using a navigationController other than self to present the views
// e.g. the conversation settings view controller
var fromNavController: UINavigationController?
var fromNavController: OWSNavigationController?
func pushTileView(fromNavController: UINavigationController) {
func pushTileView(fromNavController: OWSNavigationController) {
var mostRecentItem: MediaGalleryItem?
self.uiDatabaseConnection.read { transaction in
if let message = self.mediaGalleryFinder.mostRecentMediaMessage(transaction: transaction) {

View File

@ -117,7 +117,7 @@ const NSUInteger kNewGroupViewControllerAvatarWidth = 68;
[self.view addSubview:firstSection];
[firstSection autoSetDimension:ALDimensionHeight toSize:100.f];
[firstSection autoPinWidthToSuperview];
[firstSection autoPinEdgeToSuperviewEdge:ALEdgeTop];
[firstSection autoPinToTopLayoutGuideOfViewController:self withInset:0];
_tableViewController = [OWSTableViewController new];
_tableViewController.delegate = self;

View File

@ -14,8 +14,8 @@ public class OWS2FAReminderViewController: UIViewController, PinEntryViewDelegat
var pinEntryView: PinEntryView!
@objc
public class func wrappedInNavController() -> UINavigationController {
let navController = UINavigationController()
public class func wrappedInNavController() -> OWSNavigationController {
let navController = OWSNavigationController()
navController.pushViewController(OWS2FAReminderViewController(), animated: false)
return navController

View File

@ -13,6 +13,7 @@
#import "UIFont+OWS.h"
#import "UIView+OWS.h"
#import <SignalMessaging/NSString+OWS.h>
#import <SignalMessaging/OWSNavigationController.h>
#import <SignalMessaging/OWSProfileManager.h>
#import <SignalMessaging/UIViewController+OWS.h>
#import <SignalServiceKit/NSDate+OWS.h>

View File

@ -14,6 +14,7 @@
#import <SAMKeychain/SAMKeychain.h>
#import <SignalMessaging/Environment.h>
#import <SignalMessaging/NSString+OWS.h>
#import <SignalMessaging/OWSNavigationController.h>
NS_ASSUME_NONNULL_BEGIN
@ -50,7 +51,8 @@ NSString *const kKeychainKey_LastRegisteredPhoneNumber = @"kKeychainKey_LastRegi
// Do any additional setup after loading the view.
[self populateDefaultCountryNameAndCode];
[SignalApp.sharedApp setSignUpFlowNavigationController:self.navigationController];
OWSAssert([self.navigationController isKindOfClass:[OWSNavigationController class]]);
[SignalApp.sharedApp setSignUpFlowNavigationController:(OWSNavigationController *)self.navigationController];
}
- (void)viewDidLoad
@ -354,8 +356,8 @@ NSString *const kKeychainKey_LastRegisteredPhoneNumber = @"kKeychainKey_LastRegi
{
CountryCodeViewController *countryCodeController = [CountryCodeViewController new];
countryCodeController.countryCodeDelegate = self;
UINavigationController *navigationController =
[[UINavigationController alloc] initWithRootViewController:countryCodeController];
OWSNavigationController *navigationController =
[[OWSNavigationController alloc] initWithRootViewController:countryCodeController];
[self presentViewController:navigationController animated:YES completion:[UIUtil modalCompletionBlock]];
}

View File

@ -105,8 +105,8 @@ typedef void (^CustomLayoutBlock)(void);
FingerprintViewController *fingerprintViewController = [FingerprintViewController new];
[fingerprintViewController configureWithRecipientId:recipientId];
UINavigationController *navigationController =
[[UINavigationController alloc] initWithRootViewController:fingerprintViewController];
OWSNavigationController *navigationController =
[[OWSNavigationController alloc] initWithRootViewController:fingerprintViewController];
[viewController presentViewController:navigationController animated:YES completion:nil];
}

View File

@ -1173,7 +1173,8 @@ NS_ASSUME_NONNULL_BEGIN
// reference to it until we're dismissed.
self.mediaGalleryViewController = vc;
[vc pushTileViewFromNavController:self.navigationController];
OWSAssert([self.navigationController isKindOfClass:[OWSNavigationController class]]);
[vc pushTileViewFromNavController:(OWSNavigationController *)self.navigationController];
}
#pragma mark - Notifications

View File

@ -10,6 +10,7 @@
@class HomeViewController;
@class NotificationsManager;
@class OWSMessageFetcherJob;
@class OWSNavigationController;
@class OWSWebRTCCallMessageHandler;
@class OutboundCallInitiator;
@class TSThread;
@ -17,7 +18,7 @@
@interface SignalApp : NSObject
@property (nonatomic, weak) HomeViewController *homeViewController;
@property (nonatomic, weak) UINavigationController *signUpFlowNavigationController;
@property (nonatomic, weak) OWSNavigationController *signUpFlowNavigationController;
// TODO: Convert to singletons?
@property (nonatomic, readonly) OWSWebRTCCallMessageHandler *callMessageHandler;

View File

@ -29,11 +29,13 @@ FOUNDATION_EXPORT const unsigned char SignalMessagingVersionString[];
#import <SignalMessaging/OWSFormat.h>
#import <SignalMessaging/OWSLogger.h>
#import <SignalMessaging/OWSMath.h>
#import <SignalMessaging/OWSNavigationController.h>
#import <SignalMessaging/OWSProfileManager.h>
#import <SignalMessaging/OWSQuotedReplyModel.h>
#import <SignalMessaging/OWSSounds.h>
#import <SignalMessaging/OWSTableViewController.h>
#import <SignalMessaging/OWSUserProfile.h>
#import <SignalMessaging/OWSWindowManager.h>
#import <SignalMessaging/Release.h>
#import <SignalMessaging/SharingThreadPickerViewController.h>
#import <SignalMessaging/SignalKeyingStorage.h>

View File

@ -1,9 +1,11 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
// Any view controller which wants to be able cancel back button
// presses and back gestures should implement this protocol.
@protocol OWSNavigationView <NSObject>
@ -22,3 +24,5 @@
@interface OWSNavigationController : UINavigationController
@end
NS_ASSUME_NONNULL_END

View File

@ -3,11 +3,12 @@
//
#import "OWSNavigationController.h"
#import "Signal-Swift.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
// We use a category to expose UINavigationController's private
// UINavigationBarDelegate methods.
@interface UINavigationController (OWSNavigationController) <UINavigationBarDelegate>
NS_ASSUME_NONNULL_BEGIN
@interface OWSNavigationController (OWSNavigationController) <UINavigationBarDelegate>
@end
@ -27,38 +28,38 @@
// Failure: additionalSafeArea insets cannot be negative
// UIEdgeInsets newSafeArea = UIEdgeInsetsMake(-50, 30, 20, 30);
// rootViewController.additionalSafeAreaInsets = newSafeArea;
// Attempt 2: safeAreaInsets on vc.view
// failure. they're already 0
// UIEdgeInsets existingInsets = rootViewController.view.safeAreaInsets;
// Attempt 3: override topLayoutGuide?
// Failure - not called.
// overriding it does no good - it's not called by default layout code.
// presumably it just existing if you want to use it as an anchor.
// Attemp 4: sizeForChildContentConainer?
// Failure - not called.
// Attempt 5: autoSetDimension on navbar
// Failure: no effect on rendered size
// Attempt 6: manually set child frames in will/didLayoutSubviews
// glitchy, and viewcontrollers re-layout themselves afterwards anyway
// Attempt 7: Since we can't seem to *shrink* the navbar, maybe we can grow it.
// make additionalSafeAreaInsets
[self updateAdditionalSafeAreaInsets];
self = [self initWithNavigationBarClass:[SignalNavigationBar class] toolbarClass:nil];
self = [self initWithNavigationBarClass:[OWSNavigationBar class] toolbarClass:nil];
[self pushViewController:rootViewController animated:NO];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowManagerCallDidChange:)
name:OWSWindowManagerCallDidChangeNotification
object:nil];
return self;
}
@ -81,54 +82,60 @@
{
[super viewDidLoad];
self.interactivePopGestureRecognizer.delegate = self;
// self.interactivePopGestureRecognizer.delegate = self;
}
#pragma mark - UINavigationBarDelegate
// All UINavigationController serve as the UINavigationBarDelegate for their navbar.
// All OWSNavigationController serve as the UINavigationBarDelegate for their navbar.
// We override shouldPopItem: in order to cancel some back button presses - for example,
// if a view has unsaved changes.
- (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item
{
OWSAssert(self.interactivePopGestureRecognizer.delegate == self);
UIViewController *topViewController = self.topViewController;
// wasBackButtonClicked is YES if the back button was pressed but not
// if a back gesture was performed or if the view is popped programmatically.
BOOL wasBackButtonClicked = topViewController.navigationItem == item;
BOOL result = YES;
if (wasBackButtonClicked) {
if ([topViewController conformsToProtocol:@protocol(OWSNavigationView)]) {
id<OWSNavigationView> navigationView = (id<OWSNavigationView>)topViewController;
result = ![navigationView shouldCancelNavigationBack];
}
}
// If we're not going to cancel the pop/back, we need to call the super
// implementation since it has important side effects.
if (result) {
// NOTE: result might end up NO if the super implementation cancels the
// the pop/back.
result = [super navigationBar:navigationBar shouldPopItem:item];
}
return result;
}
//- (BOOL)navigationBar:(UINavigationBar *)navigationBar shouldPopItem:(UINavigationItem *)item
//{
// OWSAssert(self.interactivePopGestureRecognizer.delegate == self);
// UIViewController *topViewController = self.topViewController;
//
// // wasBackButtonClicked is YES if the back button was pressed but not
// // if a back gesture was performed or if the view is popped programmatically.
// BOOL wasBackButtonClicked = topViewController.navigationItem == item;
// BOOL result = YES;
// if (wasBackButtonClicked) {
// if ([topViewController conformsToProtocol:@protocol(OWSNavigationView)]) {
// id<OWSNavigationView> navigationView = (id<OWSNavigationView>)topViewController;
// result = ![navigationView shouldCancelNavigationBack];
// }
// }
//
// // If we're not going to cancel the pop/back, we need to call the super
// // implementation since it has important side effects.
// if (result) {
// // NOTE: result might end up NO if the super implementation cancels the
// // the pop/back.
//
// // MJK WTF?? This seems super broken. It won't compile now, but how could it ever
// // have? This is a delegate method, so how are we calling it on super?
// // [super navigationBar:navigationBar shouldPopItem:item];
// result = YES;
// }
// return result;
//}
#pragma mark - UIGestureRecognizerDelegate
// We serve as the UIGestureRecognizerDelegate of the interactivePopGestureRecognizer
// in order to cancel some "back" gestures - for example,
// if a view has unsaved changes.
- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
{
UIViewController *topViewController = self.topViewController;
if ([topViewController conformsToProtocol:@protocol(OWSNavigationView)]) {
id<OWSNavigationView> navigationView = (id<OWSNavigationView>)topViewController;
return ![navigationView shouldCancelNavigationBack];
} else {
return YES;
}
}
//- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer
//{
// UIViewController *topViewController = self.topViewController;
// if ([topViewController conformsToProtocol:@protocol(OWSNavigationView)]) {
// id<OWSNavigationView> navigationView = (id<OWSNavigationView>)topViewController;
// return ![navigationView shouldCancelNavigationBack];
// } else {
// return YES;
// }
//}
@end
NS_ASSUME_NONNULL_END

View File

@ -3,6 +3,7 @@
//
#import "OWSTableViewController.h"
#import "OWSNavigationController.h"
#import "UIFont+OWS.h"
#import "UIView+OWS.h"
@ -652,7 +653,7 @@ NSString *const kOWSTableCellIdentifier = @"kOWSTableCellIdentifier";
{
OWSAssert(fromViewController);
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:self];
OWSNavigationController *navigationController = [[OWSNavigationController alloc] initWithRootViewController:self];
self.navigationItem.leftBarButtonItem =
[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemStop
target:self

View File

@ -392,8 +392,8 @@ NS_ASSUME_NONNULL_BEGIN
target:fromViewController
action:@selector(didFinishEditingContact)];
UINavigationController *navigationController =
[[UINavigationController alloc] initWithRootViewController:contactViewController];
OWSNavigationController *navigationController =
[[OWSNavigationController alloc] initWithRootViewController:contactViewController];
// We want the presentation to imply a "replacement" in this case.
if (shouldEditImmediately) {

View File

@ -6,7 +6,7 @@ import Foundation
import UIKit
@objc
class SignalNavigationBar: UINavigationBar {
class OWSNavigationBar: UINavigationBar {
// TODO - get a more precise value
// TODO - test with other heights, e.g. w/ hotspot, w/ call in other app
@ -47,10 +47,13 @@ class SignalNavigationBar: UINavigationBar {
// pre iOS11, sizeThatFits is repeatedly called to size the navbar, which is pretty straight forward
// as of iOS11, this is not true and we have to do things in layoutSubviews.
// FIXME: pre-iOS11, though the size is right, there's a glitch on the titleView while push/popping items.
// MJK safe to hardcode? Do we even need this approach anymore?
let statusBarHeight: CGFloat = 20
let result: CGSize = {
if OWSWindowManager.shared().hasCall() {
// status bar height gets re-added
return CGSize(width: UIScreen.main.bounds.width, height: navbarHeight - UIApplication.shared.statusBarFrame.size.height)
return CGSize(width: CurrentAppContext().mainWindow!.bounds.width, height: navbarHeight - statusBarHeight)
} else {
return super.sizeThatFits(size)
}

View File

@ -4,7 +4,7 @@
import Foundation
extension UIDevice {
public extension UIDevice {
var supportsCallKit: Bool {
return ProcessInfo().isOperatingSystemAtLeast(OperatingSystemVersion(majorVersion: 10, minorVersion: 0, patchVersion: 0))
}

View File

@ -266,8 +266,8 @@ NSString *const kSelectRecipientViewControllerCellIdentifier = @"kSelectRecipien
if (self.isPresentedInNavigationController) {
[self.navigationController pushViewController:countryCodeController animated:YES];
} else {
UINavigationController *navigationController =
[[UINavigationController alloc] initWithRootViewController:countryCodeController];
OWSNavigationController *navigationController =
[[OWSNavigationController alloc] initWithRootViewController:countryCodeController];
[self presentViewController:navigationController animated:YES completion:[UIUtil modalCompletionBlock]];
}
}

View File

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSPreferences.h"
@ -16,10 +16,10 @@
@class ContactsUpdater;
@class OWSContactsManager;
@class OWSMessageSender;
@class OWSNavigationController;
@class TSGroupThread;
@class TSNetworkManager;
@class TSThread;
@class UINavigationController;
@interface Environment : NSObject

View File

@ -3,10 +3,10 @@
//
#import "OWSWindowManager.h"
#import "Signal-Swift.h"
#import <SignalMessaging/UIColor+OWS.h>
#import <SignalMessaging/UIFont+OWS.h>
#import <SignalMessaging/UIView+OWS.h>
#import "UIColor+OWS.h"
#import "UIFont+OWS.h"
#import "UIView+OWS.h"
#import <SignalMessaging/SignalMessaging-Swift.h>
NS_ASSUME_NONNULL_BEGIN
@ -79,7 +79,7 @@ const UIWindowLevel UIWindowLevel_ScreenBlocking(void)
// UIWindowLevel_CallView
@property (nonatomic) UIWindow *callViewWindow;
@property (nonatomic) UINavigationController *callNavigationController;
@property (nonatomic) OWSNavigationController *callNavigationController;
// UIWindowLevel_Background if inactive,
// UIWindowLevel_ScreenBlocking() if active.
@ -175,8 +175,8 @@ const UIWindowLevel UIWindowLevel_ScreenBlocking(void)
UIViewController *viewController = [OWSWindowRootViewController new];
viewController.view.backgroundColor = [UIColor ows_materialBlueColor];
UINavigationController *navigationController =
[[UINavigationController alloc] initWithRootViewController:viewController];
OWSNavigationController *navigationController =
[[OWSNavigationController alloc] initWithRootViewController:viewController];
navigationController.navigationBarHidden = YES;
OWSAssert(!self.callNavigationController);
self.callNavigationController = navigationController;

View File

@ -26,7 +26,7 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
private var progressPoller: ProgressPoller?
var loadViewController: SAELoadViewController?
let shareViewNavigationController: UINavigationController = UINavigationController()
let shareViewNavigationController: OWSNavigationController = OWSNavigationController()
override open func loadView() {
super.loadView()