From 54b04f2fe00a62232d78ac63c9e2be243c2972f0 Mon Sep 17 00:00:00 2001 From: Ryne Cheow Date: Fri, 13 Jan 2017 13:38:01 +0800 Subject: [PATCH] Reinit Signed-off-by: Ryne Cheow --- .gitignore | 69 + LICENSE | 21 + PopupKit.podspec | 18 + PopupKit.xcodeproj/project.pbxproj | 303 +++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/xcschemes/PopupKit.xcscheme | 80 ++ PopupKit/Info.plist | 26 + PopupKit/PopupKit.h | 12 + PopupKit/PopupView.h | 208 +++ PopupKit/PopupView.m | 1206 +++++++++++++++++ PopupKitExample/Podfile | 9 + PopupKitExample/Podfile.lock | 16 + .../Pods/Local Podspecs/PopupKit.podspec.json | 28 + PopupKitExample/Pods/Manifest.lock | 16 + .../Pods/Pods.xcodeproj/project.pbxproj | 868 ++++++++++++ .../Pods-PopupKitExample/Info.plist | 26 + ...-PopupKitExample-acknowledgements.markdown | 27 + ...ods-PopupKitExample-acknowledgements.plist | 59 + .../Pods-PopupKitExample-dummy.m | 5 + .../Pods-PopupKitExample-frameworks.sh | 99 ++ .../Pods-PopupKitExample-resources.sh | 99 ++ .../Pods-PopupKitExample-umbrella.h | 16 + .../Pods-PopupKitExample.debug.xcconfig | 8 + .../Pods-PopupKitExample.modulemap | 6 + .../Pods-PopupKitExample.release.xcconfig | 8 + .../Pods-PopupKit_tvOS_Example/Info.plist | 30 + ...Kit_tvOS_Example-acknowledgements.markdown | 27 + ...pupKit_tvOS_Example-acknowledgements.plist | 59 + .../Pods-PopupKit_tvOS_Example-dummy.m | 5 + .../Pods-PopupKit_tvOS_Example-frameworks.sh | 99 ++ .../Pods-PopupKit_tvOS_Example-resources.sh | 99 ++ .../Pods-PopupKit_tvOS_Example-umbrella.h | 16 + .../Pods-PopupKit_tvOS_Example.debug.xcconfig | 8 + .../Pods-PopupKit_tvOS_Example.modulemap | 6 + ...ods-PopupKit_tvOS_Example.release.xcconfig | 8 + .../PopupKit-iOS/Info.plist | 26 + .../PopupKit-iOS/PopupKit-iOS-dummy.m | 5 + .../PopupKit-iOS/PopupKit-iOS-prefix.pch | 12 + .../PopupKit-iOS/PopupKit-iOS-umbrella.h | 17 + .../PopupKit-iOS/PopupKit-iOS.modulemap | 6 + .../PopupKit-iOS/PopupKit-iOS.xcconfig | 10 + .../PopupKit-tvOS/Info.plist | 30 + .../PopupKit-tvOS/PopupKit-tvOS-dummy.m | 5 + .../PopupKit-tvOS/PopupKit-tvOS-prefix.pch | 12 + .../PopupKit-tvOS/PopupKit-tvOS-umbrella.h | 17 + .../PopupKit-tvOS/PopupKit-tvOS.modulemap | 6 + .../PopupKit-tvOS/PopupKit-tvOS.xcconfig | 10 + PopupKitExample/PopupKit/AppDelegate.h | 31 + PopupKitExample/PopupKit/AppDelegate.m | 70 + .../AppIcon.appiconset/Contents.json | 102 ++ .../AppIcon.appiconset/icon-120.png | Bin 0 -> 1224 bytes .../AppIcon.appiconset/icon-152.png | Bin 0 -> 1507 bytes .../AppIcon.appiconset/icon-29.png | Bin 0 -> 609 bytes .../AppIcon.appiconset/icon-40.png | Bin 0 -> 603 bytes .../AppIcon.appiconset/icon-58-1.png | Bin 0 -> 799 bytes .../AppIcon.appiconset/icon-58.png | Bin 0 -> 799 bytes .../AppIcon.appiconset/icon-76.png | Bin 0 -> 837 bytes .../AppIcon.appiconset/icon-80-1.png | Bin 0 -> 853 bytes .../AppIcon.appiconset/icon-80.png | Bin 0 -> 838 bytes .../LaunchImage.launchimage/Contents.json | 57 + .../launch_ipad_landscape.png | Bin 0 -> 17010 bytes .../launch_ipad_landscape@2x.png | Bin 0 -> 60889 bytes .../launch_ipad_portrait.png | Bin 0 -> 17580 bytes .../launch_ipad_portrait@2x.png | Bin 0 -> 62113 bytes .../launch_iphone_2x.png | Bin 0 -> 14332 bytes .../launch_iphone_r4.png | Bin 0 -> 16763 bytes PopupKitExample/PopupKit/LaunchScreen.xib | 45 + .../PopupKit/PopupKitExample-Info.plist | 49 + .../PopupKit/PopupKitExample-Prefix.pch | 16 + PopupKitExample/PopupKit/ViewController.h | 29 + PopupKitExample/PopupKit/ViewController.m | 879 ++++++++++++ .../PopupKit/en.lproj/InfoPlist.strings | 2 + PopupKitExample/PopupKit/main.m | 34 + .../PopupKitExample.xcodeproj/project.pbxproj | 620 +++++++++ .../contents.xcworkspacedata | 7 + .../contents.xcworkspacedata | 10 + .../PopupKit_tvOS_Example/AppDelegate.swift | 46 + .../Content.imageset/Contents.json | 12 + .../Back.imagestacklayer/Contents.json | 6 + .../App Icon - Large.imagestack/Contents.json | 17 + .../Content.imageset/Contents.json | 12 + .../Front.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 12 + .../Middle.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 12 + .../Back.imagestacklayer/Contents.json | 6 + .../App Icon - Small.imagestack/Contents.json | 17 + .../Content.imageset/Contents.json | 12 + .../Front.imagestacklayer/Contents.json | 6 + .../Content.imageset/Contents.json | 12 + .../Middle.imagestacklayer/Contents.json | 6 + .../Contents.json | 32 + .../Contents.json | 12 + .../Top Shelf Image.imageset/Contents.json | 12 + .../Assets.xcassets/Contents.json | 6 + .../LaunchImage.launchimage/Contents.json | 15 + .../Base.lproj/Main.storyboard | 26 + .../PopupKit_tvOS_Example/Info.plist | 32 + .../ViewController.swift | 30 + README.md | 222 +++ 100 files changed, 6279 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 PopupKit.podspec create mode 100644 PopupKit.xcodeproj/project.pbxproj create mode 100644 PopupKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 PopupKit.xcodeproj/xcshareddata/xcschemes/PopupKit.xcscheme create mode 100644 PopupKit/Info.plist create mode 100755 PopupKit/PopupKit.h create mode 100644 PopupKit/PopupView.h create mode 100755 PopupKit/PopupView.m create mode 100644 PopupKitExample/Podfile create mode 100644 PopupKitExample/Podfile.lock create mode 100644 PopupKitExample/Pods/Local Podspecs/PopupKit.podspec.json create mode 100644 PopupKitExample/Pods/Manifest.lock create mode 100644 PopupKitExample/Pods/Pods.xcodeproj/project.pbxproj create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Info.plist create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-acknowledgements.markdown create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-acknowledgements.plist create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-dummy.m create mode 100755 PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-frameworks.sh create mode 100755 PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-resources.sh create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-umbrella.h create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.debug.xcconfig create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.modulemap create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.release.xcconfig create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Info.plist create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-acknowledgements.markdown create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-acknowledgements.plist create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-dummy.m create mode 100755 PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-frameworks.sh create mode 100755 PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-resources.sh create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-umbrella.h create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.debug.xcconfig create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.modulemap create mode 100644 PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.release.xcconfig create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-iOS/Info.plist create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-dummy.m create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-prefix.pch create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-umbrella.h create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS.modulemap create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS.xcconfig create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/Info.plist create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-dummy.m create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-prefix.pch create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-umbrella.h create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS.modulemap create mode 100644 PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS.xcconfig create mode 100644 PopupKitExample/PopupKit/AppDelegate.h create mode 100644 PopupKitExample/PopupKit/AppDelegate.m create mode 100644 PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-120.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-152.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-29.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-40.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-58-1.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-58.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-76.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-80-1.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-80.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/Contents.json create mode 100644 PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_landscape.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_landscape@2x.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_portrait.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_portrait@2x.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_iphone_2x.png create mode 100644 PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_iphone_r4.png create mode 100644 PopupKitExample/PopupKit/LaunchScreen.xib create mode 100644 PopupKitExample/PopupKit/PopupKitExample-Info.plist create mode 100644 PopupKitExample/PopupKit/PopupKitExample-Prefix.pch create mode 100644 PopupKitExample/PopupKit/ViewController.h create mode 100644 PopupKitExample/PopupKit/ViewController.m create mode 100644 PopupKitExample/PopupKit/en.lproj/InfoPlist.strings create mode 100644 PopupKitExample/PopupKit/main.m create mode 100644 PopupKitExample/PopupKitExample.xcodeproj/project.pbxproj create mode 100644 PopupKitExample/PopupKitExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 PopupKitExample/PopupKitExample.xcworkspace/contents.xcworkspacedata create mode 100644 PopupKitExample/PopupKit_tvOS_Example/AppDelegate.swift create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/LaunchImage.launchimage/Contents.json create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Base.lproj/Main.storyboard create mode 100644 PopupKitExample/PopupKit_tvOS_Example/Info.plist create mode 100644 PopupKitExample/PopupKit_tvOS_Example/ViewController.swift create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4f9836 --- /dev/null +++ b/.gitignore @@ -0,0 +1,69 @@ +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xcuserstate + +## Obj-C/Swift specific +*.hmap +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +#Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output + +.DS_Store +*.generated.swift +.idea diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f187fe8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2013-2014 Kullect Inc. (http://kullect.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/PopupKit.podspec b/PopupKit.podspec new file mode 100644 index 0000000..27ba299 --- /dev/null +++ b/PopupKit.podspec @@ -0,0 +1,18 @@ +Pod::Spec.new do |s| + s.name = "PopupKit" + s.version = "3.1.1" + s.summary = "PopupKit is a simple and flexible iOS class for presenting any custom view as a popup, forked from KLCPopup." + s.homepage = "https://github.com/rynecheow/PopupKit" + s.author = {"Jeff Mascia" => "http://jeffmascia.com", "Ryne Cheow" => "http://rynecheow.com"} + s.source_files = 'PopupKit/PopupView.{h,m}' + s.source = {:git => 'https://github.com/rynecheow/PopupKit.git', :tag => s.version.to_s} + s.frameworks = 'UIKit', 'Foundation' + s.requires_arc = true + s.ios.deployment_target = '9.0' + s.tvos.deployment_target = '9.0' + s.license = { + :type => 'MIT', + :file => 'LICENSE' + } + +end diff --git a/PopupKit.xcodeproj/project.pbxproj b/PopupKit.xcodeproj/project.pbxproj new file mode 100644 index 0000000..b2a9696 --- /dev/null +++ b/PopupKit.xcodeproj/project.pbxproj @@ -0,0 +1,303 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 6D09A52A1BD1FF980069F2FF /* PopupKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D09A5291BD1FF980069F2FF /* PopupKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6D09A5481BD2002C0069F2FF /* PopupView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D09A5461BD2002C0069F2FF /* PopupView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6D09A5491BD2002C0069F2FF /* PopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D09A5471BD2002C0069F2FF /* PopupView.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 6D09A5261BD1FF980069F2FF /* PopupKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PopupKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D09A5291BD1FF980069F2FF /* PopupKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PopupKit.h; sourceTree = ""; }; + 6D09A52B1BD1FF980069F2FF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D09A5461BD2002C0069F2FF /* PopupView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopupView.h; sourceTree = ""; }; + 6D09A5471BD2002C0069F2FF /* PopupView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PopupView.m; sourceTree = ""; }; + 6D09A5661BD209780069F2FF /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 6D09A5681BD2097C0069F2FF /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6D09A5221BD1FF980069F2FF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 6D09A51C1BD1FF980069F2FF = { + isa = PBXGroup; + children = ( + 6D09A5681BD2097C0069F2FF /* UIKit.framework */, + 6D09A5661BD209780069F2FF /* Foundation.framework */, + 6D09A5281BD1FF980069F2FF /* PopupKit */, + 6D09A5271BD1FF980069F2FF /* Products */, + ); + sourceTree = ""; + }; + 6D09A5271BD1FF980069F2FF /* Products */ = { + isa = PBXGroup; + children = ( + 6D09A5261BD1FF980069F2FF /* PopupKit.framework */, + ); + name = Products; + sourceTree = ""; + }; + 6D09A5281BD1FF980069F2FF /* PopupKit */ = { + isa = PBXGroup; + children = ( + 6D09A5461BD2002C0069F2FF /* PopupView.h */, + 6D09A5471BD2002C0069F2FF /* PopupView.m */, + 6D09A5291BD1FF980069F2FF /* PopupKit.h */, + 6D09A52B1BD1FF980069F2FF /* Info.plist */, + ); + path = PopupKit; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 6D09A5231BD1FF980069F2FF /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D09A5481BD2002C0069F2FF /* PopupView.h in Headers */, + 6D09A52A1BD1FF980069F2FF /* PopupKit.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 6D09A5251BD1FF980069F2FF /* PopupKit */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D09A52E1BD1FF980069F2FF /* Build configuration list for PBXNativeTarget "PopupKit" */; + buildPhases = ( + 6D09A5211BD1FF980069F2FF /* Sources */, + 6D09A5221BD1FF980069F2FF /* Frameworks */, + 6D09A5231BD1FF980069F2FF /* Headers */, + 6D09A5241BD1FF980069F2FF /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PopupKit; + productName = KLCPopupView; + productReference = 6D09A5261BD1FF980069F2FF /* PopupKit.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6D09A51D1BD1FF980069F2FF /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0800; + ORGANIZATIONNAME = "Kullect Inc."; + TargetAttributes = { + 6D09A5251BD1FF980069F2FF = { + CreatedOnToolsVersion = 7.0.1; + DevelopmentTeam = DQAU73Z92C; + DevelopmentTeamName = "Ryne Cheow (Personal Team)"; + }; + }; + }; + buildConfigurationList = 6D09A5201BD1FF980069F2FF /* Build configuration list for PBXProject "PopupKit" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 6D09A51C1BD1FF980069F2FF; + productRefGroup = 6D09A5271BD1FF980069F2FF /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6D09A5251BD1FF980069F2FF /* PopupKit */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 6D09A5241BD1FF980069F2FF /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6D09A5211BD1FF980069F2FF /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D09A5491BD2002C0069F2FF /* PopupView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 6D09A52C1BD1FF980069F2FF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 6D09A52D1BD1FF980069F2FF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 6D09A52F1BD1FF980069F2FF /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = PopupKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.rynecheow.PopupKit; + PRODUCT_NAME = PopupKit; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 6D09A5301BD1FF980069F2FF /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = PopupKit/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.rynecheow.PopupKit; + PRODUCT_NAME = PopupKit; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6D09A5201BD1FF980069F2FF /* Build configuration list for PBXProject "PopupKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D09A52C1BD1FF980069F2FF /* Debug */, + 6D09A52D1BD1FF980069F2FF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D09A52E1BD1FF980069F2FF /* Build configuration list for PBXNativeTarget "PopupKit" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D09A52F1BD1FF980069F2FF /* Debug */, + 6D09A5301BD1FF980069F2FF /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 6D09A51D1BD1FF980069F2FF /* Project object */; +} diff --git a/PopupKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/PopupKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..fda01e8 --- /dev/null +++ b/PopupKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/PopupKit.xcodeproj/xcshareddata/xcschemes/PopupKit.xcscheme b/PopupKit.xcodeproj/xcshareddata/xcschemes/PopupKit.xcscheme new file mode 100644 index 0000000..8322f40 --- /dev/null +++ b/PopupKit.xcodeproj/xcshareddata/xcschemes/PopupKit.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PopupKit/Info.plist b/PopupKit/Info.plist new file mode 100644 index 0000000..543e5f9 --- /dev/null +++ b/PopupKit/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/PopupKit/PopupKit.h b/PopupKit/PopupKit.h new file mode 100755 index 0000000..e782616 --- /dev/null +++ b/PopupKit/PopupKit.h @@ -0,0 +1,12 @@ +#import + +//! Project version number for PopupKit. +FOUNDATION_EXPORT double PopupKitVersionNumber; + +//! Project version string for PopupKit. +FOUNDATION_EXPORT const unsigned char PopupKitVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import \ No newline at end of file diff --git a/PopupKit/PopupView.h b/PopupKit/PopupView.h new file mode 100644 index 0000000..55e057e --- /dev/null +++ b/PopupKit/PopupView.h @@ -0,0 +1,208 @@ +// PopupView.h +// +// Created by Jeff Mascia +// Copyright (c) 2013-2014 Kullect Inc. (http://kullect.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +@import Foundation; +@import UIKit; + +@class PopupView; + +NS_ASSUME_NONNULL_BEGIN + +// PopupViewShowType: Controls how the popup will be presented. +typedef NS_OPTIONS(NSInteger, PopupViewShowType) { + PopupViewShowTypeNone = 0, + PopupViewShowTypeFadeIn, + PopupViewShowTypeGrowIn, + PopupViewShowTypeShrinkIn, + PopupViewShowTypeSlideInFromTop, + PopupViewShowTypeSlideInFromBottom, + PopupViewShowTypeSlideInFromLeft, + PopupViewShowTypeSlideInFromRight, + PopupViewShowTypeBounceIn, + PopupViewShowTypeBounceInFromTop, + PopupViewShowTypeBounceInFromBottom, + PopupViewShowTypeBounceInFromLeft, + PopupViewShowTypeBounceInFromRight, +} NS_SWIFT_NAME(PopupView.ShowType); + +// PopupViewDismissType: Controls how the popup will be dismissed. +typedef NS_OPTIONS(NSInteger, PopupViewDismissType) { + PopupViewDismissTypeNone = 0, + PopupViewDismissTypeFadeOut, + PopupViewDismissTypeGrowOut, + PopupViewDismissTypeShrinkOut, + PopupViewDismissTypeSlideOutToTop, + PopupViewDismissTypeSlideOutToBottom, + PopupViewDismissTypeSlideOutToLeft, + PopupViewDismissTypeSlideOutToRight, + PopupViewDismissTypeBounceOut, + PopupViewDismissTypeBounceOutToTop, + PopupViewDismissTypeBounceOutToBottom, + PopupViewDismissTypeBounceOutToLeft, + PopupViewDismissTypeBounceOutToRight, +} NS_SWIFT_NAME(PopupView.DismissType); + + +// PopupViewHorizontalLayout: Controls where the popup will come to rest horizontally. +typedef NS_OPTIONS(NSInteger, PopupViewHorizontalLayout) { + PopupViewHorizontalLayoutCustom = 0, + PopupViewHorizontalLayoutLeft, + PopupViewHorizontalLayoutLeftOfCenter, + PopupViewHorizontalLayoutCenter, + PopupViewHorizontalLayoutRightOfCenter, + PopupViewHorizontalLayoutRight, +} NS_SWIFT_NAME(PopupView.HorizontalLayout); + +// PopupViewVerticalLayout: Controls where the popup will come to rest vertically. +typedef NS_OPTIONS(NSInteger, PopupViewVerticalLayout) { + PopupViewVerticalLayoutCustom = 0, + PopupViewVerticalLayoutTop, + PopupViewVerticalLayoutAboveCenter, + PopupViewVerticalLayoutCenter, + PopupViewVerticalLayoutBelowCenter, + PopupViewVerticalLayoutBottom, +} NS_SWIFT_NAME(PopupView.VerticalLayout); + +// PopupViewMaskType +typedef NS_OPTIONS(NSInteger, PopupViewMaskType) { + PopupViewMaskTypeNone = 0, // Allow interaction with underlying views. + PopupViewMaskTypeClear, // Don't allow interaction with underlying views. + PopupViewMaskTypeDimmed, // Don't allow interaction with underlying views, dim background. + PopupViewMaskTypeLightBlur, // Don't allow interaction with underlying views, blurs background. + PopupViewMaskTypeDarkBlur,// Don't allow interaction with underlying views, blurs background. +} NS_SWIFT_NAME(PopupView.MaskType); + +// PopupViewLayout structure and maker functions +typedef struct { + PopupViewHorizontalLayout horizontal; + PopupViewVerticalLayout vertical; +} PopupViewLayout NS_SWIFT_NAME(PopupView.Layout); + +PopupViewLayout PopupViewLayoutMake(PopupViewHorizontalLayout horizontal, PopupViewVerticalLayout vertical) CF_SWIFT_UNAVAILABLE("Use 'PopupView.Layout.init(::)' instead"); + +static const PopupViewLayout PopupViewLayoutCenter; + +@interface PopupView : UIView + +// This is the view that you want to appear in Popup. +// - Must provide contentView before or in willStartShowing. +// - Must set desired size of contentView before or in willStartShowing. +@property(nonatomic, strong) UIView *contentView; + +// Animation transition for presenting contentView. default = shrink in +@property(nonatomic, assign) PopupViewShowType showType; + +// Animation transition for dismissing contentView. default = shrink out +@property(nonatomic, assign) PopupViewDismissType dismissType; + +// Mask prevents background touches from passing to underlying views. default = dimmed. +@property(nonatomic, assign) PopupViewMaskType maskType; + +// Overrides alpha value for dimmed background mask. default = 0.5 +@property(nonatomic, assign) CGFloat dimmedMaskAlpha; + +// If YES, then popup will get dismissed when background is touched. default = YES. +@property(nonatomic, assign) BOOL shouldDismissOnBackgroundTouch; + +// If YES, then popup will get dismissed when content view is touched. default = NO. +@property(nonatomic, assign) BOOL shouldDismissOnContentTouch; + +// If YES, then popup will move up or down when keyboard is on or off screen. default = NO. +@property(nonatomic, assign) BOOL shouldHandleKeyboard; + +// Block gets called after show animation finishes. Be sure to use weak reference for popup within the block to avoid retain cycle. +@property(nonatomic, copy) void (^didFinishShowingCompletion)(); + +// Block gets called when dismiss animation starts. Be sure to use weak reference for popup within the block to avoid retain cycle. +@property(nonatomic, copy) void (^willStartDismissingCompletion)(); + +// Block gets called after dismiss animation finishes. Be sure to use weak reference for popup within the block to avoid retain cycle. +@property(nonatomic, copy) void (^didFinishDismissingCompletion)(); + +// Convenience method for creating popup with default values (mimics UIAlertView). ++ (instancetype)popupViewWithContentView:(UIView *)contentView; + +// Convenience method for creating popup with custom values. ++ (instancetype)popupViewWithContentView:(UIView *)contentView + showType:(PopupViewShowType)showType + dismissType:(PopupViewDismissType)dismissType + maskType:(PopupViewMaskType)maskType + shouldDismissOnBackgroundTouch:(BOOL)shouldDismissOnBackgroundTouch + shouldDismissOnContentTouch:(BOOL)shouldDismissOnContentTouch; + +// Dismisses all the popups in the app. Use as a fail-safe for cleaning up. ++ (void)dismissAllPopups; + +// Show popup with center layout. Animation determined by showType. +- (void)show; + +// Show with specified layout. +- (void)showWithLayout:(PopupViewLayout)layout; + +// Show with specified layout in specific view. +- (void)showWithLayout:(PopupViewLayout)layout + inView:(UIView*) view; + +// Show and then dismiss after duration. 0.0 or less will be considered infinity. +- (void)showWithDuration:(NSTimeInterval)duration NS_SWIFT_NAME(PopupView.show(with:)); + +// Show with layout and dismiss after duration. +- (void)showWithLayout:(PopupViewLayout)layout duration:(NSTimeInterval)duration; + +// Show centered at point in view's coordinate system. If view is nil use screen base coordinates. +- (void)showAtCenter:(CGPoint)center inView:(UIView *)view NS_SWIFT_NAME(PopupView.show(at:in:)); + +// Show centered at point in view's coordinate system, then dismiss after duration. +- (void)showAtCenter:(CGPoint)center inView:(UIView *)view withDuration:(NSTimeInterval)duration NS_SWIFT_NAME(PopupView.show(at:in:with:)); + +// Dismiss popup. Uses dismissType if animated is YES. +- (void)dismiss:(BOOL)animated NS_SWIFT_NAME(PopupView.dismiss(animated:));; + + +#pragma mark Subclassing + +@property(nonatomic, strong, readonly) UIView *backgroundView; +@property(nonatomic, strong, readonly) UIView *containerView; +@property(nonatomic, assign, readonly) BOOL isBeingShown; +@property(nonatomic, assign, readonly) BOOL isShowing; +@property(nonatomic, assign, readonly) BOOL isBeingDismissed; + +- (void)willStartShowing; + +- (void)didFinishShowing; + +- (void)willStartDismissing; + +- (void)didFinishDismissing; + +@end + +#pragma mark - UIView Category + +@interface UIView (PopupView) +- (void)forEachPopupDoBlock:(void (^)(PopupView *popup))block NS_SWIFT_NAME(UIView.forEachPopup(handle:)); + +- (void)dismissPresentingPopup; +@end + +NS_ASSUME_NONNULL_END diff --git a/PopupKit/PopupView.m b/PopupKit/PopupView.m new file mode 100755 index 0000000..b8e257e --- /dev/null +++ b/PopupKit/PopupView.m @@ -0,0 +1,1206 @@ +// PopupView.m +// +// Created by Jeff Mascia +// Copyright (c) 2013-2014 Kullect Inc. (http://kullect.com) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + + +#import "PopupView.h" + +static NSInteger const kAnimationOptionCurveIOS7 = (7 << 16); + +PopupViewLayout PopupViewLayoutMake(PopupViewHorizontalLayout horizontal, PopupViewVerticalLayout vertical) { + PopupViewLayout layout; + layout.horizontal = horizontal; + layout.vertical = vertical; + return layout; +} + +static const PopupViewLayout PopupViewLayoutCenter = {PopupViewHorizontalLayoutCenter, PopupViewVerticalLayoutCenter}; + + +@interface NSValue (PopupViewLayout) ++ (NSValue *)valueWithPopupViewLayout:(PopupViewLayout)layout; + +- (PopupViewLayout)PopupViewLayoutValue; +@end + + +@interface PopupView () { + // views + UIView *_backgroundView; + UIView *_containerView; + + // state flags + BOOL _isBeingShown; + BOOL _isShowing; + BOOL _isBeingDismissed; + CGRect _keyboardRect; +} + +@property UIVisualEffectView *_blurEffectView; + +- (void)updateForInterfaceOrientation; + +- (void)didChangeStatusBarOrientation:(NSNotification *)notification; + +// Used for calling dismiss:YES from selector because you can't pass primitives, thanks objc +- (void)dismiss; + +@end + + +@implementation PopupView + +@synthesize backgroundView = _backgroundView; +@synthesize containerView = _containerView; +@synthesize isBeingShown = _isBeingShown; +@synthesize isShowing = _isShowing; +@synthesize isBeingDismissed = _isBeingDismissed; + + +- (void)dealloc { + [NSObject cancelPreviousPerformRequestsWithTarget:self]; + + // stop listening to notifications + [[NSNotificationCenter defaultCenter] removeObserver:self]; +} + + +- (instancetype)init { + return [self initWithFrame:[UIScreen mainScreen].bounds]; +} + + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + + self.userInteractionEnabled = YES; + self.backgroundColor = [UIColor clearColor]; + self.alpha = 0; + self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + self.autoresizesSubviews = YES; + + self.shouldDismissOnBackgroundTouch = YES; + self.shouldDismissOnContentTouch = NO; + + self.showType = PopupViewShowTypeShrinkIn; + self.dismissType = PopupViewDismissTypeShrinkOut; + self.maskType = PopupViewMaskTypeDimmed; + self.dimmedMaskAlpha = 0.5; + + _isBeingShown = NO; + _isShowing = NO; + _isBeingDismissed = NO; + + _backgroundView = [[UIView alloc] init]; + _backgroundView.backgroundColor = [UIColor clearColor]; + _backgroundView.userInteractionEnabled = NO; + _backgroundView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + _backgroundView.frame = self.bounds; + + _containerView = [[UIView alloc] init]; + _containerView.autoresizesSubviews = NO; + _containerView.userInteractionEnabled = YES; + _containerView.backgroundColor = [UIColor clearColor]; + + [self addSubview:_backgroundView]; + [self addSubview:_containerView]; +#if !TARGET_OS_TV + // register for notifications + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(didChangeStatusBarOrientation:) + name:UIApplicationDidChangeStatusBarFrameNotification + object:nil]; + + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(keyboardDidShow:) + name:UIKeyboardDidShowNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(keyboardDidHide:) + name:UIKeyboardDidHideNotification + object:nil]; +#endif + } + return self; +} + +#pragma mark - UIView + +- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { + + if (CGRectContainsPoint(_keyboardRect, point)) { + return nil; + } + + UIView *hitView = [super hitTest:point withEvent:event]; + if (hitView == self || [NSStringFromClass([hitView class]) isEqualToString:@"_UIVisualEffectContentView"]) { + + // Try to dismiss if backgroundTouch flag set. + if (_shouldDismissOnBackgroundTouch) { + [self dismiss:YES]; + } + + // If no mask, then return nil so touch passes through to underlying views. + if (_maskType == PopupViewMaskTypeNone) { + return nil; + } else { + return hitView; + } + + } else { + + // If view is within containerView and contentTouch flag set, then try to hide. + if ([hitView isDescendantOfView:_containerView]) { + if (_shouldDismissOnContentTouch) { + [self dismiss:YES]; + } + } + return hitView; + } +} + + +#pragma mark - Class Public + ++ (instancetype)popupViewWithContentView:(UIView *)contentView { + PopupView *popup = [[[self class] alloc] init]; + popup.contentView = contentView; + return popup; +} + + ++ (instancetype)popupViewWithContentView:(UIView *)contentView + showType:(PopupViewShowType)showType + dismissType:(PopupViewDismissType)dismissType + maskType:(PopupViewMaskType)maskType + shouldDismissOnBackgroundTouch:(BOOL)shouldDismissOnBackgroundTouch + shouldDismissOnContentTouch:(BOOL)shouldDismissOnContentTouch { + PopupView *popup = [[[self class] alloc] init]; + popup.contentView = contentView; + popup.showType = showType; + popup.dismissType = dismissType; + popup.maskType = maskType; + popup.shouldDismissOnBackgroundTouch = shouldDismissOnBackgroundTouch; + popup.shouldDismissOnContentTouch = shouldDismissOnContentTouch; + return popup; +} + + ++ (void)dismissAllPopups { + NSArray *windows = [UIApplication sharedApplication].windows; + for (UIWindow *window in windows) { + [window forEachPopupDoBlock:^(PopupView *popup) { + [popup dismiss:NO]; + }]; + } +} + + +#pragma mark - Public + +- (void)show { + [self showWithLayout:PopupViewLayoutCenter]; +} + + +- (void)showWithLayout:(PopupViewLayout)layout { + [self showWithLayout:layout duration:0.0]; +} + + +- (void)showWithDuration:(NSTimeInterval)duration { + [self showWithLayout:PopupViewLayoutCenter duration:duration]; +} + +- (void)showWithLayout:(PopupViewLayout)layout + inView:(UIView*) view { + NSDictionary *parameters = @{@"layout" : [NSValue valueWithPopupViewLayout:layout], + @"view": view}; + [self showWithParameters:parameters]; +} + +- (void)showWithLayout:(PopupViewLayout)layout duration:(NSTimeInterval)duration { + NSDictionary *parameters = @{@"layout" : [NSValue valueWithPopupViewLayout:layout], + @"duration" : @(duration)}; + [self showWithParameters:parameters]; +} + + +- (void)showAtCenter:(CGPoint)center inView:(UIView *)view { + [self showAtCenter:center inView:view withDuration:0.0]; +} + + +- (void)showAtCenter:(CGPoint)center inView:(UIView *)view withDuration:(NSTimeInterval)duration { + NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; + [parameters setValue:[NSValue valueWithCGPoint:center] forKey:@"center"]; + [parameters setValue:@(duration) forKey:@"duration"]; + [parameters setValue:view forKey:@"view"]; + [self showWithParameters:[NSDictionary dictionaryWithDictionary:parameters]]; +} + + +- (void)dismiss:(BOOL)animated { + + if (_isShowing && !_isBeingDismissed) { + _isBeingShown = NO; + _isShowing = NO; + _isBeingDismissed = YES; + + // cancel previous dismiss requests (i.e. the dismiss after duration call). + [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(dismiss) object:nil]; + + [self willStartDismissing]; + + if (self.willStartDismissingCompletion != nil) { + self.willStartDismissingCompletion(); + } + + dispatch_async(dispatch_get_main_queue(), ^{ + + // Animate background if needed + void (^backgroundAnimationBlock)(void) = ^(void) { + _backgroundView.alpha = 0.0; + }; + + if (animated && (_showType != PopupViewShowTypeNone)) { + // Make fade happen faster than motion. Use linear for fades. + [UIView animateWithDuration:0.15 + delay:0 + options:UIViewAnimationOptionCurveLinear + animations:backgroundAnimationBlock + completion:NULL]; + } else { + backgroundAnimationBlock(); + } + + // Setup completion block + void (^completionBlock)(BOOL) = ^(BOOL finished) { + + [self removeFromSuperview]; + + _isBeingShown = NO; + _isShowing = NO; + _isBeingDismissed = NO; + + [self didFinishDismissing]; + + if (self.didFinishDismissingCompletion != nil) { + self.didFinishDismissingCompletion(); + } + }; + + NSTimeInterval bounce1Duration = 0.13; + NSTimeInterval bounce2Duration = (bounce1Duration * 2.0); + + // Animate content if needed + if (animated) { + switch (_dismissType) { + case PopupViewDismissTypeFadeOut: { + [UIView animateWithDuration:0.15 + delay:0 + options:UIViewAnimationOptionCurveLinear + animations:^{ + _containerView.alpha = 0.0; + } completion:completionBlock]; + break; + } + + case PopupViewDismissTypeGrowOut: { + [UIView animateWithDuration:0.15 + delay:0 + options:(UIViewAnimationOptions) kAnimationOptionCurveIOS7 + animations:^{ + _containerView.alpha = 0.0; + _containerView.transform = CGAffineTransformMakeScale(1.1, 1.1); + } completion:completionBlock]; + break; + } + + case PopupViewDismissTypeShrinkOut: { + [UIView animateWithDuration:0.15 + delay:0 + options:(UIViewAnimationOptions) kAnimationOptionCurveIOS7 + animations:^{ + _containerView.alpha = 0.0; + _containerView.transform = CGAffineTransformMakeScale(0.8, 0.8); + } completion:completionBlock]; + break; + } + + case PopupViewDismissTypeSlideOutToTop: { + [UIView animateWithDuration:0.30 + delay:0 + options:(UIViewAnimationOptions) kAnimationOptionCurveIOS7 + animations:^{ + CGRect finalFrame = _containerView.frame; + finalFrame.origin.y = -CGRectGetHeight(finalFrame); + _containerView.frame = finalFrame; + } + completion:completionBlock]; + break; + } + + case PopupViewDismissTypeSlideOutToBottom: { + [UIView animateWithDuration:0.30 + delay:0 + options:(UIViewAnimationOptions) kAnimationOptionCurveIOS7 + animations:^{ + CGRect finalFrame = _containerView.frame; + finalFrame.origin.y = CGRectGetHeight(self.bounds); + _containerView.frame = finalFrame; + } + completion:completionBlock]; + break; + } + + case PopupViewDismissTypeSlideOutToLeft: { + [UIView animateWithDuration:0.30 + delay:0 + options:(UIViewAnimationOptions) kAnimationOptionCurveIOS7 + animations:^{ + CGRect finalFrame = _containerView.frame; + finalFrame.origin.x = -CGRectGetWidth(finalFrame); + _containerView.frame = finalFrame; + } + completion:completionBlock]; + break; + } + + case PopupViewDismissTypeSlideOutToRight: { + [UIView animateWithDuration:0.30 + delay:0 + options:(UIViewAnimationOptions) kAnimationOptionCurveIOS7 + animations:^{ + CGRect finalFrame = _containerView.frame; + finalFrame.origin.x = CGRectGetWidth(self.bounds); + _containerView.frame = finalFrame; + } + completion:completionBlock]; + + break; + } + + case PopupViewDismissTypeBounceOut: { + [UIView animateWithDuration:bounce1Duration + delay:0 + options:UIViewAnimationOptionCurveEaseOut + animations:^(void) { + _containerView.transform = CGAffineTransformMakeScale(1.1, 1.1); + } + completion:^(BOOL finished) { + + [UIView animateWithDuration:bounce2Duration + delay:0 + options:UIViewAnimationOptionCurveEaseIn + animations:^(void) { + _containerView.alpha = 0.0; + _containerView.transform = CGAffineTransformMakeScale(0.1, 0.1); + } + completion:completionBlock]; + }]; + + break; + } + + case PopupViewDismissTypeBounceOutToTop: { + [UIView animateWithDuration:bounce1Duration + delay:0 + options:UIViewAnimationOptionCurveEaseOut + animations:^(void) { + CGRect finalFrame = _containerView.frame; + finalFrame.origin.y += 40.0; + _containerView.frame = finalFrame; + } + completion:^(BOOL finished) { + + [UIView animateWithDuration:bounce2Duration + delay:0 + options:UIViewAnimationOptionCurveEaseIn + animations:^(void) { + CGRect finalFrame = _containerView.frame; + finalFrame.origin.y = -CGRectGetHeight(finalFrame); + _containerView.frame = finalFrame; + } + completion:completionBlock]; + }]; + + break; + } + + case PopupViewDismissTypeBounceOutToBottom: { + [UIView animateWithDuration:bounce1Duration + delay:0 + options:UIViewAnimationOptionCurveEaseOut + animations:^(void) { + CGRect finalFrame = _containerView.frame; + finalFrame.origin.y -= 40.0; + _containerView.frame = finalFrame; + } + completion:^(BOOL finished) { + + [UIView animateWithDuration:bounce2Duration + delay:0 + options:UIViewAnimationOptionCurveEaseIn + animations:^(void) { + CGRect finalFrame = _containerView.frame; + finalFrame.origin.y = CGRectGetHeight(self.bounds); + _containerView.frame = finalFrame; + } + completion:completionBlock]; + }]; + + break; + } + + case PopupViewDismissTypeBounceOutToLeft: { + [UIView animateWithDuration:bounce1Duration + delay:0 + options:UIViewAnimationOptionCurveEaseOut + animations:^(void) { + CGRect finalFrame = _containerView.frame; + finalFrame.origin.x += 40.0; + _containerView.frame = finalFrame; + } + completion:^(BOOL finished) { + + [UIView animateWithDuration:bounce2Duration + delay:0 + options:UIViewAnimationOptionCurveEaseIn + animations:^(void) { + CGRect finalFrame = _containerView.frame; + finalFrame.origin.x = -CGRectGetWidth(finalFrame); + _containerView.frame = finalFrame; + } + completion:completionBlock]; + }]; + break; + } + + case PopupViewDismissTypeBounceOutToRight: { + [UIView animateWithDuration:bounce1Duration + delay:0 + options:UIViewAnimationOptionCurveEaseOut + animations:^(void) { + CGRect finalFrame = _containerView.frame; + finalFrame.origin.x -= 40.0; + _containerView.frame = finalFrame; + } + completion:^(BOOL finished) { + + [UIView animateWithDuration:bounce2Duration + delay:0 + options:UIViewAnimationOptionCurveEaseIn + animations:^(void) { + CGRect finalFrame = _containerView.frame; + finalFrame.origin.x = CGRectGetWidth(self.bounds); + _containerView.frame = finalFrame; + } + completion:completionBlock]; + }]; + break; + } + + default: { + self.containerView.alpha = 0.0; + completionBlock(YES); + break; + } + } + } else { + self.containerView.alpha = 0.0; + completionBlock(YES); + } + + }); + } +} + + +#pragma mark - Private + +- (void)showWithParameters:(NSDictionary *)parameters { + + // If popup can be shown + if (!_isBeingShown && !_isShowing && !_isBeingDismissed) { + _isBeingShown = YES; + _isShowing = NO; + _isBeingDismissed = NO; + + [self willStartShowing]; + + dispatch_async(dispatch_get_main_queue(), ^{ + + // Prepare by adding to the top window. + UIView *destView; + if (!self.superview) { + destView = [parameters valueForKey:@"view"]; + if (destView == nil) { + // Prepare by adding to the top window. + NSEnumerator *frontToBackWindows = [[UIApplication sharedApplication].windows reverseObjectEnumerator]; + + for (UIWindow *window in frontToBackWindows) + if (window.windowLevel == UIWindowLevelNormal) { + destView = window; + break; + } + } + [destView addSubview:self]; + [destView bringSubviewToFront:self]; + } + + // Before we calculate layout for containerView, make sure we are transformed for current orientation. + [self updateForInterfaceOrientation]; + + // Make sure we're not hidden + self.hidden = NO; + self.alpha = 1.0; + + // Setup background view + _backgroundView.alpha = 0.0; + _backgroundView.alpha = 0.0; + void (^backgroundAnimationBlock)(void) = ^(void) { + _backgroundView.alpha = 1.0; + }; + + switch (_maskType) { + case PopupViewMaskTypeDimmed: { + _backgroundView.backgroundColor = [UIColor colorWithRed:(CGFloat) (0.0 / 255.0f) green:(CGFloat) (0.0 / 255.0f) blue:(CGFloat) (0.0 / 255.0f) alpha:self.dimmedMaskAlpha]; + backgroundAnimationBlock(); + + } + break; + case PopupViewMaskTypeNone: { + [UIView animateWithDuration:0.15 + delay:0 + options:UIViewAnimationOptionCurveLinear + animations:backgroundAnimationBlock + completion:NULL]; + + } + break; + case PopupViewMaskTypeClear: { + _backgroundView.backgroundColor = [UIColor clearColor]; + } + break; + case PopupViewMaskTypeLightBlur: { + UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; + UIVisualEffectView *visualBlur = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; + visualBlur.frame = _backgroundView.frame; + [visualBlur.contentView addSubview:_backgroundView]; + [self insertSubview:visualBlur belowSubview:_containerView]; + //_backgroundView = visualBlur; + //[self addSubview:visualBlur]; + } + break; + case PopupViewMaskTypeDarkBlur: { + UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; + UIVisualEffectView *visualBlur = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; + visualBlur.frame = _backgroundView.frame; + [visualBlur.contentView addSubview:_backgroundView]; + [self insertSubview:visualBlur belowSubview:_containerView]; + //_backgroundView = visualBlur; + //[self addSubview:visualBlur]; + } + break; + + default: + backgroundAnimationBlock(); + break; + } + + // Determine duration. Default to 0 if none provided. + NSTimeInterval duration; + NSNumber *durationNumber = [parameters valueForKey:@"duration"]; + if (durationNumber != nil) { + duration = durationNumber.doubleValue; + } else { + duration = 0.0; + } + + // Setup completion block + void (^completionBlock)(BOOL) = ^(BOOL finished) { + _isBeingShown = NO; + _isShowing = YES; + _isBeingDismissed = NO; + + [self didFinishShowing]; + + if (self.didFinishShowingCompletion != nil) { + self.didFinishShowingCompletion(); + } + + // Set to hide after duration if greater than zero. + if (duration > 0.0) { + [self performSelector:@selector(dismiss) withObject:nil afterDelay:duration]; + } + }; + + // Add contentView to container + if (self.contentView.superview != _containerView) { + [_containerView addSubview:self.contentView]; + } + + // Re-layout (this is needed if the contentView is using autoLayout) + [self.contentView layoutIfNeeded]; + + // Size container to match contentView + CGRect containerFrame = _containerView.frame; + containerFrame.size = self.contentView.frame.size; + _containerView.frame = containerFrame; + // Position contentView to fill it + CGRect contentViewFrame = self.contentView.frame; + contentViewFrame.origin = CGPointZero; + self.contentView.frame = contentViewFrame; + + // Reset _containerView's constraints in case contentView is uaing autolayout. + UIView *contentView = _contentView; + NSDictionary *views = NSDictionaryOfVariableBindings(contentView); + + [_containerView removeConstraints:_containerView.constraints]; + [_containerView addConstraints: + [NSLayoutConstraint constraintsWithVisualFormat:@"V:|[contentView]|" + options:0 + metrics:nil + views:views]]; + + [_containerView addConstraints: + [NSLayoutConstraint constraintsWithVisualFormat:@"H:|[contentView]|" + options:0 + metrics:nil + views:views]]; + + // Determine final position and necessary autoresizingMask for container. + CGRect finalContainerFrame = containerFrame; + UIViewAutoresizing containerAutoresizingMask = UIViewAutoresizingNone; + + // Use explicit center coordinates if provided. + NSValue *centerValue = [parameters valueForKey:@"center"]; + if (centerValue != nil) { + + CGPoint centerInView = [centerValue CGPointValue]; + CGPoint centerInSelf; + + if (destView != nil) { + centerInSelf = [self convertPoint:centerInView fromView:destView]; + } else { + centerInSelf = centerInView; + } + + finalContainerFrame.origin.x = (CGFloat) (centerInSelf.x - CGRectGetWidth(finalContainerFrame) / 2.0); + finalContainerFrame.origin.y = (CGFloat) (centerInSelf.y - CGRectGetHeight(finalContainerFrame) / 2.0); + containerAutoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin; + } + + // Otherwise use relative layout. Default to center if none provided. + else { + + NSValue *layoutValue = [parameters valueForKey:@"layout"]; + PopupViewLayout layout; + if (layoutValue != nil) { + layout = [layoutValue PopupViewLayoutValue]; + } else { + layout = PopupViewLayoutCenter; + } + + switch (layout.horizontal) { + + case PopupViewHorizontalLayoutLeft: { + finalContainerFrame.origin.x = 0.0; + containerAutoresizingMask = containerAutoresizingMask | UIViewAutoresizingFlexibleRightMargin; + break; + } + + case PopupViewHorizontalLayoutLeftOfCenter: { + finalContainerFrame.origin.x = floorf((float) (CGRectGetWidth(self.bounds) / 3.0 - CGRectGetWidth(containerFrame) / 2.0)); + containerAutoresizingMask = containerAutoresizingMask | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + break; + } + + case PopupViewHorizontalLayoutCenter: { + finalContainerFrame.origin.x = floorf((float) ((CGRectGetWidth(self.bounds) - CGRectGetWidth(containerFrame)) / 2.0)); + containerAutoresizingMask = containerAutoresizingMask | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + break; + } + + case PopupViewHorizontalLayoutRightOfCenter: { + finalContainerFrame.origin.x = floorf((float) (CGRectGetWidth(self.bounds) * 2.0 / 3.0 - CGRectGetWidth(containerFrame) / 2.0)); + containerAutoresizingMask = containerAutoresizingMask | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin; + break; + } + + case PopupViewHorizontalLayoutRight: { + finalContainerFrame.origin.x = CGRectGetWidth(self.bounds) - CGRectGetWidth(containerFrame); + containerAutoresizingMask = containerAutoresizingMask | UIViewAutoresizingFlexibleLeftMargin; + break; + } + + default: + break; + } + + // Vertical + switch (layout.vertical) { + + case PopupViewVerticalLayoutTop: { + finalContainerFrame.origin.y = 0; + containerAutoresizingMask = containerAutoresizingMask | UIViewAutoresizingFlexibleBottomMargin; + break; + } + + case PopupViewVerticalLayoutAboveCenter: { + finalContainerFrame.origin.y = floorf((float) CGRectGetHeight(self.bounds) / 3.0 - CGRectGetHeight(containerFrame) / 2.0); + containerAutoresizingMask = containerAutoresizingMask | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; + break; + } + + case PopupViewVerticalLayoutCenter: { + finalContainerFrame.origin.y = floorf((float) (CGRectGetHeight(self.bounds) - CGRectGetHeight(containerFrame)) / 2.0); + containerAutoresizingMask = containerAutoresizingMask | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; + break; + } + + case PopupViewVerticalLayoutBelowCenter: { + finalContainerFrame.origin.y = floorf((float) CGRectGetHeight(self.bounds) * 2.0 / 3.0 - CGRectGetHeight(containerFrame) / 2.0); + containerAutoresizingMask = containerAutoresizingMask | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin; + break; + } + + case PopupViewVerticalLayoutBottom: { + finalContainerFrame.origin.y = CGRectGetHeight(self.bounds) - CGRectGetHeight(containerFrame); + containerAutoresizingMask = containerAutoresizingMask | UIViewAutoresizingFlexibleTopMargin; + break; + } + + default: + break; + } + } + + _containerView.autoresizingMask = containerAutoresizingMask; + + // Animate content if needed + switch (_showType) { + case PopupViewShowTypeFadeIn: { + + _containerView.alpha = 0.0; + _containerView.transform = CGAffineTransformIdentity; + CGRect startFrame = finalContainerFrame; + _containerView.frame = startFrame; + + [UIView animateWithDuration:0.15 + delay:0 + options:UIViewAnimationOptionCurveLinear + animations:^{ + _containerView.alpha = 1.0; + } + completion:completionBlock]; + break; + } + + case PopupViewShowTypeGrowIn: { + + _containerView.alpha = 0.0; + // set frame before transform here... + CGRect startFrame = finalContainerFrame; + _containerView.frame = startFrame; + _containerView.transform = CGAffineTransformMakeScale(0.85, 0.85); + + [UIView animateWithDuration:0.15 + delay:0 + options:kAnimationOptionCurveIOS7 // note: this curve ignores durations + animations:^{ + _containerView.alpha = 1.0; + // set transform before frame here... + _containerView.transform = CGAffineTransformIdentity; + _containerView.frame = finalContainerFrame; + } + completion:completionBlock]; + + break; + } + + case PopupViewShowTypeShrinkIn: { + _containerView.alpha = 0.0; + // set frame before transform here... + CGRect startFrame = finalContainerFrame; + _containerView.frame = startFrame; + _containerView.transform = CGAffineTransformMakeScale(1.25, 1.25); + + [UIView animateWithDuration:0.15 + delay:0 + options:kAnimationOptionCurveIOS7 // note: this curve ignores durations + animations:^{ + _containerView.alpha = 1.0; + // set transform before frame here... + _containerView.transform = CGAffineTransformIdentity; + _containerView.frame = finalContainerFrame; + } + completion:completionBlock]; + break; + } + + case PopupViewShowTypeSlideInFromTop: { + _containerView.alpha = 1.0; + _containerView.transform = CGAffineTransformIdentity; + CGRect startFrame = finalContainerFrame; + startFrame.origin.y = -CGRectGetHeight(finalContainerFrame); + _containerView.frame = startFrame; + + [UIView animateWithDuration:0.30 + delay:0 + options:kAnimationOptionCurveIOS7 // note: this curve ignores durations + animations:^{ + _containerView.frame = finalContainerFrame; + } + completion:completionBlock]; + break; + } + + case PopupViewShowTypeSlideInFromBottom: { + _containerView.alpha = 1.0; + _containerView.transform = CGAffineTransformIdentity; + CGRect startFrame = finalContainerFrame; + startFrame.origin.y = CGRectGetHeight(self.bounds); + _containerView.frame = startFrame; + + [UIView animateWithDuration:0.30 + delay:0 + options:kAnimationOptionCurveIOS7 // note: this curve ignores durations + animations:^{ + _containerView.frame = finalContainerFrame; + } + completion:completionBlock]; + break; + } + + case PopupViewShowTypeSlideInFromLeft: { + _containerView.alpha = 1.0; + _containerView.transform = CGAffineTransformIdentity; + CGRect startFrame = finalContainerFrame; + startFrame.origin.x = -CGRectGetWidth(finalContainerFrame); + _containerView.frame = startFrame; + + [UIView animateWithDuration:0.30 + delay:0 + options:kAnimationOptionCurveIOS7 // note: this curve ignores durations + animations:^{ + _containerView.frame = finalContainerFrame; + } + completion:completionBlock]; + break; + } + + case PopupViewShowTypeSlideInFromRight: { + _containerView.alpha = 1.0; + _containerView.transform = CGAffineTransformIdentity; + CGRect startFrame = finalContainerFrame; + startFrame.origin.x = CGRectGetWidth(self.bounds); + _containerView.frame = startFrame; + + [UIView animateWithDuration:0.30 + delay:0 + options:kAnimationOptionCurveIOS7 // note: this curve ignores durations + animations:^{ + _containerView.frame = finalContainerFrame; + } + completion:completionBlock]; + + break; + } + + case PopupViewShowTypeBounceIn: { + _containerView.alpha = 0.0; + // set frame before transform here... + CGRect startFrame = finalContainerFrame; + _containerView.frame = startFrame; + _containerView.transform = CGAffineTransformMakeScale(0.1, 0.1); + + [UIView animateWithDuration:0.6 + delay:0.0 + usingSpringWithDamping:0.8 + initialSpringVelocity:15.0 + options:0 + animations:^{ + _containerView.alpha = 1.0; + _containerView.transform = CGAffineTransformIdentity; + } + completion:completionBlock]; + + break; + } + + case PopupViewShowTypeBounceInFromTop: { + _containerView.alpha = 1.0; + _containerView.transform = CGAffineTransformIdentity; + CGRect startFrame = finalContainerFrame; + startFrame.origin.y = -CGRectGetHeight(finalContainerFrame); + _containerView.frame = startFrame; + + [UIView animateWithDuration:0.6 + delay:0.0 + usingSpringWithDamping:0.8 + initialSpringVelocity:10.0 + options:0 + animations:^{ + _containerView.frame = finalContainerFrame; + } + completion:completionBlock]; + break; + } + + case PopupViewShowTypeBounceInFromBottom: { + _containerView.alpha = 1.0; + _containerView.transform = CGAffineTransformIdentity; + CGRect startFrame = finalContainerFrame; + startFrame.origin.y = CGRectGetHeight(self.bounds); + _containerView.frame = startFrame; + + [UIView animateWithDuration:0.6 + delay:0.0 + usingSpringWithDamping:0.8 + initialSpringVelocity:10.0 + options:0 + animations:^{ + _containerView.frame = finalContainerFrame; + } + completion:completionBlock]; + break; + } + + case PopupViewShowTypeBounceInFromLeft: { + _containerView.alpha = 1.0; + _containerView.transform = CGAffineTransformIdentity; + CGRect startFrame = finalContainerFrame; + startFrame.origin.x = -CGRectGetWidth(finalContainerFrame); + _containerView.frame = startFrame; + + [UIView animateWithDuration:0.6 + delay:0.0 + usingSpringWithDamping:0.8 + initialSpringVelocity:10.0 + options:0 + animations:^{ + _containerView.frame = finalContainerFrame; + } + completion:completionBlock]; + break; + } + + case PopupViewShowTypeBounceInFromRight: { + _containerView.alpha = 1.0; + _containerView.transform = CGAffineTransformIdentity; + CGRect startFrame = finalContainerFrame; + startFrame.origin.x = CGRectGetWidth(self.bounds); + _containerView.frame = startFrame; + + [UIView animateWithDuration:0.6 + delay:0.0 + usingSpringWithDamping:0.8 + initialSpringVelocity:10.0 + options:0 + animations:^{ + _containerView.frame = finalContainerFrame; + } + completion:completionBlock]; + break; + } + + default: { + self.containerView.alpha = 1.0; + self.containerView.transform = CGAffineTransformIdentity; + self.containerView.frame = finalContainerFrame; + + completionBlock(YES); + + break; + } + } + + }); + } +} + + +- (void)dismiss { + [self dismiss:YES]; +} + + +- (void)updateForInterfaceOrientation { +#if !TARGET_OS_TV + UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation; + CGFloat angle; + + switch (orientation) { + case UIInterfaceOrientationPortraitUpsideDown: + angle = M_PI; + break; + case UIInterfaceOrientationLandscapeLeft: + angle = -M_PI / 2.0f;; + + break; + case UIInterfaceOrientationLandscapeRight: + angle = M_PI / 2.0f; + + break; + default: // as UIInterfaceOrientationPortrait + angle = 0.0; + break; + } + + self.transform = CGAffineTransformMakeRotation(angle); + self.frame = self.window.bounds; +#endif +} + + +#pragma mark - Notification handlers + +- (void)didChangeStatusBarOrientation:(NSNotification *)notification { + [self updateForInterfaceOrientation]; +} + +#if !TARGET_OS_TV +- (void)keyboardDidShow:(NSNotification *)notification { + CGRect keyboardRect; + [[[notification userInfo] valueForKey:UIKeyboardFrameEndUserInfoKey] getValue:&keyboardRect]; + _keyboardRect = [self convertRect:keyboardRect fromView:nil]; + +} + +- (void)keyboardDidHide:(NSNotification *)notification { + _keyboardRect = CGRectZero; +} +#endif + +#pragma mark - Subclassing + +- (void)willStartShowing { +#if !TARGET_OS_TV + if (_shouldHandleKeyboard) { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShowNotification:) name:UIKeyboardWillShowNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHideNotification:) name:UIKeyboardWillHideNotification object:nil]; + } +#endif +} + + +- (void)didFinishShowing { + +} + + +- (void)willStartDismissing { + +} + + +- (void)didFinishDismissing { +#if !TARGET_OS_TV + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil]; + [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil]; +#endif +} + +#pragma mark - Keyboard notification handlers + +#if !TARGET_OS_TV +- (void)keyboardWillShowNotification:(NSNotification *)notification { + [self moveContainerViewForKeyboard:notification up:YES]; +} + +- (void)keyboardWillHideNotification:(NSNotification *)notification { + [self moveContainerViewForKeyboard:notification up:NO]; +} + +- (void)moveContainerViewForKeyboard:(NSNotification *)notification up:(BOOL)up { + NSDictionary *userInfo = notification.userInfo; + NSTimeInterval animationDuration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] floatValue]; + UIViewAnimationCurve animationCurve = (UIViewAnimationCurve) [userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue]; + CGRect keyboardEndFrame = [userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; + + _containerView.center = CGPointMake(_containerView.superview.frame.size.width / 2, _containerView.superview.frame.size.height / 2); + CGRect frame = _containerView.frame; + if (up) { + frame.origin.y -= keyboardEndFrame.size.height / 2; + } + + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:animationDuration]; + [UIView setAnimationCurve:animationCurve]; + _containerView.frame = frame; + [UIView commitAnimations]; +} +#endif +@end + +#pragma mark - Categories + +@implementation UIView (PopupView) + + +- (void)forEachPopupDoBlock:(void (^)(PopupView *popup))block { + for (UIView *subview in self.subviews) { + if ([subview isKindOfClass:[PopupView class]]) { + block((PopupView *) subview); + } else { + [subview forEachPopupDoBlock:block]; + } + } +} + + +- (void)dismissPresentingPopup { + + // Iterate over superviews until you find a PopupView and dismiss it, then gtfo + UIView *view = self; + while (view != nil) { + if ([view isKindOfClass:[PopupView class]]) { + [(PopupView *) view dismiss:YES]; + break; + } + view = view.superview; + } +} + +@end + + +@implementation NSValue (PopupViewLayout) + ++ (NSValue *)valueWithPopupViewLayout:(PopupViewLayout)layout { + return [NSValue valueWithBytes:&layout objCType:@encode(PopupViewLayout)]; +} + +- (PopupViewLayout)PopupViewLayoutValue { + PopupViewLayout layout; + + [self getValue:&layout]; + + return layout; +} + +@end diff --git a/PopupKitExample/Podfile b/PopupKitExample/Podfile new file mode 100644 index 0000000..fb23351 --- /dev/null +++ b/PopupKitExample/Podfile @@ -0,0 +1,9 @@ +use_frameworks! + +target 'PopupKitExample' do + pod 'PopupKit', :path => "../" +end + +target 'PopupKit_tvOS_Example' do + pod 'PopupKit', :path => "../" +end diff --git a/PopupKitExample/Podfile.lock b/PopupKitExample/Podfile.lock new file mode 100644 index 0000000..7d2f53c --- /dev/null +++ b/PopupKitExample/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - PopupKit (3.1.0) + +DEPENDENCIES: + - PopupKit (from `../`) + +EXTERNAL SOURCES: + PopupKit: + :path: "../" + +SPEC CHECKSUMS: + PopupKit: 81aab01dc9527b9d62285495be4d4b9dbd0d3f14 + +PODFILE CHECKSUM: ae558466827307e8c8ac3e05cc9b019f49038c17 + +COCOAPODS: 1.2.0.beta.1 diff --git a/PopupKitExample/Pods/Local Podspecs/PopupKit.podspec.json b/PopupKitExample/Pods/Local Podspecs/PopupKit.podspec.json new file mode 100644 index 0000000..dedf5a9 --- /dev/null +++ b/PopupKitExample/Pods/Local Podspecs/PopupKit.podspec.json @@ -0,0 +1,28 @@ +{ + "name": "PopupKit", + "version": "3.1.0", + "summary": "PopupKit is a simple and flexible iOS class for presenting any custom view as a popup, forked from KLCPopup.", + "homepage": "https://github.com/rynecheow/PopupKit", + "authors": { + "Jeff Mascia": "http://jeffmascia.com", + "Ryne Cheow": "http://rynecheow.com" + }, + "source_files": "PopupKit/PopupView.{h,m}", + "source": { + "git": "https://github.com/rynecheow/PopupKit.git", + "tag": "3.1.0" + }, + "frameworks": [ + "UIKit", + "Foundation" + ], + "requires_arc": true, + "platforms": { + "ios": "9.0", + "tvos": "9.0" + }, + "license": { + "type": "MIT", + "file": "LICENSE" + } +} diff --git a/PopupKitExample/Pods/Manifest.lock b/PopupKitExample/Pods/Manifest.lock new file mode 100644 index 0000000..7d2f53c --- /dev/null +++ b/PopupKitExample/Pods/Manifest.lock @@ -0,0 +1,16 @@ +PODS: + - PopupKit (3.1.0) + +DEPENDENCIES: + - PopupKit (from `../`) + +EXTERNAL SOURCES: + PopupKit: + :path: "../" + +SPEC CHECKSUMS: + PopupKit: 81aab01dc9527b9d62285495be4d4b9dbd0d3f14 + +PODFILE CHECKSUM: ae558466827307e8c8ac3e05cc9b019f49038c17 + +COCOAPODS: 1.2.0.beta.1 diff --git a/PopupKitExample/Pods/Pods.xcodeproj/project.pbxproj b/PopupKitExample/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..295a40e --- /dev/null +++ b/PopupKitExample/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,868 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0029DF75B4E51266382E0BBE46D652B9 /* PopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = C4A4D8ADA687F2746424DAB4F4A63B43 /* PopupView.m */; }; + 03C6ADB86C58A03BFC421BBA0D516F86 /* Pods-PopupKitExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C737873A5E8D99DBCF21BAB3E94C2CBF /* Pods-PopupKitExample-dummy.m */; }; + 0E387D96438577413815EAC5C069DA69 /* Pods-PopupKit_tvOS_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = DC6D313B4F25C90A68A22BE91CE7F37D /* Pods-PopupKit_tvOS_Example-dummy.m */; }; + 0F6A4069D48C1AEE26B6888972DA71D6 /* Pods-PopupKitExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FA0BAC7787D6C8934CD18F6D4EBBF2D7 /* Pods-PopupKitExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 179E26C70C395B9F82E5D55E7BEBA7C5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41E121A3961E1BE3FAFE72CE5B480D1C /* Foundation.framework */; }; + 1E9F9125EC9250329064C55505CC65D6 /* PopupKit-iOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 55926A152CC34FDBAA6D13E4ED2425C8 /* PopupKit-iOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 350BC00D8ECC8C32CA3A93588E81A6B5 /* PopupView.h in Headers */ = {isa = PBXBuildFile; fileRef = 98C6F8EBD9BA35114841818E7253A31A /* PopupView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4B45497F545EBF7C746FE02900524CA8 /* PopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = C4A4D8ADA687F2746424DAB4F4A63B43 /* PopupView.m */; }; + 5182DF500E94B9C1C126C3C335D574FB /* PopupKit-tvOS-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CB9393A0F64DDF7C694FCA2BF2D5330 /* PopupKit-tvOS-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 637C65D5E861A9BD59F81E280CC91416 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA296B1A1D99FC572280360B9BE1A37F /* Foundation.framework */; }; + 6FE04BF5CF9012579ED40426895EC6DC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 651749039AA2EEC434FC875FD9A692C5 /* UIKit.framework */; }; + 7944B2AE2917CA994EC8F4C38094BCB5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25E7ABE74A9EB02B9EA922E8EEBFBDD7 /* UIKit.framework */; }; + 955F3CF3E58A62E55544C4CB7ADD9004 /* PopupKit-tvOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CA5C9B8BEC8B3D40D480F4856D366D6 /* PopupKit-tvOS-dummy.m */; }; + 9902B3EB6289C30C0CB07193E0BE63EE /* PopupView.h in Headers */ = {isa = PBXBuildFile; fileRef = 98C6F8EBD9BA35114841818E7253A31A /* PopupView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B258CBB42B590BF3E4D5C38B46340BB9 /* PopupKit-iOS-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 46D3DCAE52959A506C9BD3FE9625E014 /* PopupKit-iOS-dummy.m */; }; + C9E08BA2E5683FE71FD3EF98C820867E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 41E121A3961E1BE3FAFE72CE5B480D1C /* Foundation.framework */; }; + E29EA5AE562D6CE36828722843010FD8 /* Pods-PopupKit_tvOS_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A24F542AA9449D5E2FB590E83B129E21 /* Pods-PopupKit_tvOS_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FE53539621FBCD2091D06B0AE21A4BD9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA296B1A1D99FC572280360B9BE1A37F /* Foundation.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + C55BB75B921DBAF1A2032D3BB30A8E9C /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 871A5ED939BD142EB012F1EA6FBA488E; + remoteInfo = "PopupKit-tvOS"; + }; + C6DD96E8CCF53ECA9E33342C1EC2A5D9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2FC03F5BD6B586C65EF845EF71BB4F1C; + remoteInfo = "PopupKit-iOS"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 091EB669191A04662E7B0C046E8F2691 /* PopupKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PopupKit.framework; path = "PopupKit-iOS.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 1A497D238A4B1C4B8B11ACD4C06B8421 /* Pods-PopupKitExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-PopupKitExample-acknowledgements.plist"; sourceTree = ""; }; + 25E7ABE74A9EB02B9EA922E8EEBFBDD7 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 31F8BA4634A1A379B1AC43DD9AD395B7 /* Pods-PopupKit_tvOS_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-PopupKit_tvOS_Example-acknowledgements.plist"; sourceTree = ""; }; + 32E0E21CB02846D5A28385FFB058ED78 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3854BA653386BD6CE9A54C1F7EC58F72 /* Pods-PopupKitExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-PopupKitExample-acknowledgements.markdown"; sourceTree = ""; }; + 3FEF7AB23785BFF7BB176597856B687E /* PopupKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PopupKit.framework; path = "PopupKit-tvOS.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 41E121A3961E1BE3FAFE72CE5B480D1C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 449BCA45A845B0861C8AF52CE0B65C28 /* PopupKit-tvOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; name = "PopupKit-tvOS.modulemap"; path = "../PopupKit-tvOS/PopupKit-tvOS.modulemap"; sourceTree = ""; }; + 46D3DCAE52959A506C9BD3FE9625E014 /* PopupKit-iOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PopupKit-iOS-dummy.m"; sourceTree = ""; }; + 4EE39C708F825CFAA3C42AF7E131637A /* Pods-PopupKit_tvOS_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-PopupKit_tvOS_Example-frameworks.sh"; sourceTree = ""; }; + 4F624E52EF6C274AB993E7E92A6B5E89 /* Pods-PopupKit_tvOS_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-PopupKit_tvOS_Example.modulemap"; sourceTree = ""; }; + 52640C152E8FEBE1D7C991443DFE3DAA /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 55926A152CC34FDBAA6D13E4ED2425C8 /* PopupKit-iOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PopupKit-iOS-umbrella.h"; sourceTree = ""; }; + 5952541DC2776EF545C5A9B67D498648 /* Pods-PopupKit_tvOS_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-PopupKit_tvOS_Example-acknowledgements.markdown"; sourceTree = ""; }; + 5CA5C9B8BEC8B3D40D480F4856D366D6 /* PopupKit-tvOS-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "PopupKit-tvOS-dummy.m"; path = "../PopupKit-tvOS/PopupKit-tvOS-dummy.m"; sourceTree = ""; }; + 63B36E88D25F0D3FAC340CD4A7556CED /* Pods-PopupKit_tvOS_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PopupKit_tvOS_Example.release.xcconfig"; sourceTree = ""; }; + 651749039AA2EEC434FC875FD9A692C5 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS10.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; + 71539ABB2EEB8BE800B0DBF21C54EF64 /* Pods-PopupKitExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-PopupKitExample-frameworks.sh"; sourceTree = ""; }; + 748D3B82061756478B769022A606ABFF /* PopupKit-iOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "PopupKit-iOS.xcconfig"; sourceTree = ""; }; + 79902ECC23EED43CFFAA451ABAFEF47D /* Pods-PopupKit_tvOS_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PopupKit_tvOS_Example.debug.xcconfig"; sourceTree = ""; }; + 79B9EDFC80E6D9E35C018E14D2D824BC /* Pods-PopupKitExample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-PopupKitExample-resources.sh"; sourceTree = ""; }; + 876D1F59AC1279335D2075F95682401C /* PopupKit-tvOS.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "PopupKit-tvOS.xcconfig"; path = "../PopupKit-tvOS/PopupKit-tvOS.xcconfig"; sourceTree = ""; }; + 88EB90D14D15CD212DE6F31E7EAD05C8 /* Pods-PopupKitExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PopupKitExample.release.xcconfig"; sourceTree = ""; }; + 8CB9393A0F64DDF7C694FCA2BF2D5330 /* PopupKit-tvOS-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PopupKit-tvOS-umbrella.h"; path = "../PopupKit-tvOS/PopupKit-tvOS-umbrella.h"; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9592910642F4A2F446133E4A6415DF0A /* Pods_PopupKitExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_PopupKitExample.framework; path = "Pods-PopupKitExample.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 98C6F8EBD9BA35114841818E7253A31A /* PopupView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = PopupView.h; sourceTree = ""; }; + A24F542AA9449D5E2FB590E83B129E21 /* Pods-PopupKit_tvOS_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-PopupKit_tvOS_Example-umbrella.h"; sourceTree = ""; }; + A318F8FC5578E0E2A24FF4CAB9583C3C /* Pods-PopupKitExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-PopupKitExample.modulemap"; sourceTree = ""; }; + B77A5914076DF854E94BE033BAF5F248 /* PopupKit-iOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PopupKit-iOS-prefix.pch"; sourceTree = ""; }; + B868ABF7192602AB07076CAE33E9EB7D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C4A4D8ADA687F2746424DAB4F4A63B43 /* PopupView.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = PopupView.m; sourceTree = ""; }; + C737873A5E8D99DBCF21BAB3E94C2CBF /* Pods-PopupKitExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-PopupKitExample-dummy.m"; sourceTree = ""; }; + CC27AF7C2259BE641CB009D754F07CF0 /* PopupKit-iOS.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "PopupKit-iOS.modulemap"; sourceTree = ""; }; + CE00E03435647A4AB4D182BF71A9CEDF /* Pods-PopupKitExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-PopupKitExample.debug.xcconfig"; sourceTree = ""; }; + DA296B1A1D99FC572280360B9BE1A37F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + DC6D313B4F25C90A68A22BE91CE7F37D /* Pods-PopupKit_tvOS_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-PopupKit_tvOS_Example-dummy.m"; sourceTree = ""; }; + E3DE1A50A8B4F8AC64F0F2859E79DF65 /* PopupKit-tvOS-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "PopupKit-tvOS-prefix.pch"; path = "../PopupKit-tvOS/PopupKit-tvOS-prefix.pch"; sourceTree = ""; }; + E6E1D8B0C88387F503B28042CA96E0B2 /* Pods_PopupKit_tvOS_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_PopupKit_tvOS_Example.framework; path = "Pods-PopupKit_tvOS_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + E72A0F62AB574B9C67954E187CF1EE45 /* Pods-PopupKit_tvOS_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-PopupKit_tvOS_Example-resources.sh"; sourceTree = ""; }; + FA0BAC7787D6C8934CD18F6D4EBBF2D7 /* Pods-PopupKitExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-PopupKitExample-umbrella.h"; sourceTree = ""; }; + FC9798B748EE90E2DE0BD4BD49D0E31B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = Info.plist; path = "../PopupKit-tvOS/Info.plist"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 45DEB2F2D53FBF03B56A0E50A75A9B67 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C9E08BA2E5683FE71FD3EF98C820867E /* Foundation.framework in Frameworks */, + 6FE04BF5CF9012579ED40426895EC6DC /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 98B1992D40CE7A0F1F81858B7C834311 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 179E26C70C395B9F82E5D55E7BEBA7C5 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DA06CE4105801FA288366AABC58CBC6D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + FE53539621FBCD2091D06B0AE21A4BD9 /* Foundation.framework in Frameworks */, + 7944B2AE2917CA994EC8F4C38094BCB5 /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E4ACDF45D4E2EB8D901121A00D1E2B2B /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 637C65D5E861A9BD59F81E280CC91416 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 27A8F071CF6D4A4BEEA42E86E8700C3E /* iOS */ = { + isa = PBXGroup; + children = ( + DA296B1A1D99FC572280360B9BE1A37F /* Foundation.framework */, + 25E7ABE74A9EB02B9EA922E8EEBFBDD7 /* UIKit.framework */, + ); + name = iOS; + sourceTree = ""; + }; + 4E1C6F507D7991E028ABB4AB267E0120 /* tvOS */ = { + isa = PBXGroup; + children = ( + 41E121A3961E1BE3FAFE72CE5B480D1C /* Foundation.framework */, + 651749039AA2EEC434FC875FD9A692C5 /* UIKit.framework */, + ); + name = tvOS; + sourceTree = ""; + }; + 5EA343B48F87CE2F449233D5DF2F9440 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 669D66EFA56200E6447C4AEF9B07BDE6 /* Pods-PopupKit_tvOS_Example */, + 7D99F5FABE95022FC2EAFE759D94A718 /* Pods-PopupKitExample */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 5F42C6CEDDC4F8B5678CC11AE69D04C1 /* PopupKit */ = { + isa = PBXGroup; + children = ( + B0A23A59E30A5DBE1C1130265653F3F3 /* PopupKit */, + 8E1916B37C0F3B12A3825A9D361AB18D /* Support Files */, + ); + name = PopupKit; + path = ../..; + sourceTree = ""; + }; + 669D66EFA56200E6447C4AEF9B07BDE6 /* Pods-PopupKit_tvOS_Example */ = { + isa = PBXGroup; + children = ( + 32E0E21CB02846D5A28385FFB058ED78 /* Info.plist */, + 4F624E52EF6C274AB993E7E92A6B5E89 /* Pods-PopupKit_tvOS_Example.modulemap */, + 5952541DC2776EF545C5A9B67D498648 /* Pods-PopupKit_tvOS_Example-acknowledgements.markdown */, + 31F8BA4634A1A379B1AC43DD9AD395B7 /* Pods-PopupKit_tvOS_Example-acknowledgements.plist */, + DC6D313B4F25C90A68A22BE91CE7F37D /* Pods-PopupKit_tvOS_Example-dummy.m */, + 4EE39C708F825CFAA3C42AF7E131637A /* Pods-PopupKit_tvOS_Example-frameworks.sh */, + E72A0F62AB574B9C67954E187CF1EE45 /* Pods-PopupKit_tvOS_Example-resources.sh */, + A24F542AA9449D5E2FB590E83B129E21 /* Pods-PopupKit_tvOS_Example-umbrella.h */, + 79902ECC23EED43CFFAA451ABAFEF47D /* Pods-PopupKit_tvOS_Example.debug.xcconfig */, + 63B36E88D25F0D3FAC340CD4A7556CED /* Pods-PopupKit_tvOS_Example.release.xcconfig */, + ); + name = "Pods-PopupKit_tvOS_Example"; + path = "Target Support Files/Pods-PopupKit_tvOS_Example"; + sourceTree = ""; + }; + 7D99F5FABE95022FC2EAFE759D94A718 /* Pods-PopupKitExample */ = { + isa = PBXGroup; + children = ( + B868ABF7192602AB07076CAE33E9EB7D /* Info.plist */, + A318F8FC5578E0E2A24FF4CAB9583C3C /* Pods-PopupKitExample.modulemap */, + 3854BA653386BD6CE9A54C1F7EC58F72 /* Pods-PopupKitExample-acknowledgements.markdown */, + 1A497D238A4B1C4B8B11ACD4C06B8421 /* Pods-PopupKitExample-acknowledgements.plist */, + C737873A5E8D99DBCF21BAB3E94C2CBF /* Pods-PopupKitExample-dummy.m */, + 71539ABB2EEB8BE800B0DBF21C54EF64 /* Pods-PopupKitExample-frameworks.sh */, + 79B9EDFC80E6D9E35C018E14D2D824BC /* Pods-PopupKitExample-resources.sh */, + FA0BAC7787D6C8934CD18F6D4EBBF2D7 /* Pods-PopupKitExample-umbrella.h */, + CE00E03435647A4AB4D182BF71A9CEDF /* Pods-PopupKitExample.debug.xcconfig */, + 88EB90D14D15CD212DE6F31E7EAD05C8 /* Pods-PopupKitExample.release.xcconfig */, + ); + name = "Pods-PopupKitExample"; + path = "Target Support Files/Pods-PopupKitExample"; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + 95C41BD3EB7DC80C300A242AD671DD9A /* Development Pods */, + 884D502095129379EF5BB132EEA4E18E /* Frameworks */, + 92CEC40E794A32AA3A2BCE90B0C816ED /* Products */, + 5EA343B48F87CE2F449233D5DF2F9440 /* Targets Support Files */, + ); + sourceTree = ""; + }; + 884D502095129379EF5BB132EEA4E18E /* Frameworks */ = { + isa = PBXGroup; + children = ( + 27A8F071CF6D4A4BEEA42E86E8700C3E /* iOS */, + 4E1C6F507D7991E028ABB4AB267E0120 /* tvOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + 8E1916B37C0F3B12A3825A9D361AB18D /* Support Files */ = { + isa = PBXGroup; + children = ( + 52640C152E8FEBE1D7C991443DFE3DAA /* Info.plist */, + FC9798B748EE90E2DE0BD4BD49D0E31B /* Info.plist */, + CC27AF7C2259BE641CB009D754F07CF0 /* PopupKit-iOS.modulemap */, + 748D3B82061756478B769022A606ABFF /* PopupKit-iOS.xcconfig */, + 46D3DCAE52959A506C9BD3FE9625E014 /* PopupKit-iOS-dummy.m */, + B77A5914076DF854E94BE033BAF5F248 /* PopupKit-iOS-prefix.pch */, + 55926A152CC34FDBAA6D13E4ED2425C8 /* PopupKit-iOS-umbrella.h */, + 449BCA45A845B0861C8AF52CE0B65C28 /* PopupKit-tvOS.modulemap */, + 876D1F59AC1279335D2075F95682401C /* PopupKit-tvOS.xcconfig */, + 5CA5C9B8BEC8B3D40D480F4856D366D6 /* PopupKit-tvOS-dummy.m */, + E3DE1A50A8B4F8AC64F0F2859E79DF65 /* PopupKit-tvOS-prefix.pch */, + 8CB9393A0F64DDF7C694FCA2BF2D5330 /* PopupKit-tvOS-umbrella.h */, + ); + name = "Support Files"; + path = "PopupKitExample/Pods/Target Support Files/PopupKit-iOS"; + sourceTree = ""; + }; + 92CEC40E794A32AA3A2BCE90B0C816ED /* Products */ = { + isa = PBXGroup; + children = ( + E6E1D8B0C88387F503B28042CA96E0B2 /* Pods_PopupKit_tvOS_Example.framework */, + 9592910642F4A2F446133E4A6415DF0A /* Pods_PopupKitExample.framework */, + 091EB669191A04662E7B0C046E8F2691 /* PopupKit.framework */, + 3FEF7AB23785BFF7BB176597856B687E /* PopupKit.framework */, + ); + name = Products; + sourceTree = ""; + }; + 95C41BD3EB7DC80C300A242AD671DD9A /* Development Pods */ = { + isa = PBXGroup; + children = ( + 5F42C6CEDDC4F8B5678CC11AE69D04C1 /* PopupKit */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + B0A23A59E30A5DBE1C1130265653F3F3 /* PopupKit */ = { + isa = PBXGroup; + children = ( + 98C6F8EBD9BA35114841818E7253A31A /* PopupView.h */, + C4A4D8ADA687F2746424DAB4F4A63B43 /* PopupView.m */, + ); + name = PopupKit; + path = PopupKit; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 0B45BDC6CF99FACE78A9F7976B66D50C /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E29EA5AE562D6CE36828722843010FD8 /* Pods-PopupKit_tvOS_Example-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8C3757EB1B8D7F939D7615C18A30A987 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0F6A4069D48C1AEE26B6888972DA71D6 /* Pods-PopupKitExample-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + BFE53C470BC4EC2D519E4B18DE55D103 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 1E9F9125EC9250329064C55505CC65D6 /* PopupKit-iOS-umbrella.h in Headers */, + 9902B3EB6289C30C0CB07193E0BE63EE /* PopupView.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + DCE903285CE64E53EA61C87DA5540766 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 5182DF500E94B9C1C126C3C335D574FB /* PopupKit-tvOS-umbrella.h in Headers */, + 350BC00D8ECC8C32CA3A93588E81A6B5 /* PopupView.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 2FC03F5BD6B586C65EF845EF71BB4F1C /* PopupKit-iOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 29BDFC3B263D89D9285D4CBBBB512DD5 /* Build configuration list for PBXNativeTarget "PopupKit-iOS" */; + buildPhases = ( + F937F83395C644E604C3CB87397A1055 /* Sources */, + DA06CE4105801FA288366AABC58CBC6D /* Frameworks */, + BFE53C470BC4EC2D519E4B18DE55D103 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "PopupKit-iOS"; + productName = "PopupKit-iOS"; + productReference = 091EB669191A04662E7B0C046E8F2691 /* PopupKit.framework */; + productType = "com.apple.product-type.framework"; + }; + 5042A4E75BFD7FCD5AEFE9B1F7EEEDCC /* Pods-PopupKit_tvOS_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = C404E9BEBABE6187AD33891B82DE66FB /* Build configuration list for PBXNativeTarget "Pods-PopupKit_tvOS_Example" */; + buildPhases = ( + 9FAE588B7DED41AAE3CA0B46EB9EBB3D /* Sources */, + 98B1992D40CE7A0F1F81858B7C834311 /* Frameworks */, + 0B45BDC6CF99FACE78A9F7976B66D50C /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 686A4EDEA0E5E6E9ACBA8808FE04B90A /* PBXTargetDependency */, + ); + name = "Pods-PopupKit_tvOS_Example"; + productName = "Pods-PopupKit_tvOS_Example"; + productReference = E6E1D8B0C88387F503B28042CA96E0B2 /* Pods_PopupKit_tvOS_Example.framework */; + productType = "com.apple.product-type.framework"; + }; + 871A5ED939BD142EB012F1EA6FBA488E /* PopupKit-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 185E80F7F8D36A8FF51F029BB4AE1FB6 /* Build configuration list for PBXNativeTarget "PopupKit-tvOS" */; + buildPhases = ( + 97B8FAC8767B9A255DEE096FDA5215FA /* Sources */, + 45DEB2F2D53FBF03B56A0E50A75A9B67 /* Frameworks */, + DCE903285CE64E53EA61C87DA5540766 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "PopupKit-tvOS"; + productName = "PopupKit-tvOS"; + productReference = 3FEF7AB23785BFF7BB176597856B687E /* PopupKit.framework */; + productType = "com.apple.product-type.framework"; + }; + 9EDE7923547748D08BF23132EEE532A4 /* Pods-PopupKitExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = CA2E56A4C9B41CED9563EEFEDC4A0255 /* Build configuration list for PBXNativeTarget "Pods-PopupKitExample" */; + buildPhases = ( + 6EC88D2B87FBD5DFFA52E5F5BA4E451B /* Sources */, + E4ACDF45D4E2EB8D901121A00D1E2B2B /* Frameworks */, + 8C3757EB1B8D7F939D7615C18A30A987 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + E378A1723F9A884F29EAC2F7AC0311A6 /* PBXTargetDependency */, + ); + name = "Pods-PopupKitExample"; + productName = "Pods-PopupKitExample"; + productReference = 9592910642F4A2F446133E4A6415DF0A /* Pods_PopupKitExample.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0700; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = 92CEC40E794A32AA3A2BCE90B0C816ED /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 5042A4E75BFD7FCD5AEFE9B1F7EEEDCC /* Pods-PopupKit_tvOS_Example */, + 9EDE7923547748D08BF23132EEE532A4 /* Pods-PopupKitExample */, + 2FC03F5BD6B586C65EF845EF71BB4F1C /* PopupKit-iOS */, + 871A5ED939BD142EB012F1EA6FBA488E /* PopupKit-tvOS */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 6EC88D2B87FBD5DFFA52E5F5BA4E451B /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 03C6ADB86C58A03BFC421BBA0D516F86 /* Pods-PopupKitExample-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97B8FAC8767B9A255DEE096FDA5215FA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 955F3CF3E58A62E55544C4CB7ADD9004 /* PopupKit-tvOS-dummy.m in Sources */, + 0029DF75B4E51266382E0BBE46D652B9 /* PopupView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 9FAE588B7DED41AAE3CA0B46EB9EBB3D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0E387D96438577413815EAC5C069DA69 /* Pods-PopupKit_tvOS_Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F937F83395C644E604C3CB87397A1055 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + B258CBB42B590BF3E4D5C38B46340BB9 /* PopupKit-iOS-dummy.m in Sources */, + 4B45497F545EBF7C746FE02900524CA8 /* PopupView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 686A4EDEA0E5E6E9ACBA8808FE04B90A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "PopupKit-tvOS"; + target = 871A5ED939BD142EB012F1EA6FBA488E /* PopupKit-tvOS */; + targetProxy = C55BB75B921DBAF1A2032D3BB30A8E9C /* PBXContainerItemProxy */; + }; + E378A1723F9A884F29EAC2F7AC0311A6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "PopupKit-iOS"; + target = 2FC03F5BD6B586C65EF845EF71BB4F1C /* PopupKit-iOS */; + targetProxy = C6DD96E8CCF53ECA9E33342C1EC2A5D9 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 0709811072DFC21B136D787DE6A7DC0E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 79902ECC23EED43CFFAA451ABAFEF47D /* Pods-PopupKit_tvOS_Example.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-PopupKit_tvOS_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_PopupKit_tvOS_Example; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 10.1; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 3327C22207F5AAE8A7FA15917D6E1D51 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 748D3B82061756478B769022A606ABFF /* PopupKit-iOS.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/PopupKit-iOS/PopupKit-iOS-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PopupKit-iOS/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PopupKit-iOS/PopupKit-iOS.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = PopupKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 4E1C35E8BC855801158AA0A9BC0B7BC7 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 876D1F59AC1279335D2075F95682401C /* PopupKit-tvOS.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/PopupKit-tvOS/PopupKit-tvOS-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PopupKit-tvOS/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PopupKit-tvOS/PopupKit-tvOS.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = PopupKit; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 5381394413C2CDFAF9A49F2D75EDA587 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 876D1F59AC1279335D2075F95682401C /* PopupKit-tvOS.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/PopupKit-tvOS/PopupKit-tvOS-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PopupKit-tvOS/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PopupKit-tvOS/PopupKit-tvOS.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = PopupKit; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 9.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 6764571F97F1AA48F06D11F0E8907331 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 748D3B82061756478B769022A606ABFF /* PopupKit-iOS.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREFIX_HEADER = "Target Support Files/PopupKit-iOS/PopupKit-iOS-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PopupKit-iOS/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/PopupKit-iOS/PopupKit-iOS.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = PopupKit; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 72DF13DF3D6379F49099A88E71E5C56E /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = CE00E03435647A4AB4D182BF71A9CEDF /* Pods-PopupKitExample.debug.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-PopupKitExample/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_PopupKitExample; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 842401466715E872A68146CEA05BC61D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + TVOS_DEPLOYMENT_TARGET = 10.1; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + A6F2C835AB4CB1A531735811BBC4DCFA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + ONLY_ACTIVE_ARCH = YES; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Debug; + }; + D0C7F796B52D57EA7CCA08E859D7CD1B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 63B36E88D25F0D3FAC340CD4A7556CED /* Pods-PopupKit_tvOS_Example.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-PopupKit_tvOS_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_PopupKit_tvOS_Example; + SDKROOT = appletvos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 10.1; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + D8CCE92511C25A9166AA428BE55BC252 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 88EB90D14D15CD212DE6F31E7EAD05C8 /* Pods-PopupKitExample.release.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Target Support Files/Pods-PopupKitExample/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_PopupKitExample; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 185E80F7F8D36A8FF51F029BB4AE1FB6 /* Build configuration list for PBXNativeTarget "PopupKit-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4E1C35E8BC855801158AA0A9BC0B7BC7 /* Debug */, + 5381394413C2CDFAF9A49F2D75EDA587 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 29BDFC3B263D89D9285D4CBBBB512DD5 /* Build configuration list for PBXNativeTarget "PopupKit-iOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6764571F97F1AA48F06D11F0E8907331 /* Debug */, + 3327C22207F5AAE8A7FA15917D6E1D51 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A6F2C835AB4CB1A531735811BBC4DCFA /* Debug */, + 842401466715E872A68146CEA05BC61D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C404E9BEBABE6187AD33891B82DE66FB /* Build configuration list for PBXNativeTarget "Pods-PopupKit_tvOS_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0709811072DFC21B136D787DE6A7DC0E /* Debug */, + D0C7F796B52D57EA7CCA08E859D7CD1B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + CA2E56A4C9B41CED9563EEFEDC4A0255 /* Build configuration list for PBXNativeTarget "Pods-PopupKitExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 72DF13DF3D6379F49099A88E71E5C56E /* Debug */, + D8CCE92511C25A9166AA428BE55BC252 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Info.plist b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-acknowledgements.markdown b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-acknowledgements.markdown new file mode 100644 index 0000000..d5cfb9c --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-acknowledgements.markdown @@ -0,0 +1,27 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## PopupKit + +The MIT License (MIT) + +Copyright (c) 2013-2014 Kullect Inc. (http://kullect.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +Generated by CocoaPods - https://cocoapods.org diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-acknowledgements.plist b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-acknowledgements.plist new file mode 100644 index 0000000..7e97142 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-acknowledgements.plist @@ -0,0 +1,59 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2013-2014 Kullect Inc. (http://kullect.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + License + MIT + Title + PopupKit + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-dummy.m b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-dummy.m new file mode 100644 index 0000000..e0090b0 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_PopupKitExample : NSObject +@end +@implementation PodsDummy_Pods_PopupKitExample +@end diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-frameworks.sh b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-frameworks.sh new file mode 100755 index 0000000..dc8cf94 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-frameworks.sh @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1"" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/PopupKit-iOS/PopupKit.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/PopupKit-iOS/PopupKit.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-resources.sh b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-resources.sh new file mode 100755 index 0000000..4602c68 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-resources.sh @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-umbrella.h b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-umbrella.h new file mode 100644 index 0000000..153cf6c --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_PopupKitExampleVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_PopupKitExampleVersionString[]; + diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.debug.xcconfig b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.debug.xcconfig new file mode 100644 index 0000000..b66a1b7 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.debug.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/PopupKit-iOS" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/PopupKit-iOS/PopupKit.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "PopupKit" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.modulemap b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.modulemap new file mode 100644 index 0000000..55df6b7 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.modulemap @@ -0,0 +1,6 @@ +framework module Pods_PopupKitExample { + umbrella header "Pods-PopupKitExample-umbrella.h" + + export * + module * { export * } +} diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.release.xcconfig b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.release.xcconfig new file mode 100644 index 0000000..b66a1b7 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.release.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/PopupKit-iOS" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/PopupKit-iOS/PopupKit.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "PopupKit" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Info.plist b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Info.plist new file mode 100644 index 0000000..e4c7663 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + UIRequiredDeviceCapabilities + + arm64 + + + diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-acknowledgements.markdown b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-acknowledgements.markdown new file mode 100644 index 0000000..d5cfb9c --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-acknowledgements.markdown @@ -0,0 +1,27 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## PopupKit + +The MIT License (MIT) + +Copyright (c) 2013-2014 Kullect Inc. (http://kullect.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +Generated by CocoaPods - https://cocoapods.org diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-acknowledgements.plist b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-acknowledgements.plist new file mode 100644 index 0000000..7e97142 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-acknowledgements.plist @@ -0,0 +1,59 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + The MIT License (MIT) + +Copyright (c) 2013-2014 Kullect Inc. (http://kullect.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + License + MIT + Title + PopupKit + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-dummy.m b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-dummy.m new file mode 100644 index 0000000..5bfb27c --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_PopupKit_tvOS_Example : NSObject +@end +@implementation PodsDummy_Pods_PopupKit_tvOS_Example +@end diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-frameworks.sh b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-frameworks.sh new file mode 100755 index 0000000..42b2b7e --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-frameworks.sh @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # use filter instead of exclude so missing patterns dont' throw errors + echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1"" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current file + archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + stripped="" + for arch in $archs; do + if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/PopupKit-tvOS/PopupKit.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "$BUILT_PRODUCTS_DIR/PopupKit-tvOS/PopupKit.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-resources.sh b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-resources.sh new file mode 100755 index 0000000..4602c68 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-resources.sh @@ -0,0 +1,99 @@ +#!/bin/sh +set -e + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +case "${TARGETED_DEVICE_FAMILY}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-umbrella.h b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-umbrella.h new file mode 100644 index 0000000..1a1f6b2 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_PopupKit_tvOS_ExampleVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_PopupKit_tvOS_ExampleVersionString[]; + diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.debug.xcconfig b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.debug.xcconfig new file mode 100644 index 0000000..4258335 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.debug.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/PopupKit-tvOS" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/PopupKit-tvOS/PopupKit.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "PopupKit" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.modulemap b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.modulemap new file mode 100644 index 0000000..4c2b111 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.modulemap @@ -0,0 +1,6 @@ +framework module Pods_PopupKit_tvOS_Example { + umbrella header "Pods-PopupKit_tvOS_Example-umbrella.h" + + export * + module * { export * } +} diff --git a/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.release.xcconfig b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.release.xcconfig new file mode 100644 index 0000000..4258335 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.release.xcconfig @@ -0,0 +1,8 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/PopupKit-tvOS" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/PopupKit-tvOS/PopupKit.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "PopupKit" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT}/Pods diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/Info.plist b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/Info.plist new file mode 100644 index 0000000..90db36a --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-dummy.m b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-dummy.m new file mode 100644 index 0000000..0e5e3a4 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_PopupKit_iOS : NSObject +@end +@implementation PodsDummy_PopupKit_iOS +@end diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-prefix.pch b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-umbrella.h b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-umbrella.h new file mode 100644 index 0000000..4c0b9a7 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "PopupView.h" + +FOUNDATION_EXPORT double PopupKitVersionNumber; +FOUNDATION_EXPORT const unsigned char PopupKitVersionString[]; + diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS.modulemap b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS.modulemap new file mode 100644 index 0000000..472229c --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS.modulemap @@ -0,0 +1,6 @@ +framework module PopupKit { + umbrella header "PopupKit-iOS-umbrella.h" + + export * + module * { export * } +} diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS.xcconfig b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS.xcconfig new file mode 100644 index 0000000..6202197 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-iOS/PopupKit-iOS.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/PopupKit-iOS +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/Info.plist b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/Info.plist new file mode 100644 index 0000000..04b6a9d --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 3.1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + UIRequiredDeviceCapabilities + + arm64 + + + diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-dummy.m b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-dummy.m new file mode 100644 index 0000000..081317c --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_PopupKit_tvOS : NSObject +@end +@implementation PodsDummy_PopupKit_tvOS +@end diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-prefix.pch b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-umbrella.h b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-umbrella.h new file mode 100644 index 0000000..4c0b9a7 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS-umbrella.h @@ -0,0 +1,17 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "PopupView.h" + +FOUNDATION_EXPORT double PopupKitVersionNumber; +FOUNDATION_EXPORT const unsigned char PopupKitVersionString[]; + diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS.modulemap b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS.modulemap new file mode 100644 index 0000000..3d0533b --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS.modulemap @@ -0,0 +1,6 @@ +framework module PopupKit { + umbrella header "PopupKit-tvOS-umbrella.h" + + export * + module * { export * } +} diff --git a/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS.xcconfig b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS.xcconfig new file mode 100644 index 0000000..959d1f6 --- /dev/null +++ b/PopupKitExample/Pods/Target Support Files/PopupKit-tvOS/PopupKit-tvOS.xcconfig @@ -0,0 +1,10 @@ +CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/PopupKit-tvOS +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" +OTHER_LDFLAGS = -framework "Foundation" -framework "UIKit" +PODS_BUILD_DIR = $BUILD_DIR +PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/PopupKitExample/PopupKit/AppDelegate.h b/PopupKitExample/PopupKit/AppDelegate.h new file mode 100644 index 0000000..6b17954 --- /dev/null +++ b/PopupKitExample/PopupKit/AppDelegate.h @@ -0,0 +1,31 @@ +// +// AppDelegate.h +// KLCPopupExample +// +// Copyright (c) 2014 Jeff Mascia (http://jeffmascia.com/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/PopupKitExample/PopupKit/AppDelegate.m b/PopupKitExample/PopupKit/AppDelegate.m new file mode 100644 index 0000000..69fd977 --- /dev/null +++ b/PopupKitExample/PopupKit/AppDelegate.m @@ -0,0 +1,70 @@ +// +// AppDelegate.m +// KLCPopupExample +// +// Copyright (c) 2014 Jeff Mascia (http://jeffmascia.com/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "AppDelegate.h" +#import "ViewController.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + // Create app window + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + + ViewController* viewController = [[ViewController alloc] init]; + UINavigationController* navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; + [self.window setRootViewController:navigationController]; + [self.window makeKeyAndVisible]; + + return YES; +} + +- (void)applicationWillResignActive:(UIApplication *)application +{ + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. +} + +- (void)applicationDidBecomeActive:(UIApplication *)application +{ + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + +- (void)applicationWillTerminate:(UIApplication *)application +{ + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + +@end diff --git a/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/Contents.json b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..51e487f --- /dev/null +++ b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,102 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-58-1.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-80.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-120.png", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-58.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-80-1.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-152.png", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-120.png b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-120.png new file mode 100644 index 0000000000000000000000000000000000000000..5223557978ddbe37037a30e51e5ec80b33aef750 GIT binary patch literal 1224 zcmeAS@N?(olHy`uVBq!ia0vp^6(G#P1SGeyEo=o+k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+Sh74_978H@y_tJD@3MnPTYAp(OClPv4yr7vy(~$G+iZoT z=e4UpQq*u#irlpFQrTgysjeQKn`Laa#*1zf5I2 zp3^=@C#p~0Q7N_K)TOMF%gt%$m-l`Va+oeGwe_;f-vT4PMNcMa*)CYVWnx@Zcj8&u zEmC`ew$-u7+W*S_a4GnfhyF!Ap#|YSy;p2_ZvXXM>mj&hma{L zCHmo?dC#}-1+uHHJnXNy$01!;Q78-g^68*X2lvUtmg~(K0#$Q=i-^8rg$zyWG zLoYikjOmN0DSued=a@+T9Vc$tz1Vc+Ow6@uj?-79J=?U6(`xnwfwS}Cr_FkPa#meS z_HLlitT&YgJX76D_ibHS_?0mMD8#mFmG4>Zl-xq8BYYX=^DhK^^WmAZd-1YulWo6x zCiq?xbBJHHbG0wf-S48NZe_jjX&aSBJTeI0-(6FxYqRfl#(+zG{_XJ#XvrgpuvUAq&WmjW#UhkW<^(1#s zn?rimxplQ4W+*SqdosE8SV}I_m)2ReOVbW2UFlu3>09r~sNbFQSO2`SX%=^Ct+0wOJuw{+#tzaw+K*b-i*@fAP!iw^1u{eS6$41Zv5d?wS7G>_y0QCmXr*O%}S- zO$GM_7nYgtJ-XtukHT(VeXr}qF2^%>#g@jsH@TFW%2~Vrx0%)FWdCV*8h@95KieF= zIkh<|jaxicH~x#wT91!neoZM^-V?3G;mZtfyR-A&P3?Q$ym%}>AapA++%Z^M7_ z7jsHg{@q-#hdHCcjX`PwqZ9{_6l_SFeV>Vkf#1g6qIX50Ca`E?@O1TaS?83{1OSw& BE*}5@ literal 0 HcmV?d00001 diff --git a/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-152.png b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-152.png new file mode 100644 index 0000000000000000000000000000000000000000..bff0c8aedcf854165ae5f077b2526b450ceb4c48 GIT binary patch literal 1507 zcma)+XH?Ty6u`q?0xbn)S>gahV&NbGWJ9qgU?GGdV5uY|1cHbGLS#xs%Mu$Q{4*kVIt93FgyZULOdNrSwFQA> zuEAZLye~alxa|@B+(k2uG~S?_Ly3()BGqonv^F(umvPs%ihkLa_R4KVA}9xN^HM>4 z*EjU5($#5lA;D}UL*xPcVa)Ge?mB8w-y+PMv4nR5`UxbxMf(80@4|R%A}alp6$3<; z-X-PmF4Bi3#Kg^-&j;Ft|LB&S4UbX)6N^#T?!*o6?^)zp-UpyzDlpTXUX&4jG-bi%$2W=}T$>QQ<-T_ko;bld zK*HX$m4@jzT--oYrfg;vYQsZwpRiE^P3C3U4}u;=4|7kmTi5M4#!4jj1h(@w zVobTvZyAMKp7&AfN9!vI?xhha*h?_^nq^=-4hNtTvpu{|@4`eL&;eUda0Ra?EF0th4Y^2L=z|wIbhA~!SbWpv zk0y9ljvzTO1gMftT1li$ex7F$@=uRZm9g)&*W4z-McZ8*KHVeRhfV1hz#kOEJmVIW zt^{3x4(JA{D*A8KlUzH%O3>JSzQIKhZU)}px@D)%ltZ9jb{^X{TcEJM;g$z3!83`@ z>#f+My}9{6`&$=H)*^zLF1_LF&Oj~Ne@@ECAOTrgt9Ojs;pV>~;6Zza%jUCgmuW8! z>u@PWd4@|zC`AV1=Cd}ntAWB!I=h+CgXD+#l~mZgBg(cO^T|Fg=NFe@7g2&5O<|U< zJW(96$`u@nV8;Y(p>ecIShfkJi1D;W(b4`)aI-bkx7Td!pj*j(@$Rh(-{5)(u@CaS zoDmTJQz_xAkD>iYAhk;yGb_22g==5CMJ%gz1&}FqFLA)DE6h>?DX*^cBbK8h>N7)- z8y0S;4%n9NWM~@Y$V{Un&XljDWjU$;U_wU2P=zqhQudy&3rSEs1$z-3xUx7hnvY20 z(6J^8NC5SVxZD!!vSx}lPNfD}(*nk7?d={KDTM(N;-y;AReY0N+S8{shL3q>>f~|! z^)COHIM2dM$nGI=d;EUGx=zzkKmFdjA%Ihg`U}w-Boyk)LuT$zhis=d=R+T+j9Nvj z6Atu4>{1~kG!6WMOttv=DCi~K%|gW~&v;ord&8*&Q84V0>sqUtkl}q#kYK)|z&?gw zIO-+-)1+41tnIsA4~_B_8Fu2F50LEWK6;52G}iQc-*5%wb_rvjUi*nTeb2y0Z6+Ew z=U_$J`JL2a>h@+7bNho3foHxkIEQH`S|Bg%ZGya==Efn*R3jtLLl?HH4d)~Rh6q|tP2Z~tY^R3ELek-^TR8fV0V=v12}Lz0C9*gtGtP}vuDTpjyD9no*5b&aG+5&w1iw% z^`P;Qna;jQn29jXzO^ms9F6|j43P^``!6-@=mD&-iv%3Bg91$QUmVqTk<0<@phh;A z_`jL|I7piO#X{5N=;(`Kaz^qxW6cduG;!ha9p;uK3r416xzW7Upu@u!f*I_$zc9)s zn^Tn=Ld$}~gA$x+42OTdY4F8_{q@}BhtD=9FK`+yZZ#x&I#!{Zda)@j35NpOVfF*7 zeW9*iK4IB=hy~2lZ;SQ59J{N(-5c^;SJOaJpv`oSnl-%!BepgOe$w5g$~oxD-zLn& AfdBvi literal 0 HcmV?d00001 diff --git a/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-29.png b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-29.png new file mode 100644 index 0000000000000000000000000000000000000000..77ddeaac5a7e91d74b5bcaa560658155053a06f1 GIT binary patch literal 609 zcmV-n0-pVeP);ob+R6!loa1N2no5UElX2@nklA!V~W{l}YhH}S^?5C<&F8I5Nq_RpU2 z+ONaUOjX0Lt_5=Pf5C4-n^go=vb>&2w8~qUOI6*$9!++zK_EsSKb4h0yT#?!-Vq+o z78k>NjF5M65w}ZS1JVY~m0+0u>6XUiKFVBGbquJe4*)@a_ zvO}C&N}9tGY$kkpGapRyj#)ZkgbYn4wM~pe^t3ucgK2(sizu}gGBnV4gc4UH%GWRh zWqUZTc#XSarkt`*HDO{P!@EJtG`SVdyan8(6~L4`ThlDwK{g^XcrsI>cXoP4luw zjC+U6aDLJ|$fQuUj4`lY8{7pvKd|6f=0PW-u91B!C>N!2urS$Jsew;*dXY+`E~vh$ z?!2JAx45>Ei$Q^-HMvd%@*LlCy-KO~P2+D<^nKgn5ZqLP10@)?a?oe$0~{zW$3ko9 zt=V3$e+@XAZ5t?j8f|>V)tgf538XFy3%Br1aX`)KS^0R{%S&oL40!7I4ZGqH!;K{s}Mupo!vP#Nro6Gr1E9zT8MMLHW3|p;IdpB)VTbMo%;E3t; zsdwE;P|-kl=D_f3jrsB|K6~!h7;S|Hx)93jfW?I(JrC03hpvl9auo$#2%(Z00fWm_ z)Zu;SeQ0$t4-Ir7ger(^4x;wtv3J!;BK=*i6@*X)kD1t@(L4RBcCg*OP4arZ$dP$wbFs0ET&z&EC{{9ASj<GV1ybcCdM&k?X*EMe~ z*K!{ZQ^7EfF&hG2-4I~r>T?*xB{+#E8q&a0{(x%Cg=*|4rCdZ@`+Q;s%hNhsqvhfBMq%}Khi`~SI$+?tT(2Ru3|AD|4m@@38h>q002ovPDHLkV1h8!3wZzl literal 0 HcmV?d00001 diff --git a/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-58-1.png b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-58-1.png new file mode 100644 index 0000000000000000000000000000000000000000..5b06d8ac80ee0ed76a106ef0b13e2f6e7d64ac93 GIT binary patch literal 799 zcmV+)1K|9LP)b&4 zAqS9n3nU%^?z{-Eg}4)rF?XC1kSC?8|&b|)|pNP+W+J`E;|n7Hxq6&3HrEs3~)xmbiSMYbldr4VO<$GyvCE?0o!<}tX!TI^G9 zhU{ep**aj-q+t!Qx!fYlR*|iJOfgtm{5~7X&9dypXgb({Y%Rot1mbC)iT|Zs6=Zh- zu`on7pX}OEVv{V5m_aNIk^MOd6p*cbUXYrbK`acAJ=Z~Y6U6665Q`*tE7!J6ko_`V zwCz^kY|c)u?gDnGB|sy(9^#M5@@zO|!?;w{OWBH@oQlkqT`fI^q zJ@!R@7a=BM78M`X<%xz^*amUT4*OjX35d39(AfO2VHnfvr$?_&I)9A?4rk$qo8Po; zuRv)|c-!wiY0I#*BjQeOl16lu^-{7AgI0+jmfO+EM?CmQiV&&nm2~zRdRt4PO!kUJ z0~u?U#X^ON#RAgmjXM$e$*~t~eLWEaJo1vS1}tB}TP+|XpvNuw zrr)~@qWe!!S>;Jb_Iwc&*(@M!qf1CHSw+vU`B&0b&4 zAqS9n3nU%^?z{-Eg}4)rF?XC1kSC?8|&b|)|pNP+W+J`E;|n7Hxq6&3HrEs3~)xmbiSMYbldr4VO<$GyvCE?0o!<}tX!TI^G9 zhU{ep**aj-q+t!Qx!fYlR*|iJOfgtm{5~7X&9dypXgb({Y%Rot1mbC)iT|Zs6=Zh- zu`on7pX}OEVv{V5m_aNIk^MOd6p*cbUXYrbK`acAJ=Z~Y6U6665Q`*tE7!J6ko_`V zwCz^kY|c)u?gDnGB|sy(9^#M5@@zO|!?;w{OWBH@oQlkqT`fI^q zJ@!R@7a=BM78M`X<%xz^*amUT4*OjX35d39(AfO2VHnfvr$?_&I)9A?4rk$qo8Po; zuRv)|c-!wiY0I#*BjQeOl16lu^-{7AgI0+jmfO+EM?CmQiV&&nm2~zRdRt4PO!kUJ z0~u?U#X^ON#RAgmjXM$e$*~t~eLWEaJo1vS1}tB}TP+|XpvNuw zrr)~@qWe!!S>;Jb_Iwc&*(@M!qf1CHSw+vU`B&06}mTHRhXh@m9Jx6HCZkMB%rWjks zCQsQ@DLQ-l|6FQ-nHuA1?HJ1Za-D6b?O|N6{H(^VBu*F?nn?KM`vzU-04pJhvu zGV@MwNxqsiIXk#;#k!=ObDU4COn>$yD&)?(<&Rd)3~rwj)7_Q6HB@KnXP?P)_V{HV zo_ToUqcst=&uq>-eNy_X(<-HXm%U-39G_cDW? zn$xjj_D8{2LwAHc+kXCe+nGQXE~h<3$y$1zr;>6i0(G=EwJv<&KB4a8|t&up4^ z_v^M@eriwbQ%m3evDDH}SmktT55LXc$GT-oJiq22yZC(m#Jy?k!a;WXp4#nvd(25s ztlfRp9*MR4cJv5|XMbLPo%86c29;AOIwty7m!ox?R6K}6cVaw_UAbR<{@$f*{$JY- zIcM$Vc?#rBZTXn+?zP|Pe{T5woOLrW@&rZG2eInOD;}T;GCqeKK6(10fx?yWlL6AzIX!67Yv@RelF{r G5}E*-2ZcNU literal 0 HcmV?d00001 diff --git a/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-80-1.png b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-80-1.png new file mode 100644 index 0000000000000000000000000000000000000000..153d507fe7b87a66d8b1eb5a86aab1942730d577 GIT binary patch literal 853 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r51SA=YQ-1*|$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@Oy50S978H@y_w_NciBLs;qCM#y0Q)iLQWiQk((c|$TSFV zcqA9o#ckkWEIo~*j9G|Vg^lx8lh)RN@=wY3aYAfMGL1@vZs)$-yr)3s=sEG7tiO{2mL&G@9JH@2~vOZ z-6fWs5s2rzqH=M{N{99b<$1rE)z)zwS)KpcfAbdRNk*bCCTP_v0R<10Uw(4d;@zB; z-mF$jPW8FZJUDyT{p4Dc5SMT4>vV!u=XTW?HtUxjJ?L=ONccqYN6&z#j(VFvC>#F> z3ZHxC(h9ClE&rmKQ{`vQWiA)Lvi8dEDLY@+B{gT4x^uq@JJV!5)BRm4+woV=0?PyM zu9Ba<^NgI5u|-&U-15A=XY!Pd*96?1dV=TO727}4ca<8+@0ubhvqIae^s3OSuv2UP zo!ay5Kni;%$qU4*E+EJ@ss~a`z zmi8|{dHWhrug_Vz+mj`8R#uw?m~dQs+@Z6K-!#uVZNuVs;Y+u0-uYv;C~alot3zF9 z65L}`gYRa|oGLqW;o4oo>aVVyvdPpo-V%D*mc4{tKw@tWodhZ#l z{xerflT$Km_N+g?Tz(m6l3$(PakgkZ^$SlwI&Ge^()!huU3oSqc&A4hDSszopr05Z9hC;$Ke literal 0 HcmV?d00001 diff --git a/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-80.png b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-80.png new file mode 100644 index 0000000000000000000000000000000000000000..5c62e0873d4fe315aba91a86467c450cb0180e93 GIT binary patch literal 838 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r51SA=YQ-1*|$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@OfNiL978H@y_w~oCu}Iv{?>f5q|~ODZCtxtVj843q#aGQ z5Q#Rspl00^u+u>>$ibu4Wx|4GbN{S1?!V8Ig{d92LivyT2Tx#Qo=&(Dut$rrzM z-s)PfCEs*7H!yH-U|2uj>C%bcOgvZCJ2&qUO}l>}aDjf?v!m0sQ*0Jg%x)CCls$Q0 zo_cWDiHaR&Z!FLKYuFm5kX^!d_oB%aE=hikSAVYRvh;cGf8TpfU;X0z36CEBDe5_O zBYA=?L&OAP$@`Zcar={;KqGTNA8%-`Q75@C}_nKXwIe9O<34RolRE7sh)bmOatl`~`1&VCO&>7T~a?s(du zJvHo>%G3Vv$<|An7ilgzv*+b??ZH}*RcCfvf`EubDt*@Vy zep=33r!8Az+jV$3|0>qgEt`F%t;0{5)g_agFdJUnovR^P{VAciUF(xA_y+vp_m#fR)M}E zg1kC`g2=QO6qG4IpcYahLJ*$;WU@F=pz;)uO2Ecdx^i#7z7Oxq`INhM&dI&`uf2cg zf6m%B#fRsvrD3cA0MO!kaQpxuC@=AVOj3T-*BfXl1Lonbu0C8>SDMe!Bm2V-?*rhI zRi^`oj|>FpZ%aAicZ0&B?Q}nr`cp-q|E@X{BSRIHeSus11zY zE%8oFav~{k>^{7yh~Kp7z>xQ^dg0hWIc`|9iV<-$}O& zZ+XFdv1fp@l^=fRl2PErR&KKYn0Uzns{RW7vN# zcd%zNmP9=!XNefL&q=EXf_weK?&gc#UvfBf9>pf?QL!iUhEI+|*1g8h9Gxv3B*~|L zl!n@ydH3iZ9z3=s{g?LS?`|75+T{5bFxxAln}5EwljYxsQ>+QAnzS=Hpm(FvNq%{f z?A5|(SxMA58p$xQekib-eIxRY3!pG~KCcyQfz?^x2Ys)M-*u)heS4|WYyAw}yW4*A zt|>j5n%==Ur=D$v5fQA(mChZchWQ6mO%V~XikLV58cd69cdU$RyW2W1uefESi1b64 zA;(j*uXjwxx2h-5O}FmGJ+#o8I5HB{-S5|bE5G2^-;=uO>snZnZTEZXM!QRv@|KFD ziugr_y~E5y$wthZ<^pTM`b8^&rNDOa^VHa&db36I;0sL|8;M&QUNz=g$P+90p?ZU< z!3Q5j|#!`X?ax-uGIZE2(GxWmv-B+GvrzS9RQY}4FUZr{8Yk#^4smT$| z@0nj$c@saol&NROV2ng=_}oIW>FHHQ%nr91jo8cGoxxv|hF9isOXL6J*kSNRUqwm9 z$Lc3KY8`?fxt}rU+-%VG%*yefwT-Q5`Q}Zh%)Wo=GPKa-7C)#N`P(kenfI;Ci5&-b z73m44bY`24`@fy$op`<}FHLQ>zVYdce2+0whCicnc)@hs>*-)@jVwXjAJ$oy&0vNWe`Ev}g%w`WzSgIX>-lwA)@I(e+bT z7YnyjBgzEF2xJ`^TL^H-pBG{o@>VvUOh<)2eD^gDFLXtZQwDK3Jp0;LtJE>`g*dSm zCIFIzLLANK_F3$W#9)Mky)&CF20B(joaF~uexeW%jmOTU(Lw+@YlGQePyFXVJ5Y-a z&~$X{0Kt=zvHU~Je~1d6U;{d2G8G^eX&x#KJ`B(VQP=>Ppo}G*cQeN-Ljq3N00BWr zLiW#Qx>&XFLKAEN%J)HEC?Cu|va(SBKgHX1B@_7@HKJ?9@?oZPe!}0NV>_~fy+i;Q zw6R^pz~^AlXBc8hR#3rfOMr!khLQ=NN*ypvVDAxwb1WRd+{j0%h5nb>SZKXg&Q_=c z3_p^-5#p|O-~J9W`<$U281n{L!09Wwbvk<=hFeJ@C6iAg07KwwO0Zg0Z=hoo86#?f z-}L~NaYQBgukSO$ke_B70wlQrV8pOeX19io6wB6Q%GprL;`fbCbX{R)AsR22kdC8{8B z2xO%yH6SZdsR3J6RsD!U*s6*a1GcKF)PSw3uvHa6R;mgDvJzDgLijcrN)5wVwv=Y4-` zE%E-o1DY7NG-Ql5@gC?klrb6ir>KA(DtsoTl_BT zM%N!5-t8Bwa+6kx6j$|{4eZ&biFADI)tBmn-hoRx?DifQ`|wn=HtiluhTT3sYrI3? zsWC6!!*%1YZYfzVH9xwQutvX)67Pd6_bxh zZ$e4pQ;)NHRTUD`9fXrl9xaUpt^*~@Pai?lvw zJ8{{8y+4kdk$2lUar%+YZ<}>mJM(#2@WK(5>$V;JDy>=k&5kdFPQ-g&IrQA-nNMm+ z%2Dre^CcCDZwlv%V_FA1-}Pf$^vwqYLPGYM-jv>y#1=&DXgs8H%FNEOHkSJfUf7qe z%C_r%W#*(72ew)$pAN4$SoGDyWjnJ2Czp&X$r=>5dv(Z~>BH|YD$Y4DYV~=sUEzZu-o6ncwk^6S_xwdc3$biPxT~>RHP0Vf|aeT$eq}Dl2 zkImX_m192WOu?ge^Y>1iGpYHtBFXU$7T12*SX@{ZEw!9oE_pGK8!x<6oW*siZIld@Q z_nR4H?(XaVTa_Zt@!Nn4SD&_glbcxc&6-r7j?eA<@;i4M{n$j_$Rup0TVd}V;o+WT zO?#e`9@#U7z^5>{?L_iWZlgBZJ3 zy~cNYJH^pQ3SyM6hUGbU zd9-$G`F5XMOOFuSx8?;C$~{N2=`mBSJDM=2VBTJRf?`Bv#aT@j`WyGlGT!#qH!QJZ ze4!+-pXAoBy+++h+gCd8wai$qP%@EN|6_ls1~g7@T|Fn!q5jRdJ=BP$tf{KLeQ6G( zuW!V}_6a)oX2fpj+Lf_PX36vind&^IB}=R43~N6!Hg;jMBuBBX4P982-bclH_hq>} zlo>k)=zm<*+6_ZliS%Q-zyBQyg__CzlV!S&sb=aXI;N|Dl9M_7o& zB9Wd_5pS#Om?Ayqrt@NpxzJIy=&$pbQWjZnuxdm@fN5n!fW6ZK0jAAURIqnipn_?Q z02W!Rg$fp_B@HlGtrlRg_cY2OIT)-K>jC+^{tS>`n<3~Twfz~o$ah*`OraeBe6C{( zRo?6krdk}lJtnLrBCu7KMw%B|ExjG-7wQ4puq)fx4 zb0|Z&@kBzn@xlOI#Wtz7=#E)Dh45x$}k8KjLt9!!61ZUDYaY-LTG#_F$kfS zE5{&2KrP$)S727vG^7u+UTYX*SuqJ#5Z00;ntmQbn(00aOc zD4}E~2>_wl0|23V06+xU0{{Vl&=jGDiwOwT0{{X55tL8>2u%^P!~+1K)fE6D$Q}R) z0EDIpttJ2vss{iB03s-%01%oY0FZk00DuUx2LJ*90f2A{;ARF&7FbK5X@ORr>H#N( zlL{W0fs@h{p&W`Co*FIygz5nRq1EJ507&OPf90OtP%v+=K0yL|)0ZJ(X@DYO zsUAq!PoJlsX5Tl|KIB8sJLzU2Zy_-ZH_07Re%nk#C!01&DNT6xWwTAMTg5UK|NgdZIM5E>nF1pq`_ zJ2Vqa0Ej>j00=c)00`9s076SD0EFrR00Dq}Fec=!6#_s6hKnT_UUYCk1^}Uk3jm>d z06?hW0zjx90FXZtKzbbc`XFQN2W#F1K=Tlbe?mPFd4FW&3DrfNL!GOyvA|L@%|0|* zXtX}K-IiBW(P#;(2^uY4bZ}mSMvEFQ0EFrR+@*#K0HJySKmZ^B5RC$GQtBLVQmO}> zlsX5Tl_V=Ugy@wok&Mh9+xrd)yBpFhw8cOTIqFoxn( z547^Mqyj*w9%$uhNkuD9^*}3+RvxYV|8Fb*k5=x++^gM~@!e^?vKRj#(vuolx`e8g d|NBE#t!QUqcF(EruGgCFy!-ol?du!5;J+OLNA&;z literal 0 HcmV?d00001 diff --git a/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_portrait.png b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_portrait.png new file mode 100644 index 0000000000000000000000000000000000000000..b4838581f31492da6879ea64eea35734b5ceb902 GIT binary patch literal 17580 zcmeHPdpuNG96$5AhKR@zS&tcySkYrm&8SgL%TVL3tTbqQ$fLAa8na!cgxwI@?L{eh ztw$-6!LY@wM&iw8<_uPBGzjMy-_x;{DC$6oM zf|ddRK#60=b^(AO`$+_3M0W5nTKm30^WU(+iL+sYp3{MSyZi%p0R+B zg0h{pz7pcc?|3D;&T)-3&Ewed2X8Cu8;z3O`zylzj9qVUn|#~2x_9+6=Ckcx>@__9 z8)p`|A3v2}c>W$OEhU?hn!Y){t)$(7(4IfUHBWAAR$W@7{`&54zfL^4aWwh)EcX?) z`e4GN);I%4QLws>V3AbOxv4#%)L~(@+?3S640-f&@%Vi!B0eAgtKgh!L~FhA8m>M| z{zQxEuzCSmh*%3HyDZ9lc?3;yO22!s_AP^5$t49ReGlC0w@3^rTlP+Q>DjP}5$_{g zr_N=S@3^TP*JJj|ttyW7@W#aAaff1FQ8~x=5J{T&wk--Dq3b-6dr}bE^URjVD_Gcr z^pNjK5g(YU`xo@NZ)3s)u2_RZA{wpkp4=>yjOV$vI+I|32To8hb(B zY2KL-kEb!+jV0fmZo*R&zpu`29zf+#*7X8m4yn0~L0^$cdEu}nAhNd{56@GD1BgMY1b;#&Y!LEb57j#NU73mtCNg3U3BcX_9q=Y48 zSUg1*cX_wF_?2D~*$%SVR4&Eb??J9T^RiR=^3>av-&$E4E*Hlf{iD%$nSo=QYG8Nd z>cqe6V}8D-QE8s(oW-m!+F$+W)vYYo4&1b^U&)B2_HMPy#dOKp5wb%Kqh>xy;Xn{W z-Sob|Wb&oZG0cs^;5xmSwh@>dcfQ*(ruDWtarW4mVh6Jcs$(hu6wS zP<7U9!`(Mj8s69E+0yCKdG%7(KX0O2s75s`@!F=g^8S{*+05D8;2d6#Mtd)FZ_Fa* z6`H_QU^ZhSFcw(MY>E%{yk#&$^G>TuUP@YBF;t<$VWBYT<-nAHdeiP zrTV=mCRRV*tgKDAM5{VtaAI&>&s5dM@NUJR=U(jCceTu6k3C*FYJyRf$!e|6W8>VY zrzL=?pnM?hY+$jX+&}-f zPY@CjsBNYOfDPcV*SSUDMmuYiP)ilUy2FFjA~RYqx@U*6PDGThgC~FNhe#q>Mb8EW zI6RR|BR*%_>&s(h6)8y(#D4lyR;x$z0Wl4fv=7Gbtx#Ma^7-@_q9W?lk*PY@oQfrQ zgqecqBowD&>g6Wu=Tip=s*RcIsi<0l^*a;nKVFH*EM|ZlyVMr{alAvZ6RV0pwzAy$DfG)^@o!WT{1Gb)p4;XL+ z7_-T?RpKnOq|Fz4l<6NIw>oCe`K04{{!N)RrE;a*^FT>v*j za5o6I!!RBI10paY1VdtTvmy#(f-oowqrxyO4)X#qF#7%2*pq##QS(&Qjd5E3OJQxsBVv1t)tpET3 literal 0 HcmV?d00001 diff --git a/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_portrait@2x.png b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_portrait@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..841173a39ada28775591e14bd6cd16342506e56f GIT binary patch literal 62113 zcmeI5c~n&A8OFaEU|0khWfd@vfI@Hqmx2x|L&eI7vO~0}45luKih7Wshz{yZi;^63fpmT5qY37j59*!lo5gO)+19$( z9vsf`i%)bDwDTlawT!(-^)(XAh`;(maZnnx)+tBo9e@9nao_%rbV6>G#LjRCIyJTR zb=An5Bk#H2n|{q}ba>>Ut-V6N+LU`>#|8V1>$A)^?3|QRS9Hlo>r(Cm-$ChB)jbE7 zo4q{$@K)~>y{bp)KX&@Qusg9V^?Gfxt)F6nS?`2iZH58oE=3*oF+HLCrY-V_;QBM0 zCl_6{`MLZ*CT#B+S9{iBv~OPz{dF}?56$xQN(G}z>t{J1i3r!StXO|5WP$ZD+ga&F zdEZ4WzHrMqZPAe-Z;c0UTk^bR+Lx2xY|kwI{HSsAjR7x$k0*OvIrQA-iBCazez7!S zrA}Mg>$>IqxIO{Tv%gD-xp8lNczB-a4Z#ha_}Yb8-6p-6yJSebjb&kNYrlt^E9^#G zSu(q4(OwJr%?xuGR&X)d=|CfK(=SYfvr;lx^)cQ;yyjC;?wyh8&7WNQ`P-g?DxH@ z%qN_web9ep-mGP_doa%sIsso43hz~E?@^4u@8xCZ zYd&bk;JS}lHmAN!1=3>tzK8Bb*|Z3;4|R4onOt6;bD(VM7kz(mblf8$%=~dXz4zxQc%)% z{?YNMsF?Oe&%S9)oqyJ~V8NNgC)?`t3kS8&59GVcmZfa^zVb=zN&Psx-lM1TF7`8e z7~M3brXjGQa8KsnUnSPq^)L6R7;~X>ROaT`SE#yPBVq|Ed1+%A-T4T^_&I zta`ZFg*%R}UmPtvnYzdR_?Ncp?t9*Nb9`KEqv8A?!@SnMJ?Z{1bWYfQlY~dY))Q6@ zYo7QnzdI}=Rk!t6+3kCKyqg8-LE?g&Z+buQx!o9Zq&80eGUS4TmwO*KtG5T-tlYzG z-$6M`Z5lIxRNuc3LCH@K~92jD+z6>H6 zTd1YsNkxt_rnkwdr-ll;u%jCGh=istOxwpS`JY=CYE{)bHJ`OmvQiolMl{wsYMq*WLqFtZ8k7*yh zdSZs0x4S-PqWXfkILp{(4<1v$*IyYWO~W>7h>~}eZ|a!?(~t>MlsSDy?ojnPT~R9M z$vU-}`oJv-P%!^_A^p`KqRkdA?A$KK)bDjvX4sUxN(~wInet8H;Qng`;^30Tpt0D@KM)Z(#DG?**s@N?I zF({y6h(UG>Lk#Mw7-En{v@yh>fQBIk*)0q)RJtlo9FX0@5QDlZh8P%Ps8oOg8ip8T zw=l$@u8JWBX#_(Ia-KpAF;wgph8PskFvK9cg&_uYRSYpmBN$?+bX5#7$ZlbXq0&_` z#J~`PDnMNoLkyJ&k1H{#m0*ZLb_+uc>Z%xGkVgKKA%@lM35pNj1%SH`x?qcw2N4)8Qln^%UIBsnSz$5`pX%P9jiG!AS&_o`NeO zsjL3aP9i*+d10MCV>02IS6_T%Y^7h-=ERyc-aG$^j<)=4{xJ>r-9P2?B`Y+2%Rp0r zgvGVzY@^RieN-e7Ig9YJ@0p1rQzXNZ;$jE{M12&vAc+7MR14q&xFAY!wE!+iBESXJ z0=VEL0(U{&04_)(zy;L;xBxDQ5?n2S3z7(MLA3xbIElbr5I2Aek_d1?wE!-F3!(&9 z3*dqz0$flnfD29{a2Lc4;DRIqTu?253*dq%!PNq|Ac+7MR14sOlL*`eaRay@i2xT= z3*Z8{AWCqx04_)(zy;L;xZorLcR}0$E=VH41=Zr0;NnHj@>?Ii3jp^Ra5rCIdHr{m z7nT&36s;t#7Qcj8SW;XWK`B~WSW@uJWRUW%B=bqc@{a0DCyN5Bzq#9){ES5lb5Ay#u9i8c_ciIQ-R zaE@?}aE@?}#6+%B0FM9Pa5OIwhcPzTRO;m!%(zwY(+!{l=m0tpIuSZ4YjRx!a0DCy zN5Bzq1RQa#@`sD5F@L0;2hx` z;T+){;T(T$&hbyZ#X{v5?lEC=^yrG!-}1BshL$ceg`C?+?2r@-d)+zhIPmnl$4STe LdL8(!Y}G#jw9z|( literal 0 HcmV?d00001 diff --git a/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_iphone_2x.png b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_iphone_2x.png new file mode 100644 index 0000000000000000000000000000000000000000..a1d058a745c3ea03e0b60dc42c25c48610dadb00 GIT binary patch literal 14332 zcmeI3>049R7RGlHau@_rVnP6^$Y|j*i9$`##EKVUG|Ut#5WqTM1jPml#?)Z33e+Nv zBPz5gGL@;QOaTHHA(uf0Q3DhZ3JL`Z6|htWn*+!G0sYc1`{T-a&dxs1*?axo{jPQ5 z-8jw~YPxCw01cLllLr8J5dZ|K3ZnQWV^B5^fRb_Ou3c`dUAqk2P98rLdh8$oAFVy- z-G98tYu%3c;~sY@31^9hd%ygm1q>FMUxBP?;o#2!ky7k2%k#W>4$DO_Qm47mbb{zTP!Sbk=2_=I`?hIY|F&23 zSAjiF+qt0+Qgpm8T+PkD-D-SAoJqNyx-X%lxRXuj%pK)eCO5TcS=EsLcsw?spPB~WGJ0q=0Va>GN(#d+TapKKklPKqe8eWz)4 zGje7;;49zxTNz~sN;TvAEZ%rk#WS8im{~u?F60)Jv4YPK=aSxboW@6QaG%NkPRQ?j z<;>;gt?NVjh=TSLnXC5AAC0sXtfv;W&zg)~ml=KZJo2zs@m+1vq|e-a`GJw-ESYEM zi{KYEdxSYRxG51nFXMWfia)*4j5kX9tU9x0NTe)c+|QF_5nDQF4tD93*X&Pt;rZD+ zyYo~0+*d7bzCjO6l6@Ffai#Y1hNji!Q9tN3QTEigkD8vzJ9O&s+HN_qB2~NlQd)1v zI3JJN=mQMIbkM*7?RaZgM%#*V-6YwPytF1nNP>z}c0My53k*^cIpvVpdorSzrj@GNeY zc4t5RXq*oHp0UteXtB6SXeP8?+?&AnD>qy;4!Ba4Y(?BwFJ_dl<9;B{9IBieSAEl>zNlYG<*OAR-S3*3 z8+l&u^(ZcvPx0$X6W{Z&m(|N>j54GAZw+5fh^D0`n7PDHCc4%&4BFvKQYCYNbEbv& z2(wFKk`0aaBJ4kVO=Nb1w`mbRyJyt+H``hQzC`+0r?YaSp4m5&Kj|vSDfm$JbYtn} zfTzyq$t_#Rt;3t_zbLJ&O}t}V^_AhbBRl)%t9D2As)zly-|76jTKbsJk^NaD;l!HR zYTfRyr#Poy+NCEd&z4sXzPjTwgd}^?3j62vN7;kD{F3%)(I4KeW=`}C4!ZC19dzkj z!*`VSgVPK@5D|S$&w>PiotWjc(<>S`(N&`%vROmed3K~)%(Lzn9XVj8AAMSr?I)Q0 zJVr@njR8{xaCn_qy4cGNkHxWEDd4NT53Y-FR11H9?4k%ag1o=W7Dur0DJ^|J3ZYE{ z8%`+%j|BaAB0?35k?-|Z{zplrPDx$rJ20q)#p+ClC2tGu>+# zLS(C`qCZIhV^F68R-gXz8iQ4g0(WQdV1<6MDI%ON&p&Ww5CiKV@X{4vb9Phkig&RI z1dxiX7Ru%VH9-?A7GgB)6eQu=bd{du`XOk zbyXcz2!hnvP7ZDmgqJ`N@rW{vd~+;e2>B!$1@GA5!rrk%-{t7x{lSO6f}l@6IPKYc zxXWYpw%EgNx2a5hZ^tun5Ar?T_m=AFcx~jacxEI9721}2-hO9v02lyn)3SLXun>Za^ra7 zUyIyVhE>Pne{YR7aF&Hp^u*e;YOYP~{QI2MRZ4TS!Nu_JQ)?z4+Y<3P_$%TYn!?t4 z)2-ZfOqKI3W}}o`WhrbgRqVGa4&)JN@}z#xFx@hP{fR}nKLj3q)Nhp#UTpJD!}5B> z^qAi%@3|Z4rTa=WVtdSAc~r(SpWT~YGs!97<(IMpPmpF4-nJdb3)i|%XZ;`+^t^E7 z@p4!9z&#{U>yeBVd*(tSY(#5lg{?EjqgUmIpFE2=pjmWVOETd#dsnesj{t5DrLd!4JTwL3@vMll^?MCXZy4Des6S@139r&PAK`Kwt>b#KJ-8LqG zX;BKMly3DLUeo2*?iO_amdtV3!NHJAwFr8WwTp4vC1u0K+KSI??Tt6cV^06t7-(bQ z+@^V`J8Db9AN4Wc|Dsi4k>;AtsLwxA^;@Ag)4c;Xzc#37%v$#V`F4Sw;`*2}rZ)>(Kf{m(biErur5O!>B^w$lEV?8UUjtguX8rdE3| zBP2$famPq(CN^JKFE$lhE$ogH_>>te82MeQOtd6zDW9lFHCBl7d4c5aIKP8W_^F#s z-MI~-L9L;S^V0cW>~#xPm-0SL${4Je98-DKthS(6K@+GJh3vT}viO@w+oWL(--Msl zc|3^85m0@)Qj_ku*~;q_(}o$5zBh(0#|h~vai&hO6Y@%WdLx{HZb5OYQ1aUIk*Nb?t)0%hJUbl*&)^-k z^{XkS4-_suq-#!wpskv0hwUCh+;~T|y2N@FVf)G9swBQuujJr9Q$68v4UUg!;_E1) z@+y6n1j6C9qZvsaE_f`C=E)#|^84Vb1V=OX^~EkqaKrHXyKHa-Yp;@$_gM%n>R38r z5FQTr`AE157Q;X4F8>Zuxt6FV^X?ze#9}p;-O>P%9A{N%lERt?##l^~grOrtldmFM zL;Ft0bFkPN>c%dx^i2YwI#sPJSR4SAE#JYCuy)I!?wf}ulm~2ub{fj*pWc1z@LzGKcNxz^qNxH$rLCeLPwMPd1yxG!fxvF2# zvWBKiAq*BW5&XDUH-zEGO9X)yi4X=rn{kAKrzKJ>iN6eLN<~QaQureRAy0L#U=Si- zL6f{8Ll_3NBVhH#A1^VmibCM-1Rh#OzvyHM&YSP+znnzhDgb)!3}It-LGX%yt`Wnl zL6VwmUIoGcF9aD^Zg|u(GDb@!xT|1t;K`xOlm(V0x~;*ULkkQjC`(lxR7(`20M0Gp zF#vItYygIWGATg6mbfP1mP^bDoC?s@0FFE;a{}kNC9njCRg^h_llT%?0+|72PC#Y= zG6RtIfNqJZOn^88;tYBPKye0&GiYIf{v6tU0vZa?P(V){H2e`>2%3+e`3OulKu!m8 zI`Do0V;f2ffe!`vP=J{fIAu{@2s*2vvkDB{zyY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PopupKitExample/PopupKit/PopupKitExample-Info.plist b/PopupKitExample/PopupKit/PopupKitExample-Info.plist new file mode 100644 index 0000000..05ec255 --- /dev/null +++ b/PopupKitExample/PopupKit/PopupKitExample-Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + PopupKitExample + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 3.0 + CFBundleSignature + ???? + CFBundleVersion + 2 + LSRequiresIPhoneOS + + NSMainNibFile + LaunchScreen + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/PopupKitExample/PopupKit/PopupKitExample-Prefix.pch b/PopupKitExample/PopupKit/PopupKitExample-Prefix.pch new file mode 100644 index 0000000..9f4c510 --- /dev/null +++ b/PopupKitExample/PopupKit/PopupKitExample-Prefix.pch @@ -0,0 +1,16 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#import + +#ifndef __IPHONE_5_0 +#warning "This project uses features only available in iOS SDK 5.0 and later." +#endif + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/PopupKitExample/PopupKit/ViewController.h b/PopupKitExample/PopupKit/ViewController.h new file mode 100644 index 0000000..da093c9 --- /dev/null +++ b/PopupKitExample/PopupKit/ViewController.h @@ -0,0 +1,29 @@ +// +// ViewController.h +// KLCPopupExample +// +// Copyright (c) 2014 Jeff Mascia (http://jeffmascia.com/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +@interface ViewController : UIViewController + +@end diff --git a/PopupKitExample/PopupKit/ViewController.m b/PopupKitExample/PopupKit/ViewController.m new file mode 100644 index 0000000..9683c3d --- /dev/null +++ b/PopupKitExample/PopupKit/ViewController.m @@ -0,0 +1,879 @@ +// +// ViewController.m +// PopupViewExample +// +// Copyright (c) 2014 Jeff Mascia (http://jeffmascia.com/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import "ViewController.h" +@import PopupKit; +#import + + +typedef NS_ENUM(NSInteger, FieldTag) { + FieldTagHorizontalLayout = 1001, + FieldTagVerticalLayout, + FieldTagMaskType, + FieldTagShowType, + FieldTagDismissType, + FieldTagBackgroundDismiss, + FieldTagContentDismiss, + FieldTagTimedDismiss, +}; + + +typedef NS_ENUM(NSInteger, CellType) { + CellTypeNormal = 0, + CellTypeSwitch, +}; + + +@interface ViewController () { + + NSArray* _fields; + NSDictionary* _namesForFields; + + NSArray* _horizontalLayouts; + NSArray* _verticalLayouts; + NSArray* _maskTypes; + NSArray* _showTypes; + NSArray* _dismissTypes; + + NSDictionary* _namesForHorizontalLayouts; + NSDictionary* _namesForVerticalLayouts; + NSDictionary* _namesForMaskTypes; + NSDictionary* _namesForShowTypes; + NSDictionary* _namesForDismissTypes; + + NSInteger _selectedRowInHorizontalField; + NSInteger _selectedRowInVerticalField; + NSInteger _selectedRowInMaskField; + NSInteger _selectedRowInShowField; + NSInteger _selectedRowInDismissField; + BOOL _shouldDismissOnBackgroundTouch; + BOOL _shouldDismissOnContentTouch; + BOOL _shouldDismissAfterDelay; +} + +@property (nonatomic, strong) UITableView* tableView; +@property (nonatomic, strong) UIPopoverController* popover; + +// Private +- (void)updateFieldTableView:(UITableView*)tableView; +- (NSInteger)valueForRow:(NSInteger)row inFieldWithTag:(NSInteger)tag; +- (NSInteger)selectedRowForFieldWithTag:(NSInteger)tag; +- (NSString*)nameForValue:(NSInteger)value inFieldWithTag:(NSInteger)tag; +- (CellType)cellTypeForFieldWithTag:(NSInteger)tag; + +// Event handlers +- (void)toggleValueDidChange:(id)sender; +- (void)showButtonPressed:(id)sender; +- (void)dismissButtonPressed:(id)sender; +- (void)fieldCancelButtonPressed:(id)sender; + +@end + + +@interface UIColor (PopupViewExample) ++ (UIColor*)klcLightGreenColor; ++ (UIColor*)klcGreenColor; +@end + + +@interface UIView (PopupViewExample) +- (UITableViewCell*)parentCell; +@end + + + +@implementation ViewController + +#pragma mark - UIViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + + self.title = @"PopupView Example"; + + // MAIN LIST + _fields = @[@(FieldTagHorizontalLayout), + @(FieldTagVerticalLayout), + @(FieldTagMaskType), + @(FieldTagShowType), + @(FieldTagDismissType), + @(FieldTagBackgroundDismiss), + @(FieldTagContentDismiss), + @(FieldTagTimedDismiss)]; + + _namesForFields = @{@(FieldTagHorizontalLayout) : @"Horizontal layout", + @(FieldTagVerticalLayout) : @"Vertical layout", + @(FieldTagMaskType) : @"Background mask", + @(FieldTagShowType) : @"Show type", + @(FieldTagDismissType) : @"Dismiss type", + @(FieldTagBackgroundDismiss) : @"Dismiss on background touch", + @(FieldTagContentDismiss) : @"Dismiss on content touch", + @(FieldTagTimedDismiss) : @"Dismiss after delay"}; + + // FIELD SUB-LISTS + _horizontalLayouts = @[@(PopupViewHorizontalLayoutLeft), + @(PopupViewHorizontalLayoutLeftOfCenter), + @(PopupViewHorizontalLayoutCenter), + @(PopupViewHorizontalLayoutRightOfCenter), + @(PopupViewHorizontalLayoutRight)]; + + _namesForHorizontalLayouts = @{@(PopupViewHorizontalLayoutLeft) : @"Left", + @(PopupViewHorizontalLayoutLeftOfCenter) : @"Left of Center", + @(PopupViewHorizontalLayoutCenter) : @"Center", + @(PopupViewHorizontalLayoutRightOfCenter) : @"Right of Center", + @(PopupViewHorizontalLayoutRight) : @"Right"}; + + _verticalLayouts = @[@(PopupViewVerticalLayoutTop), + @(PopupViewVerticalLayoutAboveCenter), + @(PopupViewVerticalLayoutCenter), + @(PopupViewVerticalLayoutBelowCenter), + @(PopupViewVerticalLayoutBottom)]; + + _namesForVerticalLayouts = @{@(PopupViewVerticalLayoutTop) : @"Top", + @(PopupViewVerticalLayoutAboveCenter) : @"Above Center", + @(PopupViewVerticalLayoutCenter) : @"Center", + @(PopupViewVerticalLayoutBelowCenter) : @"Below Center", + @(PopupViewVerticalLayoutBottom) : @"Bottom"}; + + _maskTypes = @[@(PopupViewMaskTypeNone), + @(PopupViewMaskTypeClear), + @(PopupViewMaskTypeDimmed), + @(PopupViewMaskTypeLightBlur), + @(PopupViewMaskTypeDarkBlur)]; + + _namesForMaskTypes = @{@(PopupViewMaskTypeNone) : @"None", + @(PopupViewMaskTypeClear) : @"Clear", + @(PopupViewMaskTypeDimmed) : @"Dimmed", + @(PopupViewMaskTypeLightBlur): @"Light blur", + @(PopupViewMaskTypeDarkBlur): @"Dark blur"}; + + _showTypes = @[@(PopupViewShowTypeNone), + @(PopupViewShowTypeFadeIn), + @(PopupViewShowTypeGrowIn), + @(PopupViewShowTypeShrinkIn), + @(PopupViewShowTypeSlideInFromTop), + @(PopupViewShowTypeSlideInFromBottom), + @(PopupViewShowTypeSlideInFromLeft), + @(PopupViewShowTypeSlideInFromRight), + @(PopupViewShowTypeBounceIn), + @(PopupViewShowTypeBounceInFromTop), + @(PopupViewShowTypeBounceInFromBottom), + @(PopupViewShowTypeBounceInFromLeft), + @(PopupViewShowTypeBounceInFromRight)]; + + _namesForShowTypes = @{@(PopupViewShowTypeNone) : @"None", + @(PopupViewShowTypeFadeIn) : @"Fade in", + @(PopupViewShowTypeGrowIn) : @"Grow in", + @(PopupViewShowTypeShrinkIn) : @"Shrink in", + @(PopupViewShowTypeSlideInFromTop) : @"Slide from Top", + @(PopupViewShowTypeSlideInFromBottom) : @"Slide from Bottom", + @(PopupViewShowTypeSlideInFromLeft) : @"Slide from Left", + @(PopupViewShowTypeSlideInFromRight) : @"Slide from Right", + @(PopupViewShowTypeBounceIn) : @"Bounce in", + @(PopupViewShowTypeBounceInFromTop) : @"Bounce from Top", + @(PopupViewShowTypeBounceInFromBottom) : @"Bounce from Bottom", + @(PopupViewShowTypeBounceInFromLeft) : @"Bounce from Left", + @(PopupViewShowTypeBounceInFromRight) : @"Bounce from Right"}; + + _dismissTypes = @[@(PopupViewDismissTypeNone), + @(PopupViewDismissTypeFadeOut), + @(PopupViewDismissTypeGrowOut), + @(PopupViewDismissTypeShrinkOut), + @(PopupViewDismissTypeSlideOutToTop), + @(PopupViewDismissTypeSlideOutToBottom), + @(PopupViewDismissTypeSlideOutToLeft), + @(PopupViewDismissTypeSlideOutToRight), + @(PopupViewDismissTypeBounceOut), + @(PopupViewDismissTypeBounceOutToTop), + @(PopupViewDismissTypeBounceOutToBottom), + @(PopupViewDismissTypeBounceOutToLeft), + @(PopupViewDismissTypeBounceOutToRight)]; + + _namesForDismissTypes = @{@(PopupViewDismissTypeNone) : @"None", + @(PopupViewDismissTypeFadeOut) : @"Fade out", + @(PopupViewDismissTypeGrowOut) : @"Grow out", + @(PopupViewDismissTypeShrinkOut) : @"Shrink out", + @(PopupViewDismissTypeSlideOutToTop) : @"Slide to Top", + @(PopupViewDismissTypeSlideOutToBottom) : @"Slide to Bottom", + @(PopupViewDismissTypeSlideOutToLeft) : @"Slide to Left", + @(PopupViewDismissTypeSlideOutToRight) : @"Slide to Right", + @(PopupViewDismissTypeBounceOut) : @"Bounce out", + @(PopupViewDismissTypeBounceOutToTop) : @"Bounce to Top", + @(PopupViewDismissTypeBounceOutToBottom) : @"Bounce to Bottom", + @(PopupViewDismissTypeBounceOutToLeft) : @"Bounce to Left", + @(PopupViewDismissTypeBounceOutToRight) : @"Bounce to Right"}; + + // DEFAULTS + _selectedRowInHorizontalField = [_horizontalLayouts indexOfObject:@(PopupViewHorizontalLayoutCenter)]; + _selectedRowInVerticalField = [_verticalLayouts indexOfObject:@(PopupViewVerticalLayoutCenter)]; + _selectedRowInMaskField = [_maskTypes indexOfObject:@(PopupViewMaskTypeDimmed)]; + _selectedRowInShowField = [_showTypes indexOfObject:@(PopupViewShowTypeBounceInFromTop)]; + _selectedRowInDismissField = [_dismissTypes indexOfObject:@(PopupViewDismissTypeBounceOutToBottom)]; + _shouldDismissOnBackgroundTouch = YES; + _shouldDismissOnContentTouch = NO; + _shouldDismissAfterDelay = NO; + } + return self; +} + + +- (void)loadView { + [super loadView]; + + // TABLEVIEW + UITableView* tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; + tableView.translatesAutoresizingMaskIntoConstraints = NO; + tableView.delegate = self; + tableView.dataSource = self; + tableView.delaysContentTouches = NO; + self.tableView = tableView; + [self.view addSubview:tableView]; + + NSDictionary* views = NSDictionaryOfVariableBindings(tableView); + NSDictionary* metrics = nil; + [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[tableView]|" + options:0 + metrics:metrics + views:views]]; + + [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[tableView]|" + options:0 + metrics:metrics + views:views]]; + + // FOOTER + UIView* footerView = [[UIView alloc] init]; + + UIButton* showButton = [UIButton buttonWithType:UIButtonTypeCustom]; + showButton.translatesAutoresizingMaskIntoConstraints = NO; + showButton.contentEdgeInsets = UIEdgeInsetsMake(14, 28, 14, 28); + [showButton setTitle:@"Show it!" forState:UIControlStateNormal]; + showButton.backgroundColor = [UIColor lightGrayColor]; + [showButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [showButton setTitleColor:[[showButton titleColorForState:UIControlStateNormal] colorWithAlphaComponent:0.5] forState:UIControlStateHighlighted]; + showButton.titleLabel.font = [UIFont boldSystemFontOfSize:20.0]; + [showButton.layer setCornerRadius:8.0]; + [showButton addTarget:self action:@selector(showButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; + + [footerView addSubview:showButton]; + + CGFloat topMargin = 12.0; + CGFloat bottomMargin = 12.0; + + views = NSDictionaryOfVariableBindings(showButton); + metrics = @{@"topMargin" : @(topMargin), + @"bottomMargin" : @(bottomMargin)}; + [footerView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(topMargin)-[showButton]-(bottomMargin)-|" + options:0 + metrics:metrics + views:views]]; + + [footerView addConstraint:[NSLayoutConstraint constraintWithItem:showButton + attribute:NSLayoutAttributeCenterX + relatedBy:NSLayoutRelationEqual + toItem:showButton.superview + attribute:NSLayoutAttributeCenterX + multiplier:1.0 + constant:0.0]]; + + CGRect footerFrame = CGRectZero; + footerFrame.size = [showButton systemLayoutSizeFittingSize:UILayoutFittingCompressedSize]; + footerFrame.size.height += topMargin + bottomMargin; + footerView.frame = footerFrame; + self.tableView.tableFooterView = footerView; +} + + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + self.automaticallyAdjustsScrollViewInsets = YES; + self.view.backgroundColor = [UIColor whiteColor]; +} + + +#pragma mark - Event Handlers + +- (void)toggleValueDidChange:(id)sender { + + if ([sender isKindOfClass:[UISwitch class]]) { + UISwitch* toggle = (UISwitch*)sender; + + NSIndexPath* indexPath = [self.tableView indexPathForCell:[toggle parentCell]]; + id obj = [_fields objectAtIndex:indexPath.row]; + if ([obj isKindOfClass:[NSNumber class]]) { + + NSInteger fieldTag = [(NSNumber*)obj integerValue]; + if (fieldTag == FieldTagBackgroundDismiss) { + _shouldDismissOnBackgroundTouch = toggle.on; + + } else if (fieldTag == FieldTagContentDismiss) { + _shouldDismissOnContentTouch = toggle.on; + + } else if (fieldTag == FieldTagTimedDismiss) { + _shouldDismissAfterDelay = toggle.on; + } + } + } +} + + +- (void)showButtonPressed:(id)sender { + + // Generate content view to present + UIView* contentView = [[UIView alloc] init]; + contentView.translatesAutoresizingMaskIntoConstraints = NO; + contentView.backgroundColor = [UIColor klcLightGreenColor]; + contentView.layer.cornerRadius = 12.0; + + UILabel* dismissLabel = [[UILabel alloc] init]; + dismissLabel.translatesAutoresizingMaskIntoConstraints = NO; + dismissLabel.backgroundColor = [UIColor clearColor]; + dismissLabel.textColor = [UIColor whiteColor]; + dismissLabel.font = [UIFont boldSystemFontOfSize:72.0]; + dismissLabel.text = @"Hi."; + + UIButton* dismissButton = [UIButton buttonWithType:UIButtonTypeCustom]; + dismissButton.translatesAutoresizingMaskIntoConstraints = NO; + dismissButton.contentEdgeInsets = UIEdgeInsetsMake(10, 20, 10, 20); + dismissButton.backgroundColor = [UIColor klcGreenColor]; + [dismissButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [dismissButton setTitleColor:[[dismissButton titleColorForState:UIControlStateNormal] colorWithAlphaComponent:0.5] forState:UIControlStateHighlighted]; + dismissButton.titleLabel.font = [UIFont boldSystemFontOfSize:16.0]; + [dismissButton setTitle:@"Bye" forState:UIControlStateNormal]; + dismissButton.layer.cornerRadius = 6.0; + [dismissButton addTarget:self action:@selector(dismissButtonPressed:) forControlEvents:UIControlEventTouchUpInside]; + + [contentView addSubview:dismissLabel]; + [contentView addSubview:dismissButton]; + + NSDictionary* views = NSDictionaryOfVariableBindings(contentView, dismissButton, dismissLabel); + + [contentView addConstraints: + [NSLayoutConstraint constraintsWithVisualFormat:@"V:|-(16)-[dismissLabel]-(10)-[dismissButton]-(24)-|" + options:NSLayoutFormatAlignAllCenterX + metrics:nil + views:views]]; + + [contentView addConstraints: + [NSLayoutConstraint constraintsWithVisualFormat:@"H:|-(36)-[dismissLabel]-(36)-|" + options:0 + metrics:nil + views:views]]; + + // Show in popup + PopupViewLayout layout = PopupViewLayoutMake((PopupViewHorizontalLayout)[self valueForRow:_selectedRowInHorizontalField inFieldWithTag:FieldTagHorizontalLayout], + (PopupViewVerticalLayout)[self valueForRow:_selectedRowInVerticalField inFieldWithTag:FieldTagVerticalLayout]); + + PopupView* popup = [PopupView popupViewWithContentView:contentView + showType:(PopupViewShowType)[self valueForRow:_selectedRowInShowField inFieldWithTag:FieldTagShowType] + dismissType:(PopupViewDismissType)[self valueForRow:_selectedRowInDismissField inFieldWithTag:FieldTagDismissType] + maskType:(PopupViewMaskType)[self valueForRow:_selectedRowInMaskField inFieldWithTag:FieldTagMaskType] + shouldDismissOnBackgroundTouch:_shouldDismissOnBackgroundTouch shouldDismissOnContentTouch:_shouldDismissOnContentTouch]; + + if (_shouldDismissAfterDelay) { + [popup showWithLayout:layout duration:2.0]; + } else { + [popup showWithLayout:layout]; + } +} + + +- (void)dismissButtonPressed:(id)sender { + if ([sender isKindOfClass:[UIView class]]) { + [(UIView*)sender dismissPresentingPopup]; + } +} + + +- (void)fieldCancelButtonPressed:(id)sender { + [self dismissViewControllerAnimated:YES completion:NULL]; +} + + +#pragma mark - Private + +- (void)updateFieldTableView:(UITableView*)tableView { + + if (tableView != nil) { + + NSInteger fieldTag = tableView.tag; + NSInteger selectedRow = [self selectedRowForFieldWithTag:fieldTag]; + + for (NSIndexPath* indexPath in [tableView indexPathsForVisibleRows]) { + + UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath]; + if (cell != nil) { + + if (indexPath.row == selectedRow) { + cell.accessoryType = UITableViewCellAccessoryCheckmark; + } else { + cell.accessoryType = UITableViewCellAccessoryNone; + } + } + } + } +} + + +- (NSInteger)valueForRow:(NSInteger)row inFieldWithTag:(NSInteger)tag { + + NSArray* listForField = nil; + if (tag == FieldTagHorizontalLayout) { + listForField = _horizontalLayouts; + + } else if (tag == FieldTagVerticalLayout) { + listForField = _verticalLayouts; + + } else if (tag == FieldTagMaskType) { + listForField = _maskTypes; + + } else if (tag == FieldTagShowType) { + listForField = _showTypes; + + } else if (tag == FieldTagDismissType) { + listForField = _dismissTypes; + } + + // If row is out of bounds, try using first row. + if (row >= listForField.count) { + row = 0; + } + + if (row < listForField.count) { + id obj = [listForField objectAtIndex:row]; + if ([obj isKindOfClass:[NSNumber class]]) { + return [(NSNumber*)obj integerValue]; + } + } + + return 0; +} + + +- (NSInteger)selectedRowForFieldWithTag:(NSInteger)tag { + if (tag == FieldTagHorizontalLayout) { + return _selectedRowInHorizontalField; + + } else if (tag == FieldTagVerticalLayout) { + return _selectedRowInVerticalField; + + } else if (tag == FieldTagMaskType) { + return _selectedRowInMaskField; + + } else if (tag == FieldTagShowType) { + return _selectedRowInShowField; + + } else if (tag == FieldTagDismissType) { + return _selectedRowInDismissField; + } + return NSNotFound; +} + + +- (NSString*)nameForValue:(NSInteger)value inFieldWithTag:(NSInteger)tag { + + NSDictionary* namesForField = nil; + if (tag == FieldTagHorizontalLayout) { + namesForField = _namesForHorizontalLayouts; + + } else if (tag == FieldTagVerticalLayout) { + namesForField = _namesForVerticalLayouts; + + } else if (tag == FieldTagMaskType) { + namesForField = _namesForMaskTypes; + + } else if (tag == FieldTagShowType) { + namesForField = _namesForShowTypes; + + } else if (tag == FieldTagDismissType) { + namesForField = _namesForDismissTypes; + } + + if (namesForField != nil) { + return [namesForField objectForKey:@(value)]; + } + return nil; +} + + +- (CellType)cellTypeForFieldWithTag:(NSInteger)tag { + + CellType cellType; + switch (tag) { + case FieldTagHorizontalLayout: + cellType = CellTypeNormal; + break; + case FieldTagVerticalLayout: + cellType = CellTypeNormal; + break; + case FieldTagMaskType: + cellType = CellTypeNormal; + break; + case FieldTagShowType: + cellType = CellTypeNormal; + break; + case FieldTagDismissType: + cellType = CellTypeNormal; + break; + case FieldTagBackgroundDismiss: + cellType = CellTypeSwitch; + break; + case FieldTagContentDismiss: + cellType = CellTypeSwitch; + break; + case FieldTagTimedDismiss: + cellType = CellTypeSwitch; + break; + default: + cellType = CellTypeNormal; + break; + } + return cellType; +} + + +#pragma mark - + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + + // MAIN TABLE + if (tableView == self.tableView) { + return _fields.count; + } + + // FIELD TABLES + else { + + if (tableView.tag == FieldTagHorizontalLayout) { + return _horizontalLayouts.count; + + } else if (tableView.tag == FieldTagVerticalLayout) { + return _verticalLayouts.count; + + } else if (tableView.tag == FieldTagMaskType) { + return _maskTypes.count; + + } else if (tableView.tag == FieldTagShowType) { + return _showTypes.count; + + } else if (tableView.tag == FieldTagDismissType) { + return _dismissTypes.count; + } + } + + return 0; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + + // MAIN TABLE + if (tableView == self.tableView) { + + id obj = [_fields objectAtIndex:indexPath.row]; + if ([obj isKindOfClass:[NSNumber class]]) { + FieldTag fieldTag = [(NSNumber*)obj integerValue]; + + UITableViewCell* cell = nil; + CellType cellType = [self cellTypeForFieldWithTag:fieldTag]; + + NSString* identifier = @""; + if (cellType == CellTypeNormal) { + identifier = @"normal"; + } else if (cellType == CellTypeSwitch) { + identifier = @"switch"; + } + + cell = [tableView dequeueReusableCellWithIdentifier:identifier]; + + if (nil == cell) { + UITableViewCellStyle style = UITableViewCellStyleValue1; + cell = [[UITableViewCell alloc] initWithStyle:style reuseIdentifier:identifier]; + UIEdgeInsets newSeparatorInset = cell.separatorInset; + newSeparatorInset.right = newSeparatorInset.left; + cell.separatorInset = newSeparatorInset; + + if (cellType == CellTypeNormal) { + cell.selectionStyle = UITableViewCellSelectionStyleGray; + + } else if (cellType == CellTypeSwitch) { + cell.selectionStyle = UITableViewCellSelectionStyleNone; + UISwitch* toggle = [[UISwitch alloc] init]; + toggle.onTintColor = [UIColor lightGrayColor]; + [toggle addTarget:self action:@selector(toggleValueDidChange:) forControlEvents:UIControlEventValueChanged]; + cell.accessoryView = toggle; + } + } + + cell.textLabel.text = [_namesForFields objectForKey:@(fieldTag)]; + + // populate Normal cell + if (cellType == CellTypeNormal) { + NSInteger selectedRowInField = [self selectedRowForFieldWithTag:fieldTag]; + if (selectedRowInField != NSNotFound) { + cell.detailTextLabel.text = [self nameForValue:[self valueForRow:selectedRowInField inFieldWithTag:fieldTag] inFieldWithTag:fieldTag]; + } + } + // populate Switch cell + else if (cellType == CellTypeSwitch) { + if ([cell.accessoryView isKindOfClass:[UISwitch class]]) { + BOOL on = NO; + if (fieldTag == FieldTagBackgroundDismiss) { + on = _shouldDismissOnBackgroundTouch; + } else if (fieldTag == FieldTagContentDismiss) { + on = _shouldDismissOnContentTouch; + } else if (fieldTag == FieldTagTimedDismiss) { + on = _shouldDismissAfterDelay; + } + [(UISwitch*)cell.accessoryView setOn:on]; + } + } + + return cell; + } + } + + // FIELD TABLES + else { + + UITableViewCell* cell = nil; + + Class cellClass = [UITableViewCell class]; + NSString* identifier = NSStringFromClass(cellClass); + + cell = [tableView dequeueReusableCellWithIdentifier:identifier]; + + if (nil == cell) { + UITableViewCellStyle style = UITableViewCellStyleDefault; + cell = [[cellClass alloc] initWithStyle:style reuseIdentifier:identifier]; + UIEdgeInsets newSeparatorInset = cell.separatorInset; + newSeparatorInset.right = newSeparatorInset.left; + cell.separatorInset = newSeparatorInset; + } + + NSInteger fieldTag = tableView.tag; + + cell.textLabel.text = [self nameForValue:[self valueForRow:indexPath.row inFieldWithTag:fieldTag] inFieldWithTag:fieldTag]; + + if (indexPath.row == [self selectedRowForFieldWithTag:fieldTag]) { + cell.accessoryType = UITableViewCellAccessoryCheckmark; + } else { + cell.accessoryType = UITableViewCellAccessoryNone; + } + + return cell; + } + + return nil; +} + + +#pragma mark - + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + + // MAIN TABLE + if (tableView == self.tableView) { + + id obj = [_fields objectAtIndex:indexPath.row]; + if ([obj isKindOfClass:[NSNumber class]]) { + NSInteger fieldTag = [(NSNumber*)obj integerValue]; + + if ([self cellTypeForFieldWithTag:fieldTag] == CellTypeNormal) { + + UIViewController* fieldController = [[UIViewController alloc] init]; + + UITableView* fieldTableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; + fieldTableView.delegate = self; + fieldTableView.dataSource = self; + fieldTableView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); + fieldTableView.tag = fieldTag; + fieldController.view = fieldTableView; + + // IPAD + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { + + // Present in a popover + UIPopoverController* popover = [[UIPopoverController alloc] initWithContentViewController:fieldController]; + popover.delegate = self; + self.popover = popover; + + // Set KVO so we can adjust the popover's size to fit the table's content once it's populated. + [fieldTableView addObserver:self forKeyPath:@"contentSize" options:NSKeyValueObservingOptionNew context:nil]; + + CGRect senderFrameInView = [self.tableView convertRect:[self.tableView rectForRowAtIndexPath:indexPath] toView:self.view]; + [popover presentPopoverFromRect:senderFrameInView inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; + } + + // IPHONE + else { + + // Present in a modal + UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath]; + fieldController.title = cell.textLabel.text; + UIBarButtonItem* cancelButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(fieldCancelButtonPressed:)]; + fieldController.navigationItem.rightBarButtonItem = cancelButton; + + UINavigationController* navigationController = [[UINavigationController alloc] initWithRootViewController:fieldController]; + navigationController.delegate = self; + [self presentViewController:navigationController animated:YES completion:NULL]; + } + } + } + [tableView deselectRowAtIndexPath:indexPath animated:YES]; + } + + // FIELD TABLES + else { + + if (tableView.tag == FieldTagHorizontalLayout) { + _selectedRowInHorizontalField = indexPath.row; + + } else if (tableView.tag == FieldTagVerticalLayout) { + _selectedRowInVerticalField = indexPath.row; + + } else if (tableView.tag == FieldTagMaskType) { + _selectedRowInMaskField = indexPath.row; + + } else if (tableView.tag == FieldTagShowType) { + _selectedRowInShowField = indexPath.row; + + } else if (tableView.tag == FieldTagDismissType) { + _selectedRowInDismissField = indexPath.row; + } + + [tableView deselectRowAtIndexPath:indexPath animated:YES]; + + [self updateFieldTableView:tableView]; + + [self.tableView reloadData]; + + // IPAD + if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { + [self.popover dismissPopoverAnimated:YES]; + } + // IPHONE + else { + [self dismissViewControllerAnimated:YES completion:NULL]; + } + } +} + +#pragma mark - + +- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { + + // If this is a field table, make sure the selected row is scrolled into view when it appears. + if ((navigationController == self.presentedViewController) && [viewController.view isKindOfClass:[UITableView class]]) { + + UITableView* fieldTableView = (UITableView*)viewController.view; + + NSInteger selectedRow = [self selectedRowForFieldWithTag:fieldTableView.tag]; + if ([fieldTableView numberOfRowsInSection:0] > selectedRow) { + [fieldTableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:selectedRow inSection:0] atScrollPosition:UITableViewScrollPositionMiddle animated:NO]; + } + } +} + + +#pragma mark - + +- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController { + + // Cleanup by removing KVO and reference to popover + UIView* view = popoverController.contentViewController.view; + if ([view isKindOfClass:[UITableView class]]) { + [(UITableView*)view removeObserver:self forKeyPath:@"contentSize"]; + } + + self.popover = nil; +} + + +#pragma mark - + +- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + + if ([keyPath isEqualToString:@"contentSize"]) { + + if ([object isKindOfClass:[UITableView class]]) { + UITableView* tableView = (UITableView*)object; + + if (self.popover != nil) { + [self.popover setPopoverContentSize:tableView.contentSize animated:NO]; + } + + // Make sure the selected row is scrolled into view when it appears + NSInteger fieldTag = tableView.tag; + NSInteger selectedRow = [self selectedRowForFieldWithTag:fieldTag]; + + if ([tableView numberOfRowsInSection:0] > selectedRow) { + [tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:selectedRow inSection:0] atScrollPosition:UITableViewScrollPositionMiddle animated:NO]; + } + } + } +} + + +@end + + +#pragma mark - Categories + +@implementation UIColor (PopupViewExample) + ++ (UIColor*)klcLightGreenColor { + return [UIColor colorWithRed:(184.0/255.0) green:(233.0/255.0) blue:(122.0/255.0) alpha:1.0]; +} + ++ (UIColor*)klcGreenColor { + return [UIColor colorWithRed:(0.0/255.0) green:(204.0/255.0) blue:(134.0/255.0) alpha:1.0]; +} + +@end + + + +@implementation UIView (PopupViewExample) + +- (UITableViewCell*)parentCell { + + // Iterate over superviews until you find a UITableViewCell + UIView* view = self; + while (view != nil) { + if ([view isKindOfClass:[UITableViewCell class]]) { + return (UITableViewCell*)view; + } else { + view = [view superview]; + } + } + return nil; +} + +@end + + diff --git a/PopupKitExample/PopupKit/en.lproj/InfoPlist.strings b/PopupKitExample/PopupKit/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/PopupKitExample/PopupKit/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/PopupKitExample/PopupKit/main.m b/PopupKitExample/PopupKit/main.m new file mode 100644 index 0000000..1031084 --- /dev/null +++ b/PopupKitExample/PopupKit/main.m @@ -0,0 +1,34 @@ +// +// main.m +// KLCPopupExample +// +// Copyright (c) 2014 Jeff Mascia (http://jeffmascia.com/) +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#import + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) +{ + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/PopupKitExample/PopupKitExample.xcodeproj/project.pbxproj b/PopupKitExample/PopupKitExample.xcodeproj/project.pbxproj new file mode 100644 index 0000000..31d8572 --- /dev/null +++ b/PopupKitExample/PopupKitExample.xcodeproj/project.pbxproj @@ -0,0 +1,620 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1F7E1B061965CF7D00D576D8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F7E1B051965CF7D00D576D8 /* QuartzCore.framework */; }; + 1FA76AB2195893080075A8E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FA76AB1195893080075A8E4 /* Foundation.framework */; }; + 1FA76AB4195893080075A8E4 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FA76AB3195893080075A8E4 /* CoreGraphics.framework */; }; + 1FA76AB6195893080075A8E4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FA76AB5195893080075A8E4 /* UIKit.framework */; }; + 1FA76ABC195893080075A8E4 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1FA76ABA195893080075A8E4 /* InfoPlist.strings */; }; + 1FA76ABE195893080075A8E4 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FA76ABD195893080075A8E4 /* main.m */; }; + 1FA76AC2195893080075A8E4 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FA76AC1195893080075A8E4 /* AppDelegate.m */; }; + 1FA76ACB195893080075A8E4 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FA76ACA195893080075A8E4 /* ViewController.m */; }; + 1FA76ACD195893080075A8E4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1FA76ACC195893080075A8E4 /* Images.xcassets */; }; + 6D09A5581BD2040F0069F2FF /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6D09A5571BD2040F0069F2FF /* LaunchScreen.xib */; }; + 6DD4EDFF1E1F5C1B0015001D /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DD4EDFE1E1F5C1B0015001D /* AppDelegate.swift */; }; + 6DD4EE011E1F5C1B0015001D /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DD4EE001E1F5C1B0015001D /* ViewController.swift */; }; + 6DD4EE041E1F5C1B0015001D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6DD4EE021E1F5C1B0015001D /* Main.storyboard */; }; + 6DD4EE061E1F5C1B0015001D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6DD4EE051E1F5C1B0015001D /* Assets.xcassets */; }; + A97E47AA600975CFAB7656AE /* Pods_PopupKit_tvOS_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEEC73527EC5481A035E6C62 /* Pods_PopupKit_tvOS_Example.framework */; }; + ADECE6474366B676D545D0D3 /* Pods_PopupKitExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8115AA96D04804BC879505B6 /* Pods_PopupKitExample.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 6D09A5541BD2035B0069F2FF /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1F7E1B051965CF7D00D576D8 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 1FA76AAE195893080075A8E4 /* PopupKitExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PopupKitExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1FA76AB1195893080075A8E4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1FA76AB3195893080075A8E4 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 1FA76AB5195893080075A8E4 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 1FA76AB9195893080075A8E4 /* PopupKitExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PopupKitExample-Info.plist"; sourceTree = ""; }; + 1FA76ABB195893080075A8E4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 1FA76ABD195893080075A8E4 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 1FA76ABF195893080075A8E4 /* PopupKitExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PopupKitExample-Prefix.pch"; sourceTree = ""; }; + 1FA76AC0195893080075A8E4 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 1FA76AC1195893080075A8E4 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 1FA76AC9195893080075A8E4 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 1FA76ACA195893080075A8E4 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 1FA76ACC195893080075A8E4 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 1FA76AD3195893080075A8E4 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 4484C06AC2F4E79242EC9E0E /* Pods-PopupKitExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PopupKitExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.debug.xcconfig"; sourceTree = ""; }; + 6D09A5571BD2040F0069F2FF /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = ""; }; + 6DD4EDFC1E1F5C1A0015001D /* PopupKit_tvOS_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PopupKit_tvOS_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 6DD4EDFE1E1F5C1B0015001D /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 6DD4EE001E1F5C1B0015001D /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 6DD4EE031E1F5C1B0015001D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 6DD4EE051E1F5C1B0015001D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 6DD4EE071E1F5C1B0015001D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6F0EDA1082FA4BDE1AAEA990 /* Pods-PopupKit_tvOS_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PopupKit_tvOS_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.release.xcconfig"; sourceTree = ""; }; + 8115AA96D04804BC879505B6 /* Pods_PopupKitExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PopupKitExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B4C772A1AD756C43C4CCB80B /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DABB6F0982F788909EA546C4 /* Pods-PopupKitExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PopupKitExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample.release.xcconfig"; sourceTree = ""; }; + DEEC73527EC5481A035E6C62 /* Pods_PopupKit_tvOS_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_PopupKit_tvOS_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E4CB342E0C3F1DFCDA3CF0D8 /* Pods-PopupKit_tvOS_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PopupKit_tvOS_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1FA76AAB195893080075A8E4 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 1F7E1B061965CF7D00D576D8 /* QuartzCore.framework in Frameworks */, + 1FA76AB4195893080075A8E4 /* CoreGraphics.framework in Frameworks */, + 1FA76AB6195893080075A8E4 /* UIKit.framework in Frameworks */, + 1FA76AB2195893080075A8E4 /* Foundation.framework in Frameworks */, + ADECE6474366B676D545D0D3 /* Pods_PopupKitExample.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6DD4EDF91E1F5C1A0015001D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A97E47AA600975CFAB7656AE /* Pods_PopupKit_tvOS_Example.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 1FA76AA5195893080075A8E4 = { + isa = PBXGroup; + children = ( + 1FA76AB7195893080075A8E4 /* PopupKit */, + 6DD4EDFD1E1F5C1B0015001D /* PopupKit_tvOS_Example */, + 1FA76AB0195893080075A8E4 /* Frameworks */, + 1FA76AAF195893080075A8E4 /* Products */, + 725756A00CC63E1FFB464E38 /* Pods */, + ); + sourceTree = ""; + }; + 1FA76AAF195893080075A8E4 /* Products */ = { + isa = PBXGroup; + children = ( + 1FA76AAE195893080075A8E4 /* PopupKitExample.app */, + 6DD4EDFC1E1F5C1A0015001D /* PopupKit_tvOS_Example.app */, + ); + name = Products; + sourceTree = ""; + }; + 1FA76AB0195893080075A8E4 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1F7E1B051965CF7D00D576D8 /* QuartzCore.framework */, + 1FA76AB1195893080075A8E4 /* Foundation.framework */, + 1FA76AB3195893080075A8E4 /* CoreGraphics.framework */, + 1FA76AB5195893080075A8E4 /* UIKit.framework */, + 1FA76AD3195893080075A8E4 /* XCTest.framework */, + B4C772A1AD756C43C4CCB80B /* Pods.framework */, + 8115AA96D04804BC879505B6 /* Pods_PopupKitExample.framework */, + DEEC73527EC5481A035E6C62 /* Pods_PopupKit_tvOS_Example.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 1FA76AB7195893080075A8E4 /* PopupKit */ = { + isa = PBXGroup; + children = ( + 1FA76AC0195893080075A8E4 /* AppDelegate.h */, + 1FA76AC1195893080075A8E4 /* AppDelegate.m */, + 1FA76AC9195893080075A8E4 /* ViewController.h */, + 1FA76ACA195893080075A8E4 /* ViewController.m */, + 1FA76ACC195893080075A8E4 /* Images.xcassets */, + 1FA76AB8195893080075A8E4 /* Supporting Files */, + 6D09A5571BD2040F0069F2FF /* LaunchScreen.xib */, + ); + path = PopupKit; + sourceTree = ""; + }; + 1FA76AB8195893080075A8E4 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 1FA76AB9195893080075A8E4 /* PopupKitExample-Info.plist */, + 1FA76ABA195893080075A8E4 /* InfoPlist.strings */, + 1FA76ABD195893080075A8E4 /* main.m */, + 1FA76ABF195893080075A8E4 /* PopupKitExample-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 6DD4EDFD1E1F5C1B0015001D /* PopupKit_tvOS_Example */ = { + isa = PBXGroup; + children = ( + 6DD4EDFE1E1F5C1B0015001D /* AppDelegate.swift */, + 6DD4EE001E1F5C1B0015001D /* ViewController.swift */, + 6DD4EE021E1F5C1B0015001D /* Main.storyboard */, + 6DD4EE051E1F5C1B0015001D /* Assets.xcassets */, + 6DD4EE071E1F5C1B0015001D /* Info.plist */, + ); + path = PopupKit_tvOS_Example; + sourceTree = ""; + }; + 725756A00CC63E1FFB464E38 /* Pods */ = { + isa = PBXGroup; + children = ( + 4484C06AC2F4E79242EC9E0E /* Pods-PopupKitExample.debug.xcconfig */, + DABB6F0982F788909EA546C4 /* Pods-PopupKitExample.release.xcconfig */, + E4CB342E0C3F1DFCDA3CF0D8 /* Pods-PopupKit_tvOS_Example.debug.xcconfig */, + 6F0EDA1082FA4BDE1AAEA990 /* Pods-PopupKit_tvOS_Example.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1FA76AAD195893080075A8E4 /* PopupKitExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1FA76AE3195893080075A8E4 /* Build configuration list for PBXNativeTarget "PopupKitExample" */; + buildPhases = ( + EDF9DB7AACA5195D3CBEA862 /* [CP] Check Pods Manifest.lock */, + 1FA76AAA195893080075A8E4 /* Sources */, + 1FA76AAB195893080075A8E4 /* Frameworks */, + 1FA76AAC195893080075A8E4 /* Resources */, + 6D09A5541BD2035B0069F2FF /* Embed Frameworks */, + 002459D1D3F1FA86659D7A4C /* [CP] Embed Pods Frameworks */, + 7E73616A0C13491D6F6D0173 /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PopupKitExample; + productName = KLCPopupExample; + productReference = 1FA76AAE195893080075A8E4 /* PopupKitExample.app */; + productType = "com.apple.product-type.application"; + }; + 6DD4EDFB1E1F5C1A0015001D /* PopupKit_tvOS_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6DD4EE0A1E1F5C1B0015001D /* Build configuration list for PBXNativeTarget "PopupKit_tvOS_Example" */; + buildPhases = ( + 93252EC97F01979FD6C85678 /* [CP] Check Pods Manifest.lock */, + 6DD4EDF81E1F5C1A0015001D /* Sources */, + 6DD4EDF91E1F5C1A0015001D /* Frameworks */, + 6DD4EDFA1E1F5C1A0015001D /* Resources */, + 14876DA4B129888238BDEDDC /* [CP] Embed Pods Frameworks */, + 41A5BD2326FE4732C06F775B /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = PopupKit_tvOS_Example; + productName = PopupKit_tvOS_Example; + productReference = 6DD4EDFC1E1F5C1A0015001D /* PopupKit_tvOS_Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 1FA76AA6195893080075A8E4 /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = KLC; + LastSwiftUpdateCheck = 0820; + LastUpgradeCheck = 0800; + ORGANIZATIONNAME = Kullect; + TargetAttributes = { + 1FA76AAD195893080075A8E4 = { + DevelopmentTeam = DQAU73Z92C; + }; + 6DD4EDFB1E1F5C1A0015001D = { + CreatedOnToolsVersion = 8.2.1; + DevelopmentTeam = DQAU73Z92C; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 1FA76AA9195893080075A8E4 /* Build configuration list for PBXProject "PopupKitExample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 1FA76AA5195893080075A8E4; + productRefGroup = 1FA76AAF195893080075A8E4 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 1FA76AAD195893080075A8E4 /* PopupKitExample */, + 6DD4EDFB1E1F5C1A0015001D /* PopupKit_tvOS_Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 1FA76AAC195893080075A8E4 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1FA76ACD195893080075A8E4 /* Images.xcassets in Resources */, + 6D09A5581BD2040F0069F2FF /* LaunchScreen.xib in Resources */, + 1FA76ABC195893080075A8E4 /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6DD4EDFA1E1F5C1A0015001D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6DD4EE061E1F5C1B0015001D /* Assets.xcassets in Resources */, + 6DD4EE041E1F5C1B0015001D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 002459D1D3F1FA86659D7A4C /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 14876DA4B129888238BDEDDC /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 41A5BD2326FE4732C06F775B /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PopupKit_tvOS_Example/Pods-PopupKit_tvOS_Example-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 7E73616A0C13491D6F6D0173 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PopupKitExample/Pods-PopupKitExample-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 93252EC97F01979FD6C85678 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + EDF9DB7AACA5195D3CBEA862 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1FA76AAA195893080075A8E4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1FA76ACB195893080075A8E4 /* ViewController.m in Sources */, + 1FA76ABE195893080075A8E4 /* main.m in Sources */, + 1FA76AC2195893080075A8E4 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6DD4EDF81E1F5C1A0015001D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6DD4EE011E1F5C1B0015001D /* ViewController.swift in Sources */, + 6DD4EDFF1E1F5C1B0015001D /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 1FA76ABA195893080075A8E4 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 1FA76ABB195893080075A8E4 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 6DD4EE021E1F5C1B0015001D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6DD4EE031E1F5C1B0015001D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1FA76AE1195893080075A8E4 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 1FA76AE2195893080075A8E4 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = 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_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 1FA76AE4195893080075A8E4 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 4484C06AC2F4E79242EC9E0E /* Pods-PopupKitExample.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + DEVELOPMENT_TEAM = DQAU73Z92C; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "PopupKit/PopupKitExample-Prefix.pch"; + INFOPLIST_FILE = "PopupKit/PopupKitExample-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.rynecheow.PopupKitExample; + PRODUCT_NAME = PopupKitExample; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 1FA76AE5195893080075A8E4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DABB6F0982F788909EA546C4 /* Pods-PopupKitExample.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + DEVELOPMENT_TEAM = DQAU73Z92C; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "PopupKit/PopupKitExample-Prefix.pch"; + INFOPLIST_FILE = "PopupKit/PopupKitExample-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.rynecheow.PopupKitExample; + PRODUCT_NAME = PopupKitExample; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + 6DD4EE081E1F5C1B0015001D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E4CB342E0C3F1DFCDA3CF0D8 /* Pods-PopupKit_tvOS_Example.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = DQAU73Z92C; + INFOPLIST_FILE = PopupKit_tvOS_Example/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = "com.rynecheow.PopupKit-tvOS-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Debug; + }; + 6DD4EE091E1F5C1B0015001D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6F0EDA1082FA4BDE1AAEA990 /* Pods-PopupKit_tvOS_Example.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = DQAU73Z92C; + INFOPLIST_FILE = PopupKit_tvOS_Example/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = "com.rynecheow.PopupKit-tvOS-Example"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 10.1; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1FA76AA9195893080075A8E4 /* Build configuration list for PBXProject "PopupKitExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1FA76AE1195893080075A8E4 /* Debug */, + 1FA76AE2195893080075A8E4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1FA76AE3195893080075A8E4 /* Build configuration list for PBXNativeTarget "PopupKitExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1FA76AE4195893080075A8E4 /* Debug */, + 1FA76AE5195893080075A8E4 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6DD4EE0A1E1F5C1B0015001D /* Build configuration list for PBXNativeTarget "PopupKit_tvOS_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6DD4EE081E1F5C1B0015001D /* Debug */, + 6DD4EE091E1F5C1B0015001D /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 1FA76AA6195893080075A8E4 /* Project object */; +} diff --git a/PopupKitExample/PopupKitExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/PopupKitExample/PopupKitExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..a7ab5c7 --- /dev/null +++ b/PopupKitExample/PopupKitExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/PopupKitExample/PopupKitExample.xcworkspace/contents.xcworkspacedata b/PopupKitExample/PopupKitExample.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..4636260 --- /dev/null +++ b/PopupKitExample/PopupKitExample.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/PopupKitExample/PopupKit_tvOS_Example/AppDelegate.swift b/PopupKitExample/PopupKit_tvOS_Example/AppDelegate.swift new file mode 100644 index 0000000..6918fba --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// PopupKit_tvOS_Example +// +// Created by Ryne Cheow on 6/1/17. +// Copyright © 2017 Kullect. 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 + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json new file mode 100644 index 0000000..8bf75d9 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json new file mode 100644 index 0000000..8bf75d9 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json new file mode 100644 index 0000000..6d596bc --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json @@ -0,0 +1,32 @@ +{ + "assets" : [ + { + "size" : "1280x768", + "idiom" : "tv", + "filename" : "App Icon - Large.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "App Icon - Small.imagestack", + "role" : "primary-app-icon" + }, + { + "size" : "2320x720", + "idiom" : "tv", + "filename" : "Top Shelf Image Wide.imageset", + "role" : "top-shelf-image-wide" + }, + { + "size" : "1920x720", + "idiom" : "tv", + "filename" : "Top Shelf Image.imageset", + "role" : "top-shelf-image" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/LaunchImage.launchimage/Contents.json b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000..29d94c7 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "orientation" : "landscape", + "idiom" : "tv", + "extent" : "full-screen", + "minimum-system-version" : "9.0", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit_tvOS_Example/Base.lproj/Main.storyboard b/PopupKitExample/PopupKit_tvOS_Example/Base.lproj/Main.storyboard new file mode 100644 index 0000000..5fc9bb5 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PopupKitExample/PopupKit_tvOS_Example/Info.plist b/PopupKitExample/PopupKit_tvOS_Example/Info.plist new file mode 100644 index 0000000..63dcd6c --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + arm64 + + UIUserInterfaceStyle + Automatic + + diff --git a/PopupKitExample/PopupKit_tvOS_Example/ViewController.swift b/PopupKitExample/PopupKit_tvOS_Example/ViewController.swift new file mode 100644 index 0000000..29878d7 --- /dev/null +++ b/PopupKitExample/PopupKit_tvOS_Example/ViewController.swift @@ -0,0 +1,30 @@ +// +// ViewController.swift +// PopupKit_tvOS_Example +// +// Created by Ryne Cheow on 6/1/17. +// Copyright © 2017 Kullect. All rights reserved. +// + +import UIKit +import PopupKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + let view = UIView(frame: CGRect(x: 0, y: 0, width: 400, height: 400)) + view.backgroundColor = .red + let popupView = PopupView(contentView: view) + // Do any additional setup after loading the view, typically from a nib. + popupView.show(with: 2.0) + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + +} + diff --git a/README.md b/README.md new file mode 100644 index 0000000..4b8ec3e --- /dev/null +++ b/README.md @@ -0,0 +1,222 @@ +PopupKit +======== + +PopupKit is a simple and flexible iOS framework for presenting any custom view as a popup. It includes a variety of options for controlling how your popup appears and behaves. + +

+ +##Installation + +###CocoaPods +You can install PopupKit easily with Cocoapods + +``` +pod 'PopupKit' +``` + +###CocoaPods +You can install PopupKit easily with Carthage too + +``` +github 'rynecheow/PopupKit' +``` + +##Usage + +To import the framework you can either: + +####In Swift, + +``` +import PopupKit +``` + +####In Objective-C, + +``` +@import PopupKit; +``` + +or + +``` +#import +``` + +### Creating a Popup + +Create a popup for displaying a UIView using default animations and behaviors (similar to a UIAlertView): +```objc ++ (instancetype)popupWithContentView:(UIView*)contentView; +``` + +or similarly in Swift: +```swift +convenience init(contentView: UIView) +``` + +Or create a popup with custom animations and behaviors. Customizations can also be accessed via properties on the popup instance: +```objc ++ (instancetype)popupViewWithContentView:(UIView *)contentView + showType:(PopupViewShowType)showType + dismissType:(PopupViewDismissType)dismissType + maskType:(PopupViewMaskType)maskType + shouldDismissOnBackgroundTouch:(BOOL)shouldDismissOnBackgroundTouch + shouldDismissOnContentTouch:(BOOL)shouldDismissOnContentTouch; +``` + +or similarly in Swift: +```swift +convenience init(contentView: UIView, showType: PopupView.ShowType, dismissType: PopupView.DismissType, maskType: PopupView.MaskType, shouldDismissOnBackgroundTouch: Bool, shouldDismissOnContentTouch: Bool) +``` + +Also **you must give your `contentView` a size** before showing it (by setting its frame), or **it must size itself with AutoLayout**. + + +### Showing a Popup + + +Show popup in middle of screen. +```objc +- (void)show; +``` + +or similarly in Swift: +```swift +func show() +``` + +There are two ways to control where your popup is displayed: + +1. Relative layout presets (see `PopupView.h` for options). + +```objc +- (void)showWithLayout:(PopupViewLayout)layout; +``` + +or similarly in Swift: +```swift +func show(with layout: PopupView.Layout) +``` + +2. Explicit center point relative to a view's coordinate system. +```objc +- (void)showAtCenter:(CGPoint)center inView:(UIView *)view; +``` + +or similarly in Swift: +```swift +func show(at center: CGPoint, in view: UIView) +``` + + +If you want your popup to dismiss automatically (like a toast in Android) you can set an explicit `duration`: +```objc +- (void)showWithDuration:(NSTimeInterval)duration; +``` +or similarly in Swift: +```swift +func show(with duration: TimeInterval) +``` + +### Dismissing a Popup + +There are a few ways to dismiss a popup: + +If you have a reference to the popup instance, you can send this message to it. If `animated`, then it will use the animation specified in `dismissType`. Otherwise it will just disappear: +```objc +- (void)dismiss:(BOOL)animated; +``` + +or similarly in Swift: +```swift +func dismiss(animated: Bool) +``` + +If you lost your reference to a popup or you want to make sure no popups are showing, this class method dismisses any and all popups in your app: + +```objc ++ (void)dismissAllPopups; +``` + +or similarly in Swift: +```swift +class func dismissAllPopups() +``` + +Also you can call this category method from `UIView(PopupView)` on your contentView, or any of its subviews, to dismiss its parent popup: +```objc +- (void)dismissPresentingPopup; // UIView category +``` + +or similarly in Swift: +```swift +func dismissPresentingPopup() +``` + +### Customization + + +Animation used to show your popup: +```objc +@property (nonatomic, assign) PopupViewShowType showType; +``` + +Animation used to dismiss your popup: +```objc +@property (nonatomic, assign) PopupViewDismissType dismissType; +``` + +Mask prevents touches to the background from passing through to views below: +```objc +@property (nonatomic, assign) PopupViewMaskType maskType; +``` + +Popup will automatically dismiss if the background is touched: +```objc +@property (nonatomic, assign) BOOL shouldDismissOnBackgroundTouch; +``` + +Popup will automatically dismiss if the contentView is touched: +```objc +@property (nonatomic, assign) BOOL shouldDismissOnContentTouch; +``` + +Override alpha value for dimmed background mask: +```objc +@property (nonatomic, assign) CGFloat dimmedMaskAlpha; +``` + +### Blocks + +Use these blocks to synchronize other actions with popup events: +```objc +@property (nonatomic, copy) void (^didFinishShowingCompletion)(); + +@property (nonatomic, copy) void (^willStartDismissingCompletion)(); + +@property (nonatomic, copy) void (^didFinishDismissingCompletion)(); +``` + +### Example +```objc +UIView* contentView = [[UIView alloc] init]; +contentView.backgroundColor = [UIColor orangeColor]; +contentView.frame = CGRectMake(0.0, 0.0, 100.0, 100.0); + +PopupView* popup = [PopupView popupWithContentView:contentView]; +[popup show]; +``` + +## Notes + +* Xcode 8.0 / Swift 3.0 +* iOS >= 9.0 (Use as an **Embedded** Framework) +* tvOS >= 9.0 + +### TODO +- Add support for drag-to-dismiss. + +##Credits +KLCPopup was created by Jeff Mascia and the team at Kullect, where it's used in the [Shout Photo Messenger](http://tryshout.com) app. Aspects of KLCPopup were inspired by Sam Vermette's [SVProgressHUD](https://github.com/samvermette/SVProgressHUD). PopupKit is a modernised version of +KLCPopup ported by Ryne Cheow.