Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
SvenTiigi committed Mar 29, 2018
2 parents e4b051f + 33d2602 commit c945cd3
Show file tree
Hide file tree
Showing 16 changed files with 416 additions and 121 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
40 changes: 24 additions & 16 deletions FlyoverKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
3D5D662E203F45BA00A45E6C /* .jazzy.yaml in Resources */ = {isa = PBXBuildFile; fileRef = 3D5D662C203F45BA00A45E6C /* .jazzy.yaml */; };
3D5D6631203F45D100A45E6C /* .swift-version in Resources */ = {isa = PBXBuildFile; fileRef = 3D5D662F203F45D000A45E6C /* .swift-version */; };
3D5D6632203F45D100A45E6C /* Cartfile.private in Resources */ = {isa = PBXBuildFile; fileRef = 3D5D6630203F45D000A45E6C /* Cartfile.private */; };
3D76D7BE2048BC1D003BCD41 /* SplitScreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D76D7BD2048BC1D003BCD41 /* SplitScreenViewController.swift */; };
3D8DB858203DD904008A079D /* FlyoverKit.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 3D8DB856203DD903008A079D /* FlyoverKit.podspec */; };
3D8DB859203DD904008A079D /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 3D8DB857203DD903008A079D /* README.md */; };
3D8F94AE203D804F006E7659 /* FlyoverKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D8F94A4203D804F006E7659 /* FlyoverKit.framework */; };
Expand All @@ -26,9 +27,9 @@
3D8F94DC203D85FE006E7659 /* FlyoverKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D8F94A4203D804F006E7659 /* FlyoverKit.framework */; };
3D8F94DD203D85FE006E7659 /* FlyoverKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3D8F94A4203D804F006E7659 /* FlyoverKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
3D8F94E3203D8612006E7659 /* SnapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D8F94E2203D8612006E7659 /* SnapKit.framework */; };
3D8F94E9203D86A8006E7659 /* ConfigurationTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F94E6203D86A8006E7659 /* ConfigurationTableViewCell.swift */; };
3D8F94EA203D86A8006E7659 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F94E7203D86A8006E7659 /* Configuration.swift */; };
3D8F94EB203D86A8006E7659 /* ConfigurationTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F94E8203D86A8006E7659 /* ConfigurationTableView.swift */; };
3D8F94E9203D86A8006E7659 /* FlyoverConfigurationTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F94E6203D86A8006E7659 /* FlyoverConfigurationTableViewCell.swift */; };
3D8F94EA203D86A8006E7659 /* FlyoverConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F94E7203D86A8006E7659 /* FlyoverConfiguration.swift */; };
3D8F94EB203D86A8006E7659 /* FlyoverConfigurationTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F94E8203D86A8006E7659 /* FlyoverConfigurationTableView.swift */; };
3D8F94ED203D86B2006E7659 /* UIColor+Main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F94EC203D86B2006E7659 /* UIColor+Main.swift */; };
3D8F94EF203D86BB006E7659 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D8F94EE203D86BB006E7659 /* ViewController.swift */; };
3DB39A4D203D9C7E00E00B2D /* FlyoverMapView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB39A4C203D9C7E00E00B2D /* FlyoverMapView.swift */; };
Expand Down Expand Up @@ -82,6 +83,7 @@
3D5D662C203F45BA00A45E6C /* .jazzy.yaml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = .jazzy.yaml; sourceTree = SOURCE_ROOT; };
3D5D662F203F45D000A45E6C /* .swift-version */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ".swift-version"; sourceTree = SOURCE_ROOT; };
3D5D6630203F45D000A45E6C /* Cartfile.private */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Cartfile.private; sourceTree = SOURCE_ROOT; };
3D76D7BD2048BC1D003BCD41 /* SplitScreenViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplitScreenViewController.swift; sourceTree = "<group>"; };
3D8DB856203DD903008A079D /* FlyoverKit.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FlyoverKit.podspec; sourceTree = SOURCE_ROOT; };
3D8DB857203DD903008A079D /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = SOURCE_ROOT; };
3D8F94A4203D804F006E7659 /* FlyoverKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FlyoverKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand All @@ -98,9 +100,9 @@
3D8F94D5203D849D006E7659 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
3D8F94D7203D849D006E7659 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3D8F94E2203D8612006E7659 /* SnapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SnapKit.framework; path = Carthage/Build/iOS/SnapKit.framework; sourceTree = "<group>"; };
3D8F94E6203D86A8006E7659 /* ConfigurationTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfigurationTableViewCell.swift; sourceTree = "<group>"; };
3D8F94E7203D86A8006E7659 /* Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Configuration.swift; sourceTree = "<group>"; };
3D8F94E8203D86A8006E7659 /* ConfigurationTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConfigurationTableView.swift; sourceTree = "<group>"; };
3D8F94E6203D86A8006E7659 /* FlyoverConfigurationTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlyoverConfigurationTableViewCell.swift; sourceTree = "<group>"; };
3D8F94E7203D86A8006E7659 /* FlyoverConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlyoverConfiguration.swift; sourceTree = "<group>"; };
3D8F94E8203D86A8006E7659 /* FlyoverConfigurationTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FlyoverConfigurationTableView.swift; sourceTree = "<group>"; };
3D8F94EC203D86B2006E7659 /* UIColor+Main.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Main.swift"; sourceTree = "<group>"; };
3D8F94EE203D86BB006E7659 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
3DB39A4C203D9C7E00E00B2D /* FlyoverMapView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FlyoverMapView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -211,7 +213,7 @@
children = (
3D8F94CB203D849D006E7659 /* AppDelegate.swift */,
3D8F94EE203D86BB006E7659 /* ViewController.swift */,
3D8F94E5203D869A006E7659 /* Configuration */,
3D8F94E5203D869A006E7659 /* FlyoverConfiguration */,
3D8F94DB203D853F006E7659 /* Supporting Files */,
3D8DB855203DD8E4008A079D /* MetaData */,
);
Expand All @@ -221,6 +223,7 @@
3D8F94DB203D853F006E7659 /* Supporting Files */ = {
isa = PBXGroup;
children = (
3D76D7BD2048BC1D003BCD41 /* SplitScreenViewController.swift */,
3D8F94EC203D86B2006E7659 /* UIColor+Main.swift */,
3D8F94D4203D849D006E7659 /* LaunchScreen.storyboard */,
3D8F94D2203D849D006E7659 /* Assets.xcassets */,
Expand All @@ -237,14 +240,14 @@
name = Frameworks;
sourceTree = "<group>";
};
3D8F94E5203D869A006E7659 /* Configuration */ = {
3D8F94E5203D869A006E7659 /* FlyoverConfiguration */ = {
isa = PBXGroup;
children = (
3D8F94E7203D86A8006E7659 /* Configuration.swift */,
3D8F94E8203D86A8006E7659 /* ConfigurationTableView.swift */,
3D8F94E6203D86A8006E7659 /* ConfigurationTableViewCell.swift */,
3D8F94E7203D86A8006E7659 /* FlyoverConfiguration.swift */,
3D8F94E8203D86A8006E7659 /* FlyoverConfigurationTableView.swift */,
3D8F94E6203D86A8006E7659 /* FlyoverConfigurationTableViewCell.swift */,
);
path = Configuration;
path = FlyoverConfiguration;
sourceTree = "<group>";
};
3DB39A54203DCADD00E00B2D /* MapView */ = {
Expand Down Expand Up @@ -354,7 +357,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Sven Tiigi";
TargetAttributes = {
3D8F94A3203D804F006E7659 = {
Expand Down Expand Up @@ -492,11 +495,12 @@
buildActionMask = 2147483647;
files = (
3D8F94ED203D86B2006E7659 /* UIColor+Main.swift in Sources */,
3D76D7BE2048BC1D003BCD41 /* SplitScreenViewController.swift in Sources */,
3D8F94EF203D86BB006E7659 /* ViewController.swift in Sources */,
3D8F94CC203D849D006E7659 /* AppDelegate.swift in Sources */,
3D8F94EB203D86A8006E7659 /* ConfigurationTableView.swift in Sources */,
3D8F94EA203D86A8006E7659 /* Configuration.swift in Sources */,
3D8F94E9203D86A8006E7659 /* ConfigurationTableViewCell.swift in Sources */,
3D8F94EB203D86A8006E7659 /* FlyoverConfigurationTableView.swift in Sources */,
3D8F94EA203D86A8006E7659 /* FlyoverConfiguration.swift in Sources */,
3D8F94E9203D86A8006E7659 /* FlyoverConfigurationTableViewCell.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -541,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 @@ -601,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
1 change: 1 addition & 0 deletions FlyoverKitExample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
navigationController.navigationBar.largeTitleTextAttributes = [
NSAttributedStringKey.foregroundColor: UIColor.main
]
navigationController.view.backgroundColor = .white
navigationController.navigationBar.tintColor = .main
navigationController.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor: UIColor.main]
return navigationController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import MapKit

// MARK: - Configuration

/// The Configuration Enumeration
enum Configuration {
/// The FlyoverConfiguration Enumeration
enum FlyoverConfiguration {

/// Flyover start/stop boolean
case flyover(Bool)
Expand Down Expand Up @@ -76,7 +76,7 @@ enum Configuration {

// MARK: - RawRepresentable

extension Configuration: RawRepresentable {
extension FlyoverConfiguration: RawRepresentable {

/// Associated type RawValue as String
typealias RawValue = String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// ConfigurationTableView.swift
// FlyoverConfigurationTableView.swift
// FlyoverKitExample
//
// Created by Sven Tiigi on 21.02.18.
Expand All @@ -8,47 +8,43 @@

import UIKit

// MARK: - ConfigurationTableViewDelegate
// MARK: - FlyoverConfigurationTableViewDelegate

/// The ConfigurationTableViewDelegate
protocol ConfigurationTableViewDelegate: class {
/// The FlyoverConfigurationTableViewDelegate
protocol FlyoverConfigurationTableViewDelegate: class {
/// On Configuration Change
///
/// - Parameter configuration: The updated configuration
func onChange(_ configuration: Configuration)
func onChange(_ configuration: FlyoverConfiguration)
}

// MARK: - ConfigurationTableView
// MARK: - FlyoverConfigurationTableView

class ConfigurationTableView: UITableView {
class FlyoverConfigurationTableView: UITableView {

// MARK: Properties

/// The ConfigurationDelegate
weak var configurationDelegate: ConfigurationTableViewDelegate?
/// The FlyoverConfigurationTableViewDelegate
weak var configurationDelegate: FlyoverConfigurationTableViewDelegate?

/// The cells constructed with default configuration and delegate
lazy private var cells: [ConfigurationTableViewCell] = {
lazy private var cells: [FlyoverConfigurationTableViewCell] = {
// Initialize default configurations
let defaultConfigurations: [Configuration] = [
let defaultConfigurations: [FlyoverConfiguration] = [
.flyover(true),
.mapType(.standard),
.altitude(600.0),
.pitch(45.0),
.headingStep(20.0),
.duration(4.0)
]
return defaultConfigurations.map { ConfigurationTableViewCell($0, self.configurationDelegate) }
return defaultConfigurations.map { FlyoverConfigurationTableViewCell($0, self.configurationDelegate) }
}()

// MARK: Initializer

/// Default initializer with ConfigurationTableViewDelegate
///
/// - Parameter configurationDelegate: The delegate
init(configurationDelegate: ConfigurationTableViewDelegate) {
// Set configuration delegate
self.configurationDelegate = configurationDelegate
/// Default initializer
init() {
// Super init
super.init(frame: .zero, style: .plain)
// Set delegate to self
Expand All @@ -70,7 +66,7 @@ class ConfigurationTableView: UITableView {

// MARK: - UITableViewDataSource

extension ConfigurationTableView: UITableViewDataSource {
extension FlyoverConfigurationTableView: UITableViewDataSource {

func numberOfSections(in tableView: UITableView) -> Int {
// Return 1 section
Expand All @@ -91,7 +87,7 @@ extension ConfigurationTableView: UITableViewDataSource {

// MARK: - UITableViewDelegate

extension ConfigurationTableView: UITableViewDelegate {
extension FlyoverConfigurationTableView: UITableViewDelegate {

func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
// First two rows smaller then the rest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// ConfigurationTableViewCell.swift
// FlyoverConfigurationTableViewCell.swift
// FlyoverKitExample
//
// Created by Sven Tiigi on 21.02.18.
Expand All @@ -9,17 +9,17 @@
import MapKit
import UIKit

// MARK: - ConfigurationTableViewCell
// MARK: - FlyoverConfigurationTableViewCell

class ConfigurationTableViewCell: UITableViewCell {
class FlyoverConfigurationTableViewCell: UITableViewCell {

// MARK: Properties

/// The Configuration
var configuration: Configuration
var configuration: FlyoverConfiguration

/// The ConfigurationTableViewDelegate
weak var delegate: ConfigurationTableViewDelegate?
/// The FlyoverConfigurationTableViewDelegate
weak var delegate: FlyoverConfigurationTableViewDelegate?

/// The title label
lazy var titleLabel: UILabel = {
Expand Down Expand Up @@ -68,7 +68,7 @@ class ConfigurationTableViewCell: UITableViewCell {
/// - Parameters:
/// - configuration: The Configuration
/// - delegate: The Delegate
init(_ configuration: Configuration, _ delegate: ConfigurationTableViewDelegate?) {
init(_ configuration: FlyoverConfiguration, _ delegate: FlyoverConfigurationTableViewDelegate?) {
// Set configuration
self.configuration = configuration
// Set delegate
Expand Down Expand Up @@ -187,7 +187,7 @@ class ConfigurationTableViewCell: UITableViewCell {
// Initialize value of Double slider value type
let value = Double(self.slider.value)
// Declare updated configuration
let updatedConfiguration: Configuration?
let updatedConfiguration: FlyoverConfiguration?
// Switch on configuration
switch self.configuration {
case .duration:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"images" : [
{
"idiom" : "universal",
"filename" : "icons8-github-22.png",
"filename" : "icons8-github-filled-26.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "icons8-github-44.png",
"filename" : "icons8-github-filled-52.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "icons8-github-88.png",
"filename" : "icons8-github-filled-78.png",
"scale" : "3x"
}
],
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c945cd3

Please sign in to comment.