Skip to content

Commit d24b3e8

Browse files
authored
Merge pull request #41 from Metaxa007/feature/onboarding
Close #13
2 parents 5116af2 + d4f6239 commit d24b3e8

21 files changed

Lines changed: 435 additions & 8 deletions

OpenDocumentReader.xcodeproj/project.pbxproj

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
/* Begin PBXBuildFile section */
1010
21E6C5303C9ED8A9A9317BEC /* Pods_OpenDocumentReader.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EF00F649A86477A6C27F07C0 /* Pods_OpenDocumentReader.framework */; };
11+
AC384BCC23B4FFA700C7BF47 /* AppUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC384BA523B4FFA700C7BF47 /* AppUtility.swift */; };
12+
AC384BCD23B4FFA700C7BF47 /* ContentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC384BC923B4FFA700C7BF47 /* ContentViewController.swift */; };
13+
AC384BCE23B4FFA700C7BF47 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC384BCA23B4FFA700C7BF47 /* Constants.swift */; };
14+
AC384BCF23B4FFA700C7BF47 /* PageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC384BCB23B4FFA700C7BF47 /* PageViewController.swift */; };
1115
E2064DFE22CFA1BA006441F8 /* iAd.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E2064DDF22CFA1BA006441F8 /* iAd.framework */; };
1216
E22EB716226B621200053B86 /* DocumentBrowserTransitioningDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22EB6F7226B621200053B86 /* DocumentBrowserTransitioningDelegate.swift */; };
1317
E22EB718226B633500053B86 /* Document.swift in Sources */ = {isa = PBXBuildFile; fileRef = E22EB717226B633500053B86 /* Document.swift */; };
@@ -160,28 +164,28 @@
160164
isa = PBXContainerItemProxy;
161165
containerPortal = E26C38EA2250D91C009C484A /* odr.xcodeproj */;
162166
proxyType = 1;
163-
remoteGlobalIDString = 6EF4E076CF60433092E37E67;
167+
remoteGlobalIDString = 370F96077487484D87C97817;
164168
remoteInfo = glog;
165169
};
166170
E26C39322250D976009C484A /* PBXContainerItemProxy */ = {
167171
isa = PBXContainerItemProxy;
168172
containerPortal = E26C38EA2250D91C009C484A /* odr.xcodeproj */;
169173
proxyType = 1;
170-
remoteGlobalIDString = 527B291C96804BA39CF2D5CC;
174+
remoteGlobalIDString = 1B4C60E4C647499B83BED692;
171175
remoteInfo = miniz;
172176
};
173177
E26C39342250D976009C484A /* PBXContainerItemProxy */ = {
174178
isa = PBXContainerItemProxy;
175179
containerPortal = E26C38EA2250D91C009C484A /* odr.xcodeproj */;
176180
proxyType = 1;
177-
remoteGlobalIDString = 753F6F499E954CF09FDDDB35;
181+
remoteGlobalIDString = CE8A8F56DF7949EF9B454B10;
178182
remoteInfo = odrlib;
179183
};
180184
E26C39362250D976009C484A /* PBXContainerItemProxy */ = {
181185
isa = PBXContainerItemProxy;
182186
containerPortal = E26C38EA2250D91C009C484A /* odr.xcodeproj */;
183187
proxyType = 1;
184-
remoteGlobalIDString = 0485BB4A08784DE785195780;
188+
remoteGlobalIDString = 3CDE14922A8447A0AF9B2156;
185189
remoteInfo = tinyxml2;
186190
};
187191
E29A02212365EF7800BD6A96 /* PBXContainerItemProxy */ = {
@@ -251,13 +255,17 @@
251255
isa = PBXContainerItemProxy;
252256
containerPortal = E26C38EA2250D91C009C484A /* odr.xcodeproj */;
253257
proxyType = 1;
254-
remoteGlobalIDString = 0D80F2CF350D404897887FB1;
258+
remoteGlobalIDString = 32B5F430AA984ECA930C03F6;
255259
remoteInfo = "cryptopp-object";
256260
};
257261
/* End PBXContainerItemProxy section */
258262

259263
/* Begin PBXFileReference section */
260264
97704690541D85438FC2079C /* Pods-OpenDocumentReader.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenDocumentReader.release.xcconfig"; path = "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.release.xcconfig"; sourceTree = "<group>"; };
265+
AC384BA523B4FFA700C7BF47 /* AppUtility.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppUtility.swift; sourceTree = "<group>"; };
266+
AC384BC923B4FFA700C7BF47 /* ContentViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentViewController.swift; sourceTree = "<group>"; };
267+
AC384BCA23B4FFA700C7BF47 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
268+
AC384BCB23B4FFA700C7BF47 /* PageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PageViewController.swift; sourceTree = "<group>"; };
261269
B3FCFC99F5757D71C0A3EB11 /* Pods-OpenDocumentReader.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OpenDocumentReader.debug.xcconfig"; path = "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.debug.xcconfig"; sourceTree = "<group>"; };
262270
E2064DDF22CFA1BA006441F8 /* iAd.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = iAd.framework; path = System/Library/Frameworks/iAd.framework; sourceTree = SDKROOT; };
263271
E22EB6F7226B621200053B86 /* DocumentBrowserTransitioningDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DocumentBrowserTransitioningDelegate.swift; sourceTree = "<group>"; };
@@ -381,6 +389,10 @@
381389
E2F7ED54220B54D600D63515 /* DocumentBrowserViewController.swift */,
382390
E22EB6F7226B621200053B86 /* DocumentBrowserTransitioningDelegate.swift */,
383391
E22EB719226B65E300053B86 /* DocumentViewController.swift */,
392+
AC384BA523B4FFA700C7BF47 /* AppUtility.swift */,
393+
AC384BCA23B4FFA700C7BF47 /* Constants.swift */,
394+
AC384BC923B4FFA700C7BF47 /* ContentViewController.swift */,
395+
AC384BCB23B4FFA700C7BF47 /* PageViewController.swift */,
384396
E22EB717226B633500053B86 /* Document.swift */,
385397
E22EB71B226B66B300053B86 /* Main.storyboard */,
386398
E2F7ED5D220B54D700D63515 /* Assets.xcassets */,
@@ -752,10 +764,14 @@
752764
buildActionMask = 2147483647;
753765
files = (
754766
E22EB71A226B65E300053B86 /* DocumentViewController.swift in Sources */,
767+
AC384BCD23B4FFA700C7BF47 /* ContentViewController.swift in Sources */,
755768
E22EB718226B633500053B86 /* Document.swift in Sources */,
769+
AC384BCF23B4FFA700C7BF47 /* PageViewController.swift in Sources */,
756770
E2C008FA220F1CF80097C594 /* CoreWrapper.mm in Sources */,
757771
E2D0B3D9226D945400534FCC /* StoreReviewHelper.swift in Sources */,
758772
E22EB716226B621200053B86 /* DocumentBrowserTransitioningDelegate.swift in Sources */,
773+
AC384BCC23B4FFA700C7BF47 /* AppUtility.swift in Sources */,
774+
AC384BCE23B4FFA700C7BF47 /* Constants.swift in Sources */,
759775
E2F7ED55220B54D600D63515 /* DocumentBrowserViewController.swift in Sources */,
760776
E2F7ED53220B54D600D63515 /* AppDelegate.swift in Sources */,
761777
);

OpenDocumentReader/AppDelegate.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
7171

7272
return true
7373
}
74+
75+
/// Set orientations you want to be allowed in this property by default
76+
var orientationLock = UIInterfaceOrientationMask.all
77+
78+
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
79+
return self.orientationLock
80+
}
7481
}
7582

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//
2+
// AppUtility.swift
3+
// OpenDocumentReader
4+
//
5+
// Created by Artsem Lemiasheuski on 19.12.19.
6+
// Copyright © 2019 Thomas Taschauer. All rights reserved.
7+
//
8+
9+
import Foundation
10+
import UIKit
11+
12+
struct AppUtility {
13+
14+
static func lockOrientation(_ orientation: UIInterfaceOrientationMask) {
15+
16+
if let delegate = UIApplication.shared.delegate as? AppDelegate {
17+
delegate.orientationLock = orientation
18+
}
19+
}
20+
21+
/// Added method to adjust lock and rotate to the desired orientation
22+
static func lockOrientation(_ orientation: UIInterfaceOrientationMask, andRotateTo rotateOrientation:UIInterfaceOrientation) {
23+
24+
self.lockOrientation(orientation)
25+
26+
UIDevice.current.setValue(rotateOrientation.rawValue, forKey: "orientation")
27+
UINavigationController.attemptRotationToDeviceOrientation()
28+
}
29+
30+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"version" : 1,
4+
"author" : "xcode"
5+
}
6+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "onboard1@1x.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "onboard1@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "onboard1@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
122 KB
Loading
277 KB
Loading
496 KB
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"filename" : "onboard2@1x.png",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"filename" : "onboard2@2x.png",
11+
"scale" : "2x"
12+
},
13+
{
14+
"idiom" : "universal",
15+
"filename" : "onboard2@3x.png",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"version" : 1,
21+
"author" : "xcode"
22+
}
23+
}
231 KB
Loading

0 commit comments

Comments
 (0)