Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
5bbb8555
Commit
5bbb8555
authored
Aug 03, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added public to static properties in Application struct
parent
0ba48212
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
Sources/iOS/Application.swift
+9
-9
Sources/iOS/TransitionController.swift
+2
-2
No files found.
Sources/iOS/Application.swift
View file @
5bbb8555
...
@@ -32,32 +32,32 @@ import UIKit
...
@@ -32,32 +32,32 @@ import UIKit
public
struct
Application
{
public
struct
Application
{
/// An optional reference to the main UIWindow.
/// An optional reference to the main UIWindow.
static
var
keyWindow
:
UIWindow
?
{
public
static
var
keyWindow
:
UIWindow
?
{
return
UIApplication
.
shared
.
keyWindow
return
UIApplication
.
shared
.
keyWindow
}
}
/// An optional reference to the top most view controller.
/// An optional reference to the top most view controller.
static
var
rootViewController
:
UIViewController
?
{
public
static
var
rootViewController
:
UIViewController
?
{
return
keyWindow
?
.
rootViewController
return
keyWindow
?
.
rootViewController
}
}
/// A boolean indicating if the device is in Landscape mode.
/// A boolean indicating if the device is in Landscape mode.
static
var
isLandscape
:
Bool
{
public
static
var
isLandscape
:
Bool
{
return
UIApplication
.
shared
.
statusBarOrientation
.
isLandscape
return
UIApplication
.
shared
.
statusBarOrientation
.
isLandscape
}
}
/// A boolean indicating if the device is in Portrait mode.
/// A boolean indicating if the device is in Portrait mode.
static
var
isPortrait
:
Bool
{
public
static
var
isPortrait
:
Bool
{
return
!
isLandscape
return
!
isLandscape
}
}
/// The current UIInterfaceOrientation value.
/// The current UIInterfaceOrientation value.
static
var
orientation
:
UIInterfaceOrientation
{
public
static
var
orientation
:
UIInterfaceOrientation
{
return
UIApplication
.
shared
.
statusBarOrientation
return
UIApplication
.
shared
.
statusBarOrientation
}
}
/// Retrieves the device status bar style.
/// Retrieves the device status bar style.
static
var
statusBarStyle
:
UIStatusBarStyle
{
public
static
var
statusBarStyle
:
UIStatusBarStyle
{
get
{
get
{
return
UIApplication
.
shared
.
statusBarStyle
return
UIApplication
.
shared
.
statusBarStyle
}
}
...
@@ -67,7 +67,7 @@ public struct Application {
...
@@ -67,7 +67,7 @@ public struct Application {
}
}
/// Retrieves the device status bar hidden state.
/// Retrieves the device status bar hidden state.
static
var
isStatusBarHidden
:
Bool
{
public
static
var
isStatusBarHidden
:
Bool
{
get
{
get
{
return
UIApplication
.
shared
.
isStatusBarHidden
return
UIApplication
.
shared
.
isStatusBarHidden
}
}
...
@@ -80,12 +80,12 @@ public struct Application {
...
@@ -80,12 +80,12 @@ public struct Application {
A boolean that indicates based on iPhone rules if the
A boolean that indicates based on iPhone rules if the
status bar should be shown.
status bar should be shown.
*/
*/
static
var
shouldStatusBarBeHidden
:
Bool
{
public
static
var
shouldStatusBarBeHidden
:
Bool
{
return
isLandscape
&&
.
phone
==
Device
.
userInterfaceIdiom
return
isLandscape
&&
.
phone
==
Device
.
userInterfaceIdiom
}
}
/// A reference to the user interface layout direction.
/// A reference to the user interface layout direction.
static
var
userInterfaceLayoutDirection
:
UIUserInterfaceLayoutDirection
{
public
static
var
userInterfaceLayoutDirection
:
UIUserInterfaceLayoutDirection
{
return
UIApplication
.
shared
.
userInterfaceLayoutDirection
return
UIApplication
.
shared
.
userInterfaceLayoutDirection
}
}
}
}
Sources/iOS/TransitionController.swift
View file @
5bbb8555
...
@@ -49,8 +49,8 @@ internal extension UIViewController {
...
@@ -49,8 +49,8 @@ internal extension UIViewController {
}
}
/**
/**
Retrieves a flattened hierarchy of view controllers for a given type
.
Traverses the child view controllers to find the correct view controller type T
.
- Returns: An
Array
of type T.
- Returns: An
optional
of type T.
*/
*/
func
traverseTransitionViewControllerHierarchyForClassType
<
T
:
UIViewController
>
()
->
T
?
{
func
traverseTransitionViewControllerHierarchyForClassType
<
T
:
UIViewController
>
()
->
T
?
{
if
let
v
=
self
as?
T
{
if
let
v
=
self
as?
T
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment