Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions BMLPVideoArchiver.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
6B6B3FDA1BE1A9AA00EDE9F2 /* GTMOAuth2ViewTouch.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6B6B3FD91BE1A9AA00EDE9F2 /* GTMOAuth2ViewTouch.xib */; };
6B6B3FE51BE1A9E500EDE9F2 /* GTLDrive_Sources.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6B3FE31BE1A9E500EDE9F2 /* GTLDrive_Sources.m */; };
6B9B14741C1FB62200E5A662 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B9B14731C1FB62200E5A662 /* MobileCoreServices.framework */; };
6BD4C6601CA609930032302C /* InterfaceOrientationNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BD4C65F1CA609930032302C /* InterfaceOrientationNavigationController.m */; };
6BD4C6631CA61A6E0032302C /* LandscapeImagePickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BD4C6621CA61A6E0032302C /* LandscapeImagePickerController.m */; };
6BDC39C21BDF22EF0036BE01 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BDC39C11BDF22EF0036BE01 /* main.m */; };
6BDC39C51BDF22EF0036BE01 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BDC39C41BDF22EF0036BE01 /* AppDelegate.m */; };
6BDC39CB1BDF22EF0036BE01 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6BDC39C91BDF22EF0036BE01 /* Main.storyboard */; };
Expand Down Expand Up @@ -73,6 +75,10 @@
6B6B3FE31BE1A9E500EDE9F2 /* GTLDrive_Sources.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GTLDrive_Sources.m; sourceTree = "<group>"; };
6B6B3FE41BE1A9E500EDE9F2 /* GTLDrive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GTLDrive.h; sourceTree = "<group>"; };
6B9B14731C1FB62200E5A662 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
6BD4C65E1CA609930032302C /* InterfaceOrientationNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InterfaceOrientationNavigationController.h; sourceTree = "<group>"; };
6BD4C65F1CA609930032302C /* InterfaceOrientationNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InterfaceOrientationNavigationController.m; sourceTree = "<group>"; };
6BD4C6611CA61A6E0032302C /* LandscapeImagePickerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LandscapeImagePickerController.h; sourceTree = "<group>"; };
6BD4C6621CA61A6E0032302C /* LandscapeImagePickerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LandscapeImagePickerController.m; sourceTree = "<group>"; };
6BDC39BD1BDF22EF0036BE01 /* BMLPVideoArchiver.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BMLPVideoArchiver.app; sourceTree = BUILT_PRODUCTS_DIR; };
6BDC39C11BDF22EF0036BE01 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
6BDC39C31BDF22EF0036BE01 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -148,10 +154,14 @@
6BDC39C41BDF22EF0036BE01 /* AppDelegate.m */,
6B6B3FE31BE1A9E500EDE9F2 /* GTLDrive_Sources.m */,
6B6B3FE41BE1A9E500EDE9F2 /* GTLDrive.h */,
6BD4C65E1CA609930032302C /* InterfaceOrientationNavigationController.h */,
6BD4C65F1CA609930032302C /* InterfaceOrientationNavigationController.m */,
6BE642441C388052003CA4A1 /* LogInViewController.h */,
6BE642451C388052003CA4A1 /* LogInViewController.m */,
6BDC39D71BDF274A0036BE01 /* VideoViewController.h */,
6BDC39D81BDF274A0036BE01 /* VideoViewController.m */,
6BD4C6611CA61A6E0032302C /* LandscapeImagePickerController.h */,
6BD4C6621CA61A6E0032302C /* LandscapeImagePickerController.m */,
6B0263F91C2F62EF0099BF46 /* CameraOverlayViewController.h */,
6B0263FA1C2F62EF0099BF46 /* CameraOverlayViewController.m */,
6B0263FB1C2F62EF0099BF46 /* CameraOverlayViewController.xib */,
Expand Down Expand Up @@ -378,11 +388,13 @@
buildActionMask = 2147483647;
files = (
6BE642461C388052003CA4A1 /* LogInViewController.m in Sources */,
6BD4C6631CA61A6E0032302C /* LandscapeImagePickerController.m in Sources */,
6BDC39C51BDF22EF0036BE01 /* AppDelegate.m in Sources */,
6B6B3FE51BE1A9E500EDE9F2 /* GTLDrive_Sources.m in Sources */,
6BDC39C21BDF22EF0036BE01 /* main.m in Sources */,
6BDC39D91BDF274A0036BE01 /* VideoViewController.m in Sources */,
6B0264001C2F632A0099BF46 /* CustomCameraOverlayView.m in Sources */,
6BD4C6601CA609930032302C /* InterfaceOrientationNavigationController.m in Sources */,
6B0263FC1C2F62EF0099BF46 /* CameraOverlayViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion BMLPVideoArchiver/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property (nonatomic) BOOL isCameraPresented;

@end

20 changes: 19 additions & 1 deletion BMLPVideoArchiver/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#import "AppDelegate.h"
#import "VideoViewController.h"
#import "LogInViewController.h"
#import "InterfaceOrientationNavigationController.h"
#import "LandscapeImagePickerController.h"

@interface AppDelegate ()

Expand All @@ -18,10 +20,26 @@ @interface AppDelegate ()

@implementation AppDelegate

//- (UIInterfaceOrientationMask)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
//// if (([window.rootViewController.presentedViewController isKindOfClass:[LandscapeImagePickerController class]])) {
//// return UIInterfaceOrientationMaskLandscape;
//// }
//
// if (self.isCameraPresented){
//
// NSLog(@"isPresented %d", self.isCameraPresented);
// return UIInterfaceOrientationMaskLandscape;
// }
//
// return UIInterfaceOrientationMaskAll;
//}


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

UINavigationController *navigationController = (UINavigationController *) self.window.rootViewController;
self.isCameraPresented = NO;

InterfaceOrientationNavigationController *navigationController = (InterfaceOrientationNavigationController *) self.window.rootViewController;
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];


Expand Down
5 changes: 3 additions & 2 deletions BMLPVideoArchiver/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="7eu-VO-pBB">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="7eu-VO-pBB">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="Z0K-TR-f9p">
<objects>
<navigationController storyboardIdentifier="MainNavigationController" id="7eu-VO-pBB" sceneMemberID="viewController">
<keyCommands/>
<navigationBar key="navigationBar" contentMode="scaleToFill" id="SxQ-ik-oNO">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
Expand Down
17 changes: 17 additions & 0 deletions BMLPVideoArchiver/CameraOverlayViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,21 @@ @interface CameraOverlayViewController ()

@implementation CameraOverlayViewController

-(BOOL)shouldAutorotate
{
return YES;
}

-(UIInterfaceOrientationMask)supportedInterfaceOrientations
{

return UIInterfaceOrientationMaskLandscape;
}

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{

return UIInterfaceOrientationLandscapeLeft;
}

@end
4 changes: 2 additions & 2 deletions BMLPVideoArchiver/CameraOverlayViewController.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10116" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="CameraOverlayViewController">
Expand Down
13 changes: 13 additions & 0 deletions BMLPVideoArchiver/InterfaceOrientationNavigationController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// InterfaceOrientationNavigationController.h
// BMLPVideoArchiver
//
// Created by Justine Kay on 3/25/16.
// Copyright © 2016 Justine Kay. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface InterfaceOrientationNavigationController : UINavigationController

@end
45 changes: 45 additions & 0 deletions BMLPVideoArchiver/InterfaceOrientationNavigationController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
//
// InterfaceOrientationNavigationController.m
// BMLPVideoArchiver
//
// Created by Justine Kay on 3/25/16.
// Copyright © 2016 Justine Kay. All rights reserved.
//

#import "InterfaceOrientationNavigationController.h"
#import "AppDelegate.h"

@interface InterfaceOrientationNavigationController ()

@end

@implementation InterfaceOrientationNavigationController

//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
//{
// return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
//}

- (BOOL)shouldAutorotate
{
return NO;
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
// AppDelegate *appDelgate=[[UIApplication sharedApplication] delegate];
//
// if (appDelgate.isCameraPresented) {
//
// return UIInterfaceOrientationMaskLandscape;
//
// }
return UIInterfaceOrientationMaskLandscape;
}

- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationLandscapeRight;
}

@end
13 changes: 13 additions & 0 deletions BMLPVideoArchiver/LandscapeImagePickerController.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
//
// LandscapeImagePickerController.h
// BMLPVideoArchiver
//
// Created by Justine Kay on 3/25/16.
// Copyright © 2016 Justine Kay. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface LandscapeImagePickerController : UIImagePickerController

@end
44 changes: 44 additions & 0 deletions BMLPVideoArchiver/LandscapeImagePickerController.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
//
// LandscapeImagePickerController.m
// BMLPVideoArchiver
//
// Created by Justine Kay on 3/25/16.
// Copyright © 2016 Justine Kay. All rights reserved.
//

#import "LandscapeImagePickerController.h"

@interface LandscapeImagePickerController ()

@end

@implementation LandscapeImagePickerController

//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
//{
// return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
//}

//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
//{
// return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
//}

-(BOOL)shouldAutorotate
{
return NO;
}

-(UIInterfaceOrientationMask)supportedInterfaceOrientations
{

return UIInterfaceOrientationMaskLandscape;
}

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{

return UIInterfaceOrientationLandscapeRight;
}

@end
18 changes: 18 additions & 0 deletions BMLPVideoArchiver/LogInViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ @interface LogInViewController ()

@implementation LogInViewController

-(BOOL)shouldAutorotate
{
return YES;
}

-(UIInterfaceOrientationMask)supportedInterfaceOrientations
{

return UIInterfaceOrientationMaskPortrait;
}

-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{

return UIInterfaceOrientationPortrait;
}


-(void)viewDidLoad
{
[super viewDidLoad];
Expand Down
4 changes: 3 additions & 1 deletion BMLPVideoArchiver/VideoViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#import <AVFoundation/AVFoundation.h>
#import "GTMOAuth2ViewControllerTouch.h"
#import "GTLDrive.h"
#import "LandscapeImagePickerController.h"
#import "CameraOverlayViewController.h"
#import "CustomCameraOverlayView.h"

Expand All @@ -25,8 +26,9 @@ CustomCameraOverlayDelegate

{
UITapGestureRecognizer *recordGestureRecognizer;
UIImagePickerController *camera;
LandscapeImagePickerController *camera;
AVAudioRecorder *audioRecorder;
BOOL isVideoFile;
BOOL inBackground;
BOOL mainFolder;
BOOL datedFolder;
Expand Down
Loading