diff --git a/.travis.yml b/.travis.yml
index 26cbda5..4bf531a 100755
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,7 +10,7 @@ env:
- EXAMPLE_SCHEME="Example"
matrix:
- - DESTINATION="OS=10.2,name=iPad Pro (9.7 inch)" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" CODE_COV="NO"
+ - DESTINATION="OS=10.2,name=iPad Pro (9.7 inch)" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" CODE_COV="YES"
- DESTINATION="OS=9.0,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="NO" BUILD_EXAMPLE="YES" CODE_COV="NO"
script:
diff --git a/PanelKit Test Host/AppDelegate.swift b/PanelKit Test Host/AppDelegate.swift
new file mode 100644
index 0000000..f4dc85d
--- /dev/null
+++ b/PanelKit Test Host/AppDelegate.swift
@@ -0,0 +1,21 @@
+//
+// AppDelegate.swift
+// PanelKit Test Host
+//
+// Created by Louis D'hauwe on 09/03/2017.
+// Copyright © 2017 Silver Fox. All rights reserved.
+//
+
+import UIKit
+
+@UIApplicationMain
+class AppDelegate: UIResponder, UIApplicationDelegate {
+
+ var window: UIWindow?
+
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
+ // Override point for customization after application launch.
+ return true
+ }
+
+}
diff --git a/PanelKit Test Host/Assets.xcassets/AppIcon.appiconset/Contents.json b/PanelKit Test Host/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..36d2c80
--- /dev/null
+++ b/PanelKit Test Host/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,68 @@
+{
+ "images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "29x29",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "40x40",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "60x60",
+ "scale" : "3x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "29x29",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "40x40",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "ipad",
+ "size" : "76x76",
+ "scale" : "2x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
\ No newline at end of file
diff --git a/PanelKit Test Host/Base.lproj/LaunchScreen.storyboard b/PanelKit Test Host/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..fdf3f97
--- /dev/null
+++ b/PanelKit Test Host/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PanelKit Test Host/Base.lproj/Main.storyboard b/PanelKit Test Host/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..273375f
--- /dev/null
+++ b/PanelKit Test Host/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/PanelKit Test Host/Info.plist b/PanelKit Test Host/Info.plist
new file mode 100644
index 0000000..d052473
--- /dev/null
+++ b/PanelKit Test Host/Info.plist
@@ -0,0 +1,45 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UIRequiredDeviceCapabilities
+
+ armv7
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+
+
diff --git a/PanelKit Test Host/ViewController.swift b/PanelKit Test Host/ViewController.swift
new file mode 100644
index 0000000..a32778f
--- /dev/null
+++ b/PanelKit Test Host/ViewController.swift
@@ -0,0 +1,13 @@
+//
+// ViewController.swift
+// PanelKit Test Host
+//
+// Created by Louis D'hauwe on 09/03/2017.
+// Copyright © 2017 Silver Fox. All rights reserved.
+//
+
+import UIKit
+
+class ViewController: UIViewController {
+
+}
diff --git a/PanelKit.xcodeproj/project.pbxproj b/PanelKit.xcodeproj/project.pbxproj
index 0c69fe6..71f4120 100644
--- a/PanelKit.xcodeproj/project.pbxproj
+++ b/PanelKit.xcodeproj/project.pbxproj
@@ -28,6 +28,16 @@
BEBE2F431E71DED600DEDF21 /* PanelViewController+Keyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBE2F421E71DED600DEDF21 /* PanelViewController+Keyboard.swift */; };
BEBE2F451E71DFC100DEDF21 /* PanelViewController+Dragging.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBE2F441E71DFC100DEDF21 /* PanelViewController+Dragging.swift */; };
BEBE2F471E71ED0300DEDF21 /* PanelViewController+Offscreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBE2F461E71ED0300DEDF21 /* PanelViewController+Offscreen.swift */; };
+ BEBE2F4F1E71FC0B00DEDF21 /* PanelKitTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBE2F4E1E71FC0B00DEDF21 /* PanelKitTests.swift */; };
+ BEBE2F511E71FC0B00DEDF21 /* PanelKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE24AD031E4F6B11008892A2 /* PanelKit.framework */; };
+ BEBE2F5A1E71FCC500DEDF21 /* MapPanelContentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBE2F581E71FCC500DEDF21 /* MapPanelContentViewController.swift */; };
+ BEBE2F5B1E71FCC500DEDF21 /* TextPanelContentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBE2F591E71FCC500DEDF21 /* TextPanelContentViewController.swift */; };
+ BEBE2F5D1E71FE1900DEDF21 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBE2F5C1E71FE1900DEDF21 /* ViewController.swift */; };
+ BEBE2F651E7208C800DEDF21 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBE2F641E7208C800DEDF21 /* AppDelegate.swift */; };
+ BEBE2F671E7208C800DEDF21 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BEBE2F661E7208C800DEDF21 /* ViewController.swift */; };
+ BEBE2F6A1E7208C800DEDF21 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BEBE2F681E7208C800DEDF21 /* Main.storyboard */; };
+ BEBE2F6C1E7208C800DEDF21 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BEBE2F6B1E7208C800DEDF21 /* Assets.xcassets */; };
+ BEBE2F6F1E7208C800DEDF21 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BEBE2F6D1E7208C800DEDF21 /* LaunchScreen.storyboard */; };
BECEE6131E6E225800AB2B25 /* PanelManager+Dragging.swift in Sources */ = {isa = PBXBuildFile; fileRef = BECEE6121E6E225800AB2B25 /* PanelManager+Dragging.swift */; };
BECEE6151E6E234D00AB2B25 /* PanelManager+Default.swift in Sources */ = {isa = PBXBuildFile; fileRef = BECEE6141E6E234D00AB2B25 /* PanelManager+Default.swift */; };
BED541DF1E676172002A5459 /* PanelKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BE24AD031E4F6B11008892A2 /* PanelKit.framework */; };
@@ -45,6 +55,20 @@
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
+ BEBE2F521E71FC0B00DEDF21 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = BE24ACFA1E4F6B11008892A2 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = BE24AD021E4F6B11008892A2;
+ remoteInfo = PanelKit;
+ };
+ BEBE2F741E7208DE00DEDF21 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = BE24ACFA1E4F6B11008892A2 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = BEBE2F611E7208C800DEDF21;
+ remoteInfo = "PanelKit Test Host";
+ };
BED541E11E676172002A5459 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = BE24ACFA1E4F6B11008892A2 /* Project object */;
@@ -99,6 +123,19 @@
BEBE2F421E71DED600DEDF21 /* PanelViewController+Keyboard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "PanelViewController+Keyboard.swift"; path = "Controller/PanelViewController+Keyboard.swift"; sourceTree = ""; };
BEBE2F441E71DFC100DEDF21 /* PanelViewController+Dragging.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "PanelViewController+Dragging.swift"; path = "Controller/PanelViewController+Dragging.swift"; sourceTree = ""; };
BEBE2F461E71ED0300DEDF21 /* PanelViewController+Offscreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "PanelViewController+Offscreen.swift"; path = "Controller/PanelViewController+Offscreen.swift"; sourceTree = ""; };
+ BEBE2F4C1E71FC0A00DEDF21 /* PanelKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PanelKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ BEBE2F4E1E71FC0B00DEDF21 /* PanelKitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PanelKitTests.swift; sourceTree = ""; };
+ BEBE2F501E71FC0B00DEDF21 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ BEBE2F581E71FCC500DEDF21 /* MapPanelContentViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MapPanelContentViewController.swift; path = Panels/MapPanelContentViewController.swift; sourceTree = ""; };
+ BEBE2F591E71FCC500DEDF21 /* TextPanelContentViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TextPanelContentViewController.swift; path = Panels/TextPanelContentViewController.swift; sourceTree = ""; };
+ BEBE2F5C1E71FE1900DEDF21 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
+ BEBE2F621E7208C800DEDF21 /* PanelKit Test Host.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "PanelKit Test Host.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ BEBE2F641E7208C800DEDF21 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ BEBE2F661E7208C800DEDF21 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
+ BEBE2F691E7208C800DEDF21 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ BEBE2F6B1E7208C800DEDF21 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ BEBE2F6E1E7208C800DEDF21 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ BEBE2F701E7208C800DEDF21 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
BECEE6121E6E225800AB2B25 /* PanelManager+Dragging.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "PanelManager+Dragging.swift"; path = "PanelManager/PanelManager+Dragging.swift"; sourceTree = ""; };
BECEE6141E6E234D00AB2B25 /* PanelManager+Default.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "PanelManager+Default.swift"; path = "PanelManager/PanelManager+Default.swift"; sourceTree = ""; };
BEF8014A1E50F0C4007D3CEE /* UIViewController+Popover.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIViewController+Popover.swift"; path = "Utils/UIViewController+Popover.swift"; sourceTree = ""; };
@@ -125,6 +162,21 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ BEBE2F491E71FC0A00DEDF21 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BEBE2F511E71FC0B00DEDF21 /* PanelKit.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ BEBE2F5F1E7208C800DEDF21 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
BEFCF7631E6759F800BC95ED /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -149,6 +201,8 @@
BE24AD051E4F6B11008892A2 /* PanelKit */,
BEFCF7731E675D0600BC95ED /* PanelKit UI Test Host */,
BEFCF7671E6759F800BC95ED /* PanelKit UI Tests */,
+ BEBE2F631E7208C800DEDF21 /* PanelKit Test Host */,
+ BEBE2F4D1E71FC0A00DEDF21 /* PanelKit Tests */,
BE24AD041E4F6B11008892A2 /* Products */,
);
sourceTree = "";
@@ -159,6 +213,8 @@
BE24AD031E4F6B11008892A2 /* PanelKit.framework */,
BEFCF7661E6759F800BC95ED /* PanelKit UI Tests.xctest */,
BEFCF7721E675D0600BC95ED /* PanelKit UI Test Host.app */,
+ BEBE2F4C1E71FC0A00DEDF21 /* PanelKitTests.xctest */,
+ BEBE2F621E7208C800DEDF21 /* PanelKit Test Host.app */,
);
name = Products;
sourceTree = "";
@@ -217,6 +273,40 @@
name = PanelManager;
sourceTree = "";
};
+ BEBE2F4D1E71FC0A00DEDF21 /* PanelKit Tests */ = {
+ isa = PBXGroup;
+ children = (
+ BEBE2F5C1E71FE1900DEDF21 /* ViewController.swift */,
+ BEBE2F571E71FCA300DEDF21 /* Panels */,
+ BEBE2F4E1E71FC0B00DEDF21 /* PanelKitTests.swift */,
+ BEBE2F501E71FC0B00DEDF21 /* Info.plist */,
+ );
+ name = "PanelKit Tests";
+ path = PanelKitTests;
+ sourceTree = "";
+ };
+ BEBE2F571E71FCA300DEDF21 /* Panels */ = {
+ isa = PBXGroup;
+ children = (
+ BEBE2F581E71FCC500DEDF21 /* MapPanelContentViewController.swift */,
+ BEBE2F591E71FCC500DEDF21 /* TextPanelContentViewController.swift */,
+ );
+ name = Panels;
+ sourceTree = "";
+ };
+ BEBE2F631E7208C800DEDF21 /* PanelKit Test Host */ = {
+ isa = PBXGroup;
+ children = (
+ BEBE2F641E7208C800DEDF21 /* AppDelegate.swift */,
+ BEBE2F661E7208C800DEDF21 /* ViewController.swift */,
+ BEBE2F681E7208C800DEDF21 /* Main.storyboard */,
+ BEBE2F6B1E7208C800DEDF21 /* Assets.xcassets */,
+ BEBE2F6D1E7208C800DEDF21 /* LaunchScreen.storyboard */,
+ BEBE2F701E7208C800DEDF21 /* Info.plist */,
+ );
+ path = "PanelKit Test Host";
+ sourceTree = "";
+ };
BEF801491E50F0A1007D3CEE /* Utils */ = {
isa = PBXGroup;
children = (
@@ -292,6 +382,42 @@
productReference = BE24AD031E4F6B11008892A2 /* PanelKit.framework */;
productType = "com.apple.product-type.framework";
};
+ BEBE2F4B1E71FC0A00DEDF21 /* PanelKitTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = BEBE2F541E71FC0B00DEDF21 /* Build configuration list for PBXNativeTarget "PanelKitTests" */;
+ buildPhases = (
+ BEBE2F481E71FC0A00DEDF21 /* Sources */,
+ BEBE2F491E71FC0A00DEDF21 /* Frameworks */,
+ BEBE2F4A1E71FC0A00DEDF21 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ BEBE2F531E71FC0B00DEDF21 /* PBXTargetDependency */,
+ BEBE2F751E7208DE00DEDF21 /* PBXTargetDependency */,
+ );
+ name = PanelKitTests;
+ productName = PanelKitTests;
+ productReference = BEBE2F4C1E71FC0A00DEDF21 /* PanelKitTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ BEBE2F611E7208C800DEDF21 /* PanelKit Test Host */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = BEBE2F711E7208C800DEDF21 /* Build configuration list for PBXNativeTarget "PanelKit Test Host" */;
+ buildPhases = (
+ BEBE2F5E1E7208C800DEDF21 /* Sources */,
+ BEBE2F5F1E7208C800DEDF21 /* Frameworks */,
+ BEBE2F601E7208C800DEDF21 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = "PanelKit Test Host";
+ productName = "PanelKit Test Host";
+ productReference = BEBE2F621E7208C800DEDF21 /* PanelKit Test Host.app */;
+ productType = "com.apple.product-type.application";
+ };
BEFCF7651E6759F800BC95ED /* PanelKit UI Tests */ = {
isa = PBXNativeTarget;
buildConfigurationList = BEFCF76D1E6759F800BC95ED /* Build configuration list for PBXNativeTarget "PanelKit UI Tests" */;
@@ -344,6 +470,17 @@
LastSwiftMigration = 0820;
ProvisioningStyle = Automatic;
};
+ BEBE2F4B1E71FC0A00DEDF21 = {
+ CreatedOnToolsVersion = 8.2.1;
+ DevelopmentTeam = 6G5LMQ72D8;
+ ProvisioningStyle = Automatic;
+ TestTargetID = BEBE2F611E7208C800DEDF21;
+ };
+ BEBE2F611E7208C800DEDF21 = {
+ CreatedOnToolsVersion = 8.2.1;
+ DevelopmentTeam = 6G5LMQ72D8;
+ ProvisioningStyle = Automatic;
+ };
BEFCF7651E6759F800BC95ED = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = 6G5LMQ72D8;
@@ -373,6 +510,8 @@
BE24AD021E4F6B11008892A2 /* PanelKit */,
BEFCF7651E6759F800BC95ED /* PanelKit UI Tests */,
BEFCF7711E675D0600BC95ED /* PanelKit UI Test Host */,
+ BEBE2F4B1E71FC0A00DEDF21 /* PanelKitTests */,
+ BEBE2F611E7208C800DEDF21 /* PanelKit Test Host */,
);
};
/* End PBXProject section */
@@ -385,6 +524,23 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ BEBE2F4A1E71FC0A00DEDF21 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ BEBE2F601E7208C800DEDF21 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BEBE2F6F1E7208C800DEDF21 /* LaunchScreen.storyboard in Resources */,
+ BEBE2F6C1E7208C800DEDF21 /* Assets.xcassets in Resources */,
+ BEBE2F6A1E7208C800DEDF21 /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
BEFCF7641E6759F800BC95ED /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -436,6 +592,26 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
+ BEBE2F481E71FC0A00DEDF21 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BEBE2F5A1E71FCC500DEDF21 /* MapPanelContentViewController.swift in Sources */,
+ BEBE2F5B1E71FCC500DEDF21 /* TextPanelContentViewController.swift in Sources */,
+ BEBE2F5D1E71FE1900DEDF21 /* ViewController.swift in Sources */,
+ BEBE2F4F1E71FC0B00DEDF21 /* PanelKitTests.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ BEBE2F5E1E7208C800DEDF21 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ BEBE2F671E7208C800DEDF21 /* ViewController.swift in Sources */,
+ BEBE2F651E7208C800DEDF21 /* AppDelegate.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
BEFCF7621E6759F800BC95ED /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -458,6 +634,16 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
+ BEBE2F531E71FC0B00DEDF21 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = BE24AD021E4F6B11008892A2 /* PanelKit */;
+ targetProxy = BEBE2F521E71FC0B00DEDF21 /* PBXContainerItemProxy */;
+ };
+ BEBE2F751E7208DE00DEDF21 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = BEBE2F611E7208C800DEDF21 /* PanelKit Test Host */;
+ targetProxy = BEBE2F741E7208DE00DEDF21 /* PBXContainerItemProxy */;
+ };
BED541E21E676172002A5459 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = BE24AD021E4F6B11008892A2 /* PanelKit */;
@@ -471,6 +657,22 @@
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
+ BEBE2F681E7208C800DEDF21 /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ BEBE2F691E7208C800DEDF21 /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ BEBE2F6D1E7208C800DEDF21 /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ BEBE2F6E1E7208C800DEDF21 /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
BEFCF7781E675D0600BC95ED /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
@@ -630,6 +832,62 @@
};
name = Release;
};
+ BEBE2F551E71FC0B00DEDF21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEVELOPMENT_TEAM = 6G5LMQ72D8;
+ INFOPLIST_FILE = PanelKitTests/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 10.2;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = be.silverfox.PanelKitTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 3.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PanelKit Test Host.app/PanelKit Test Host";
+ };
+ name = Debug;
+ };
+ BEBE2F561E71FC0B00DEDF21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEVELOPMENT_TEAM = 6G5LMQ72D8;
+ INFOPLIST_FILE = PanelKitTests/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 10.2;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = be.silverfox.PanelKitTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 3.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PanelKit Test Host.app/PanelKit Test Host";
+ };
+ name = Release;
+ };
+ BEBE2F721E7208C800DEDF21 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ DEVELOPMENT_TEAM = 6G5LMQ72D8;
+ INFOPLIST_FILE = "PanelKit Test Host/Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.2;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "be.silverfox.PanelKit-Test-Host";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 3.0;
+ };
+ name = Debug;
+ };
+ BEBE2F731E7208C800DEDF21 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ DEVELOPMENT_TEAM = 6G5LMQ72D8;
+ INFOPLIST_FILE = "PanelKit Test Host/Info.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.2;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+ PRODUCT_BUNDLE_IDENTIFIER = "be.silverfox.PanelKit-Test-Host";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 3.0;
+ };
+ name = Release;
+ };
BEFCF76B1E6759F800BC95ED /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -709,6 +967,22 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
+ BEBE2F541E71FC0B00DEDF21 /* Build configuration list for PBXNativeTarget "PanelKitTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BEBE2F551E71FC0B00DEDF21 /* Debug */,
+ BEBE2F561E71FC0B00DEDF21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+ BEBE2F711E7208C800DEDF21 /* Build configuration list for PBXNativeTarget "PanelKit Test Host" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ BEBE2F721E7208C800DEDF21 /* Debug */,
+ BEBE2F731E7208C800DEDF21 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
BEFCF76D1E6759F800BC95ED /* Build configuration list for PBXNativeTarget "PanelKit UI Tests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
diff --git a/PanelKit.xcodeproj/xcshareddata/xcschemes/PanelKit.xcscheme b/PanelKit.xcodeproj/xcshareddata/xcschemes/PanelKit.xcscheme
index c7e15fc..8d0994e 100644
--- a/PanelKit.xcodeproj/xcshareddata/xcschemes/PanelKit.xcscheme
+++ b/PanelKit.xcodeproj/xcshareddata/xcschemes/PanelKit.xcscheme
@@ -38,6 +38,16 @@
ReferencedContainer = "container:PanelKit.xcodeproj">
+
+
+
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ BNDL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1
+
+
diff --git a/PanelKitTests/PanelKitTests.swift b/PanelKitTests/PanelKitTests.swift
new file mode 100644
index 0000000..6738ebe
--- /dev/null
+++ b/PanelKitTests/PanelKitTests.swift
@@ -0,0 +1,71 @@
+//
+// PanelKitTests.swift
+// PanelKitTests
+//
+// Created by Louis D'hauwe on 09/03/2017.
+// Copyright © 2017 Silver Fox. All rights reserved.
+//
+
+import XCTest
+@testable import PanelKit
+
+class PanelKitTests: XCTestCase {
+
+ var viewController: ViewController!
+ var navigationController: UINavigationController!
+
+ override func setUp() {
+ super.setUp()
+
+ viewController = ViewController()
+ navigationController = UINavigationController(rootViewController: viewController)
+ navigationController.view.frame = CGRect(origin: .zero, size: CGSize(width: 1024, height: 768))
+
+ UIApplication.shared.keyWindow!.rootViewController!.present(navigationController, animated: false, completion: nil)
+
+ XCTAssertNotNil(navigationController.view)
+ XCTAssertNotNil(viewController.view)
+
+ }
+
+ override func tearDown() {
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
+ super.tearDown()
+ }
+
+ func testFloating() {
+
+ let mapPanel = viewController.mapPanelVC!
+
+ assert(!mapPanel.isFloating)
+ assert(!mapPanel.isPinned)
+ assert(!mapPanel.isPresentedModally)
+ assert(!mapPanel.isPresentedAsPopover)
+
+ let popoverExp = self.expectation(description: "popover")
+ let popExp = self.expectation(description: "pop")
+
+ viewController.showMapPanelFromBarButton {
+
+ assert(mapPanel.isPresentedAsPopover)
+
+ self.viewController.toggleFloatStatus(for: mapPanel, completion: {
+
+ assert(mapPanel.isFloating)
+ popExp.fulfill()
+
+ })
+
+ popoverExp.fulfill()
+
+ }
+
+ waitForExpectations(timeout: 10.0) { (error) in
+ if let error = error {
+ XCTFail(error.localizedDescription)
+ }
+ }
+
+ }
+
+}
diff --git a/PanelKitTests/Panels/MapPanelContentViewController.swift b/PanelKitTests/Panels/MapPanelContentViewController.swift
new file mode 100644
index 0000000..4da5def
--- /dev/null
+++ b/PanelKitTests/Panels/MapPanelContentViewController.swift
@@ -0,0 +1,29 @@
+//
+// MapPanelContentViewController.swift
+// PanelKitTests
+//
+// Created by Louis D'hauwe on 09/03/2017.
+// Copyright © 2017 Silver Fox. All rights reserved.
+//
+
+import Foundation
+import PanelKit
+import MapKit
+
+class MapPanelContentViewController: PanelContentViewController {
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ let mapView = MKMapView(frame: view.bounds)
+ self.view.addSubview(mapView)
+
+ self.title = "Map"
+
+ }
+
+ override var preferredPanelContentSize: CGSize {
+ return CGSize(width: 320, height: 500)
+ }
+
+}
diff --git a/PanelKitTests/Panels/TextPanelContentViewController.swift b/PanelKitTests/Panels/TextPanelContentViewController.swift
new file mode 100644
index 0000000..fafccaf
--- /dev/null
+++ b/PanelKitTests/Panels/TextPanelContentViewController.swift
@@ -0,0 +1,34 @@
+//
+// TextPanelContentViewController.swift
+// PanelKitTests
+//
+// Created by Louis D'hauwe on 09/03/2017.
+// Copyright © 2017 Silver Fox. All rights reserved.
+//
+
+import Foundation
+import PanelKit
+
+class TextPanelContentViewController: PanelContentViewController {
+
+ weak var textView: UITextView!
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ textView = UITextView(frame: view.bounds)
+ self.view.addSubview(textView)
+
+ self.title = "TextView"
+
+ }
+
+ override var shouldAdjustForKeyboard: Bool {
+ return textView.isFirstResponder
+ }
+
+ override var preferredPanelContentSize: CGSize {
+ return CGSize(width: 320, height: 400)
+ }
+
+}
diff --git a/PanelKitTests/ViewController.swift b/PanelKitTests/ViewController.swift
new file mode 100644
index 0000000..36e8145
--- /dev/null
+++ b/PanelKitTests/ViewController.swift
@@ -0,0 +1,126 @@
+//
+// ViewController.swift
+// PanelKit
+//
+// Created by Louis D'hauwe on 09/03/2017.
+// Copyright © 2017 Silver Fox. All rights reserved.
+//
+
+import Foundation
+import UIKit
+import PanelKit
+
+class ViewController: UIViewController, PanelManager {
+
+ var mapPanelContentVC: MapPanelContentViewController!
+ var mapPanelVC: PanelViewController!
+
+ var textPanelContentVC: TextPanelContentViewController!
+ var textPanelVC: PanelViewController!
+
+ var contentWrapperView: UIView!
+ var contentView: UIView!
+
+ var mapPanelBarBtn: UIBarButtonItem!
+ var textPanelBarBtn: UIBarButtonItem!
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ contentWrapperView = UIView(frame: view.bounds)
+ view.addSubview(contentWrapperView)
+
+ contentView = UIView(frame: contentWrapperView.bounds)
+ contentWrapperView.addSubview(contentView)
+
+ mapPanelContentVC = MapPanelContentViewController()
+
+ mapPanelVC = PanelViewController(with: mapPanelContentVC, in: self)
+
+ textPanelContentVC = TextPanelContentViewController()
+
+ textPanelVC = PanelViewController(with: textPanelContentVC, in: self)
+
+ enableTripleTapExposeActivation()
+
+ mapPanelBarBtn = UIBarButtonItem(title: "Map", style: .done, target: self, action: #selector(showMap(_:)))
+ textPanelBarBtn = UIBarButtonItem(title: "Text", style: .done, target: self, action: #selector(showTextViewPanel(_:)))
+
+ self.navigationItem.title = "Test"
+ self.navigationItem.rightBarButtonItems = [mapPanelBarBtn, textPanelBarBtn]
+
+ }
+
+ override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
+ super.viewWillTransition(to: size, with: coordinator)
+
+ coordinator.animate(alongsideTransition: { (context) in
+
+ }) { (context) in
+
+ if !self.allowFloatingPanels {
+ self.closeAllFloatingPanels()
+ }
+
+ if !self.allowPanelPinning {
+ self.closeAllPinnedPanels()
+ }
+
+ }
+
+ }
+
+ // MARK: - Exposé
+
+ @IBAction func toggleExpose(_ sender: UIBarButtonItem) {
+
+ toggleExpose()
+
+ }
+
+ // MARK: - Popover
+
+ func showMap(_ sender: UIBarButtonItem) {
+
+ showPopover(mapPanelVC, from: sender)
+
+ }
+
+ func showTextViewPanel(_ sender: UIBarButtonItem) {
+
+ showPopover(textPanelVC, from: sender)
+
+ }
+
+ func showMapPanelFromBarButton(completion: @escaping (() -> Void)) {
+ showPopover(mapPanelVC, from: mapPanelBarBtn, completion: completion)
+ }
+
+ func showTextPanelFromBarButton(completion: @escaping (() -> Void)) {
+ showPopover(textPanelVC, from: textPanelBarBtn, completion: completion)
+ }
+
+ func showPopover(_ vc: UIViewController, from barButtonItem: UIBarButtonItem, completion: (() -> Void)? = nil) {
+
+ vc.modalPresentationStyle = .popover
+ vc.popoverPresentationController?.barButtonItem = barButtonItem
+
+ present(vc, animated: false, completion: completion)
+
+ }
+
+ // MARK: - PanelManager
+
+ var panelContentWrapperView: UIView {
+ return contentWrapperView
+ }
+
+ var panelContentView: UIView {
+ return contentView
+ }
+
+ var panels: [PanelViewController] {
+ return [mapPanelVC, textPanelVC]
+ }
+
+}