Skip to content

Commit

Permalink
Merge pull request #180 from hyperoslo/swift4
Browse files Browse the repository at this point in the history
Swift4
  • Loading branch information
onmyway133 authored Oct 18, 2017
2 parents d162e42 + cbb5984 commit 9eb3a43
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Source/ShoutFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ open class ShoutView: UIView {

// MARK: - Timer methods

open func displayTimerDidFire() {
@objc open func displayTimerDidFire() {
shouldSilent = true

if panGestureActive { return }
Expand Down Expand Up @@ -262,7 +262,7 @@ open class ShoutView: UIView {

// MARK: - Handling screen orientation

func orientationDidChange() {
@objc func orientationDidChange() {
setupFrames()
}
}
6 changes: 3 additions & 3 deletions Source/WhisperFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ class WhisperFactory: NSObject {

// MARK: - Timer methods

func delayFired(_ timer: Timer) {
@objc func delayFired(_ timer: Timer) {
hideView()
}

func presentFired(_ timer: Timer) {
@objc func presentFired(_ timer: Timer) {
guard let navigationController = self.navigationController,
let userInfo = timer.userInfo as? [String : AnyObject],
let title = userInfo["title"] as? String,
Expand Down Expand Up @@ -252,7 +252,7 @@ class WhisperFactory: NSObject {

// MARK: - Handling screen orientation

func orientationDidChange() {
@objc func orientationDidChange() {
guard let navigationController = self.navigationController else { return }
for subview in navigationController.navigationBar.subviews {
guard let whisper = subview as? WhisperView else { continue }
Expand Down
6 changes: 3 additions & 3 deletions Source/WhistleFactory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ open class WhistleFactory: UIViewController {
NSString(string: text).boundingRect(
with: CGSize(width: labelWidth, height: CGFloat.infinity),
options: NSStringDrawingOptions.usesLineFragmentOrigin,
attributes: [NSFontAttributeName: titleLabel.font],
attributes: [NSAttributedStringKey.font: titleLabel.font],
context: nil
)
titleLabelHeight = CGFloat(neededDimensions.size.height)
Expand Down Expand Up @@ -166,11 +166,11 @@ open class WhistleFactory: UIViewController {

// MARK: - Timer methods

public func timerDidFire() {
@objc public func timerDidFire() {
hide()
}

func orientationDidChange() {
@objc func orientationDidChange() {
if whistleWindow.isKeyWindow {
setupFrames()
hide()
Expand Down
2 changes: 1 addition & 1 deletion Whisper.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.source_files = 'Source/**/*'
s.frameworks = 'UIKit', 'Foundation'
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '3.0' }
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' }
end
18 changes: 15 additions & 3 deletions Whisper.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 0900;
ORGANIZATIONNAME = "Hyper Interaktiv AS";
TargetAttributes = {
290530F81C20511C00FB382C = {
Expand Down Expand Up @@ -198,14 +198,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
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_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -248,14 +254,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
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_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -299,7 +311,7 @@
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.Whisper;
PRODUCT_NAME = Whisper;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -318,7 +330,7 @@
PRODUCT_BUNDLE_IDENTIFIER = no.hyper.Whisper;
PRODUCT_NAME = Whisper;
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
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 = "0800"
LastUpgradeVersion = "0900"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -36,6 +37,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down

0 comments on commit 9eb3a43

Please sign in to comment.