Landscape orientation.
This commit is contained in:
parent
045b112724
commit
aefe0eabed
|
@ -162,6 +162,7 @@
|
|||
3496957421A301A100DCFE74 /* OWSBackupAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3496956B21A301A100DCFE74 /* OWSBackupAPI.swift */; };
|
||||
349EA07C2162AEA800F7B17F /* OWS111UDAttributesMigration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 349EA07B2162AEA700F7B17F /* OWS111UDAttributesMigration.swift */; };
|
||||
34A55F3720485465002CC6DE /* OWS2FARegistrationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34A55F3520485464002CC6DE /* OWS2FARegistrationViewController.m */; };
|
||||
34A6C28021E503E700B5B12E /* OWSImagePickerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34A6C27F21E503E600B5B12E /* OWSImagePickerController.swift */; };
|
||||
34A8B3512190A40E00218A25 /* MediaAlbumCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34A8B3502190A40E00218A25 /* MediaAlbumCellView.swift */; };
|
||||
34ABB2C42090C59700C727A6 /* OWSResaveCollectionDBMigration.m in Sources */ = {isa = PBXBuildFile; fileRef = 34ABB2C22090C59600C727A6 /* OWSResaveCollectionDBMigration.m */; };
|
||||
34ABB2C52090C59700C727A6 /* OWSResaveCollectionDBMigration.h in Headers */ = {isa = PBXBuildFile; fileRef = 34ABB2C32090C59700C727A6 /* OWSResaveCollectionDBMigration.h */; };
|
||||
|
@ -828,6 +829,7 @@
|
|||
349EA07B2162AEA700F7B17F /* OWS111UDAttributesMigration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OWS111UDAttributesMigration.swift; sourceTree = "<group>"; };
|
||||
34A55F3520485464002CC6DE /* OWS2FARegistrationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWS2FARegistrationViewController.m; sourceTree = "<group>"; };
|
||||
34A55F3620485464002CC6DE /* OWS2FARegistrationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWS2FARegistrationViewController.h; sourceTree = "<group>"; };
|
||||
34A6C27F21E503E600B5B12E /* OWSImagePickerController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OWSImagePickerController.swift; sourceTree = "<group>"; };
|
||||
34A8B3502190A40E00218A25 /* MediaAlbumCellView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MediaAlbumCellView.swift; sourceTree = "<group>"; };
|
||||
34ABB2C22090C59600C727A6 /* OWSResaveCollectionDBMigration.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OWSResaveCollectionDBMigration.m; sourceTree = "<group>"; };
|
||||
34ABB2C32090C59700C727A6 /* OWSResaveCollectionDBMigration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OWSResaveCollectionDBMigration.h; sourceTree = "<group>"; };
|
||||
|
@ -1837,6 +1839,7 @@
|
|||
45D2AC01204885170033C692 /* OWS2FAReminderViewController.swift */,
|
||||
345BC30A2047030600257B7C /* OWS2FASettingsViewController.h */,
|
||||
345BC30B2047030600257B7C /* OWS2FASettingsViewController.m */,
|
||||
34A6C27F21E503E600B5B12E /* OWSImagePickerController.swift */,
|
||||
34969558219B605E00DCFE74 /* PhotoLibrary */,
|
||||
34CE88E51F2FB9A10098030F /* ProfileViewController.h */,
|
||||
34CE88E61F2FB9A10098030F /* ProfileViewController.m */,
|
||||
|
@ -3561,6 +3564,7 @@
|
|||
3496955C219B605E00DCFE74 /* ImagePickerController.swift in Sources */,
|
||||
34D1F0841F8678AA0066283D /* ConversationInputToolbar.m in Sources */,
|
||||
457F671B20746193000EABCD /* QuotedReplyPreview.swift in Sources */,
|
||||
34A6C28021E503E700B5B12E /* OWSImagePickerController.swift in Sources */,
|
||||
34DBF004206BD5A500025978 /* OWSBubbleView.m in Sources */,
|
||||
3496957021A301A100DCFE74 /* OWSBackupIO.m in Sources */,
|
||||
34E88D262098C5AE00A608F4 /* ContactViewController.swift in Sources */,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AvatarViewHelper.h"
|
||||
|
@ -75,7 +75,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
return;
|
||||
}
|
||||
|
||||
UIImagePickerController *picker = [UIImagePickerController new];
|
||||
UIImagePickerController *picker = [OWSImagePickerController new];
|
||||
picker.delegate = self;
|
||||
picker.allowsEditing = NO;
|
||||
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
|
||||
|
@ -96,7 +96,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
return;
|
||||
}
|
||||
|
||||
UIImagePickerController *picker = [UIImagePickerController new];
|
||||
UIImagePickerController *picker = [OWSImagePickerController new];
|
||||
picker.delegate = self;
|
||||
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
|
||||
picker.mediaTypes = @[ (__bridge NSString *)kUTTypeImage ];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
// Originally based on EPContacts
|
||||
|
@ -99,7 +99,10 @@ public class ContactsPicker: OWSViewController, UITableViewDelegate, UITableView
|
|||
self.tableView.separatorColor = Theme.cellSeparatorColor
|
||||
|
||||
view.addSubview(tableView)
|
||||
tableView.autoPinEdgesToSuperviewEdges()
|
||||
tableView.autoPinEdge(toSuperviewEdge: .top)
|
||||
tableView.autoPinEdge(toSuperviewEdge: .bottom)
|
||||
tableView.autoPinEdge(toSuperviewSafeArea: .leading)
|
||||
tableView.autoPinEdge(toSuperviewSafeArea: .trailing)
|
||||
tableView.delegate = self
|
||||
tableView.dataSource = self
|
||||
|
||||
|
|
|
@ -2692,8 +2692,8 @@ typedef enum : NSUInteger {
|
|||
OWSLogWarn(@"camera permission denied.");
|
||||
return;
|
||||
}
|
||||
|
||||
UIImagePickerController *picker = [UIImagePickerController new];
|
||||
|
||||
UIImagePickerController *picker = [OWSImagePickerController new];
|
||||
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
|
||||
picker.mediaTypes = @[ (__bridge NSString *)kUTTypeImage, (__bridge NSString *)kUTTypeMovie ];
|
||||
picker.allowsEditing = NO;
|
||||
|
@ -2737,7 +2737,7 @@ typedef enum : NSUInteger {
|
|||
|
||||
pickerModal = [[OWSNavigationController alloc] initWithRootViewController:picker];
|
||||
} else {
|
||||
UIImagePickerController *picker = [UIImagePickerController new];
|
||||
UIImagePickerController *picker = [OWSImagePickerController new];
|
||||
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
|
||||
picker.delegate = self;
|
||||
picker.mediaTypes = @[ (__bridge NSString *)kUTTypeImage, (__bridge NSString *)kUTTypeMovie ];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
@ -173,7 +173,8 @@ class GifPickerViewController: OWSViewController, UISearchBarDelegate, UICollect
|
|||
// Inserted below searchbar because we later occlude the collectionview
|
||||
// by inserting a masking layer between the search bar and collectionview
|
||||
self.view.insertSubview(self.collectionView, belowSubview: searchBar)
|
||||
self.collectionView.autoPinWidthToSuperview()
|
||||
self.collectionView.autoPinEdge(toSuperviewSafeArea: .leading)
|
||||
self.collectionView.autoPinEdge(toSuperviewSafeArea: .trailing)
|
||||
self.collectionView.autoPinEdge(.top, to: .bottom, of: searchBar)
|
||||
|
||||
// for iPhoneX devices, extends the black background to the bottom edge of the view.
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
//
|
||||
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
@objc class OWSImagePickerController: UIImagePickerController {
|
||||
|
||||
// MARK: Orientation
|
||||
|
||||
override public var supportedInterfaceOrientations: UIInterfaceOrientationMask {
|
||||
return .allButUpsideDown
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue