Skip to content

Commit

Permalink
Updated to Swift 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenTiigi committed Mar 29, 2018
1 parent 2cbe7cb commit 33d2602
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ excluded: # paths to ignore during linting. Takes precedence over `included`.

disabled_rules: # rule identifiers to exclude from running
- trailing_whitespace
- identifier_name

line_length: 130
6 changes: 5 additions & 1 deletion FlyoverKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Sven Tiigi";
TargetAttributes = {
3D8F94A3203D804F006E7659 = {
Expand Down Expand Up @@ -545,13 +545,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down Expand Up @@ -605,13 +607,15 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
LastUpgradeVersion = "0930"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,9 +26,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand Down Expand Up @@ -57,7 +56,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,8 @@ class FlyoverConfigurationTableView: UITableView {

// MARK: Initializer

/// Default initializer with FlyoverConfigurationTableViewDelegate
///
/// - Parameter configurationDelegate: The delegate
init(configurationDelegate: FlyoverConfigurationTableViewDelegate) {
// Set configuration delegate
self.configurationDelegate = configurationDelegate
/// Default initializer
init() {
// Super init
super.init(frame: .zero, style: .plain)
// Set delegate to self
Expand Down
14 changes: 8 additions & 6 deletions FlyoverKitExample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@ class ViewController: SplitScreenViewController {
// MARK: Propertirs

/// The FlyoverMapView
private lazy var flyoverMapView: FlyoverMapView = {
return FlyoverMapView(configurationTheme: .default)
}()
private var flyoverMapView: FlyoverMapView

/// The ConfigurationTableView
private lazy var configurationTableView: FlyoverConfigurationTableView = {
return FlyoverConfigurationTableView(configurationDelegate: self)
}()
private var configurationTableView: FlyoverConfigurationTableView

/// The example location
// Change the enum case to explore different locations 🤙
Expand All @@ -51,8 +47,14 @@ class ViewController: SplitScreenViewController {
configuration.dragView.startYPadding = 20
// Set white inner drag view background color
configuration.dragInnerView.backgroundColor = .white
// Initialize FlyoverMapView
self.flyoverMapView = FlyoverMapView(configurationTheme: .default)
// Initialize ConfigurationTableView
self.configurationTableView = FlyoverConfigurationTableView()
// Super init
super.init(topView: self.flyoverMapView, bottomView: self.configurationTableView, configuration: configuration)
// Set ConfigurationDelegate
self.configurationTableView.configurationDelegate = self
}

/// Initializer with NSCoder always return nil
Expand Down

0 comments on commit 33d2602

Please sign in to comment.