Skip to content

Commit

Permalink
Support for swift3
Browse files Browse the repository at this point in the history
  • Loading branch information
daisuke310vvv committed Sep 16, 2016
1 parent 9f1cac3 commit 65fb3d1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
osx_image: xcode7.3
osx_image: xcode8
language: objective-c
script: set -o pipefail && xcodebuild test -project Example/PopupController.xcodeproj -scheme PopupController -sdk iphonesimulator9.3 | xcpretty
script: set -o pipefail && xcodebuild test -project Example/PopupController.xcodeproj -scheme PopupController -destination 'platform=iOS Simulator,name=iPhone 7' | xcpretty
22 changes: 11 additions & 11 deletions Classes/PopupController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ private extension PopupController {
isShowingKeyboard = true
let obj = (notification as NSNotification).userInfo?[UIKeyboardFrameEndUserInfoKey] as! NSValue

if needsToMoveFrom(obj.CGRectValue.origin) {
move(obj.CGRectValue.origin)
if needsToMoveFrom(obj.cgRectValue.origin) {
move(obj.cgRectValue.origin)
}
}

Expand Down Expand Up @@ -468,12 +468,12 @@ extension PopupController: UIGestureRecognizerDelegate {
}
}

extension UIViewController {
func popupController() -> PopupController? {
var parent = parent
while !(parent is PopupController || parent == nil) {
parent = parent!.parent
}
return parent as? PopupController
}
}
//extension UIViewController {
// func popupController() -> PopupController? {
// var parent = parent
// while !(parent is PopupController || parent == nil) {
// parent = parent!.parent
// }
// return parent as? PopupController
// }
//}
5 changes: 2 additions & 3 deletions Example/PopupController.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;

CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down Expand Up @@ -323,7 +322,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -365,7 +364,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_VERSION = 3.0;
Expand Down
2 changes: 1 addition & 1 deletion PopupController.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "PopupController"
s.version = "0.1.1"
s.version = "0.2.0"
s.summary = "PopupController is a controller for showing temporary popup view."
s.homepage = "https://github.com/daisuke310vvv/PopupController"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down

0 comments on commit 65fb3d1

Please sign in to comment.