mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
Bug Fix - Media Picker: The screen rotation is not locked during video recording.
We had to define a UINavigationController category to handle correctly auto rotation for the view controller presented modally. (see discussion http://stackoverflow.com/questions/12554204/ios-6-rotation-issue-no-rotation-from-presented-modal-view-controller)
This commit is contained in:
parent
fac36b26ff
commit
81a97953bd
4 changed files with 84 additions and 0 deletions
|
@ -218,6 +218,7 @@
|
|||
F056417C1C7C9FD7002276ED /* TableViewCellWithButton.xib in Resources */ = {isa = PBXBuildFile; fileRef = F056417A1C7C9FD7002276ED /* TableViewCellWithButton.xib */; };
|
||||
F05895001B8B7E6600B73E85 /* RoomBubbleCellData.m in Sources */ = {isa = PBXBuildFile; fileRef = F05894FF1B8B7E6600B73E85 /* RoomBubbleCellData.m */; };
|
||||
F067F2BC1CF6F0EA00F35EE8 /* third_party_licenses.html in Resources */ = {isa = PBXBuildFile; fileRef = F067F2BB1CF6F0EA00F35EE8 /* third_party_licenses.html */; };
|
||||
F07420A31D940FA80043B679 /* UINavigationController+Vector.m in Sources */ = {isa = PBXBuildFile; fileRef = F07420A21D940FA80043B679 /* UINavigationController+Vector.m */; };
|
||||
F07ECA4D1D2BB0A60060C09F /* TableViewCellWithCheckBoxes.m in Sources */ = {isa = PBXBuildFile; fileRef = F07ECA4B1D2BB0A60060C09F /* TableViewCellWithCheckBoxes.m */; };
|
||||
F07ECA4E1D2BB0A60060C09F /* TableViewCellWithCheckBoxes.xib in Resources */ = {isa = PBXBuildFile; fileRef = F07ECA4C1D2BB0A60060C09F /* TableViewCellWithCheckBoxes.xib */; };
|
||||
F08BE09E1B87025B00C480FB /* EventFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = F08BE09D1B87025B00C480FB /* EventFormatter.m */; };
|
||||
|
@ -565,6 +566,8 @@
|
|||
F05894FE1B8B7E6600B73E85 /* RoomBubbleCellData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoomBubbleCellData.h; sourceTree = "<group>"; };
|
||||
F05894FF1B8B7E6600B73E85 /* RoomBubbleCellData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoomBubbleCellData.m; sourceTree = "<group>"; };
|
||||
F067F2BB1CF6F0EA00F35EE8 /* third_party_licenses.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = third_party_licenses.html; sourceTree = "<group>"; };
|
||||
F07420A11D940F840043B679 /* UINavigationController+Vector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UINavigationController+Vector.h"; sourceTree = "<group>"; };
|
||||
F07420A21D940FA80043B679 /* UINavigationController+Vector.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UINavigationController+Vector.m"; sourceTree = "<group>"; };
|
||||
F07ECA4A1D2BB0A60060C09F /* TableViewCellWithCheckBoxes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TableViewCellWithCheckBoxes.h; path = TableViewCell/TableViewCellWithCheckBoxes.h; sourceTree = "<group>"; };
|
||||
F07ECA4B1D2BB0A60060C09F /* TableViewCellWithCheckBoxes.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TableViewCellWithCheckBoxes.m; path = TableViewCell/TableViewCellWithCheckBoxes.m; sourceTree = "<group>"; };
|
||||
F07ECA4C1D2BB0A60060C09F /* TableViewCellWithCheckBoxes.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = TableViewCellWithCheckBoxes.xib; path = TableViewCell/TableViewCellWithCheckBoxes.xib; sourceTree = "<group>"; };
|
||||
|
@ -1306,6 +1309,8 @@
|
|||
F0C34CB71C17145F00C36F09 /* MXKRoomBubbleTableViewCell+Vector.m */,
|
||||
323A52091C3183CC00010773 /* UIViewController+VectorSearch.h */,
|
||||
323A520A1C3183CC00010773 /* UIViewController+VectorSearch.m */,
|
||||
F07420A11D940F840043B679 /* UINavigationController+Vector.h */,
|
||||
F07420A21D940FA80043B679 /* UINavigationController+Vector.m */,
|
||||
);
|
||||
path = Categories;
|
||||
sourceTree = "<group>";
|
||||
|
@ -1693,6 +1698,7 @@
|
|||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F07420A31D940FA80043B679 /* UINavigationController+Vector.m in Sources */,
|
||||
F0DD2C7B1D18386300654345 /* ContactDetailsViewController.m in Sources */,
|
||||
3235CD881C3423070084EA40 /* HomeSearchTableViewCell.m in Sources */,
|
||||
F094A9AB1B78D8F000B1FBBF /* AppDelegate.m in Sources */,
|
||||
|
|
25
Vector/Categories/UINavigationController+Vector.h
Normal file
25
Vector/Categories/UINavigationController+Vector.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
Copyright 2016 OpenMarket Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#import <MatrixKit/MatrixKit.h>
|
||||
|
||||
/**
|
||||
The `UINavigationController` category overrides the default auto rotation handling.
|
||||
*/
|
||||
|
||||
@interface UINavigationController (Vector)
|
||||
|
||||
@end
|
51
Vector/Categories/UINavigationController+Vector.m
Normal file
51
Vector/Categories/UINavigationController+Vector.m
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
Copyright 2016 OpenMarket Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#import "UINavigationController+Vector.h"
|
||||
|
||||
@implementation UINavigationController (Vector)
|
||||
|
||||
- (BOOL)shouldAutorotate
|
||||
{
|
||||
if (self.topViewController)
|
||||
{
|
||||
return [self.topViewController shouldAutorotate];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
-(UIInterfaceOrientationMask)supportedInterfaceOrientations
|
||||
{
|
||||
if (self.topViewController)
|
||||
{
|
||||
return [self.topViewController supportedInterfaceOrientations];
|
||||
}
|
||||
|
||||
return UIInterfaceOrientationMaskAll;
|
||||
}
|
||||
|
||||
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
|
||||
{
|
||||
if (self.topViewController)
|
||||
{
|
||||
return [self.topViewController preferredInterfaceOrientationForPresentation];
|
||||
}
|
||||
|
||||
return UIInterfaceOrientationUnknown;
|
||||
}
|
||||
|
||||
@end
|
|
@ -18,6 +18,8 @@
|
|||
|
||||
#import "VectorDesignValues.h"
|
||||
|
||||
#import "UINavigationController+Vector.h"
|
||||
|
||||
#import <MediaPlayer/MediaPlayer.h>
|
||||
|
||||
#import <Photos/Photos.h>
|
||||
|
|
Loading…
Reference in a new issue