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 0000000..5223557 Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-120.png differ 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 0000000..bff0c8a Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-152.png differ 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 0000000..77ddeaa Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-29.png differ diff --git a/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-40.png b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-40.png new file mode 100644 index 0000000..391e821 Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-40.png differ 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 0000000..5b06d8a Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-58-1.png differ diff --git a/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-58.png b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-58.png new file mode 100644 index 0000000..5b06d8a Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-58.png differ diff --git a/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-76.png b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-76.png new file mode 100644 index 0000000..48f1916 Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-76.png differ 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 0000000..153d507 Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-80-1.png differ 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 0000000..5c62e08 Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/AppIcon.appiconset/icon-80.png differ diff --git a/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/Contents.json b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000..267fa83 --- /dev/null +++ b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,57 @@ +{ + "images" : [ + { + "orientation" : "portrait", + "idiom" : "iphone", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "filename" : "launch_iphone_2x.png", + "scale" : "2x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "retina4", + "filename" : "launch_iphone_r4.png", + "minimum-system-version" : "7.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "filename" : "launch_ipad_portrait.png", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "filename" : "launch_ipad_landscape.png", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "filename" : "launch_ipad_portrait@2x.png", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "filename" : "launch_ipad_landscape@2x.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_landscape.png b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_landscape.png new file mode 100644 index 0000000..9a40d97 Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_landscape.png differ diff --git a/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_landscape@2x.png b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_landscape@2x.png new file mode 100644 index 0000000..86aed87 Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_landscape@2x.png differ 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 0000000..b483858 Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_portrait.png differ 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 0000000..841173a Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_ipad_portrait@2x.png differ 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 0000000..a1d058a Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_iphone_2x.png differ diff --git a/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_iphone_r4.png b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_iphone_r4.png new file mode 100644 index 0000000..f52106e Binary files /dev/null and b/PopupKitExample/PopupKit/Images.xcassets/LaunchImage.launchimage/launch_iphone_r4.png differ diff --git a/PopupKitExample/PopupKit/LaunchScreen.xib b/PopupKitExample/PopupKit/LaunchScreen.xib new file mode 100644 index 0000000..950ef14 --- /dev/null +++ b/PopupKitExample/PopupKit/LaunchScreen.xib @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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.