Repository: huri000/SwiftEntryKit Branch: master Commit: 5ad36cccf0c4 Files: 209 Total size: 685.5 KB Directory structure: gitextract_o_kfc_hq/ ├── .codecov.yml ├── .github/ │ └── ISSUE_TEMPLATE/ │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .gitmodules ├── .travis.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── CREDITS.md ├── Example/ │ ├── Podfile │ ├── Pods/ │ │ ├── Local Podspecs/ │ │ │ └── SwiftEntryKit.podspec.json │ │ ├── Pods.xcodeproj/ │ │ │ └── project.pbxproj │ │ └── Target Support Files/ │ │ ├── Pods-SwiftEntryKitDemo/ │ │ │ ├── Pods-SwiftEntryKitDemo-Info.plist │ │ │ ├── Pods-SwiftEntryKitDemo-acknowledgements.markdown │ │ │ ├── Pods-SwiftEntryKitDemo-acknowledgements.plist │ │ │ ├── Pods-SwiftEntryKitDemo-dummy.m │ │ │ ├── Pods-SwiftEntryKitDemo-frameworks.sh │ │ │ ├── Pods-SwiftEntryKitDemo-umbrella.h │ │ │ ├── Pods-SwiftEntryKitDemo.debug.xcconfig │ │ │ ├── Pods-SwiftEntryKitDemo.modulemap │ │ │ └── Pods-SwiftEntryKitDemo.release.xcconfig │ │ ├── Pods-SwiftEntryKitTests/ │ │ │ ├── Pods-SwiftEntryKitTests-Info.plist │ │ │ ├── Pods-SwiftEntryKitTests-acknowledgements.markdown │ │ │ ├── Pods-SwiftEntryKitTests-acknowledgements.plist │ │ │ ├── Pods-SwiftEntryKitTests-dummy.m │ │ │ ├── Pods-SwiftEntryKitTests-frameworks.sh │ │ │ ├── Pods-SwiftEntryKitTests-umbrella.h │ │ │ ├── Pods-SwiftEntryKitTests.debug.xcconfig │ │ │ ├── Pods-SwiftEntryKitTests.modulemap │ │ │ └── Pods-SwiftEntryKitTests.release.xcconfig │ │ └── SwiftEntryKit/ │ │ ├── SwiftEntryKit-Info.plist │ │ ├── SwiftEntryKit-dummy.m │ │ ├── SwiftEntryKit-prefix.pch │ │ ├── SwiftEntryKit-umbrella.h │ │ ├── SwiftEntryKit.debug.xcconfig │ │ ├── SwiftEntryKit.modulemap │ │ └── SwiftEntryKit.release.xcconfig │ ├── SwiftEntryKit/ │ │ ├── AppDelegate.swift │ │ ├── Base.lproj/ │ │ │ ├── LaunchScreen.xib │ │ │ └── Main.storyboard │ │ ├── DemoAppInfo.plist │ │ ├── Images.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ ├── Contents.json │ │ │ ├── audience-band-blur-518389.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── battery/ │ │ │ │ ├── Contents.json │ │ │ │ ├── battery0.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── battery1.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── battery2.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── battery3.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── battery4.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ └── battery5.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── iPhone Icons/ │ │ │ │ ├── Contents.json │ │ │ │ ├── ic_bottom_float.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── ic_bottom_popup.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── ic_bottom_toast.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── ic_sb_note.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── ic_top_float.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── ic_top_note.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ └── ic_top_toast.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_apple.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_books.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_coffee_light.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_done_all_dark_48pt.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_done_all_light_48pt.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_fast_forward_white.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_fast_rewind_white.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_info_outline.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_lock_dark.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_lock_light.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_madi_profile.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_mail_dark.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_mail_light.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_pause_circle_outline_white_36pt.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_pause_white.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_phone_dark.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_phone_light.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_pizza.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_star_selected.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_star_unselected.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_success.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_user_dark.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_user_light.imageset/ │ │ │ │ └── Contents.json │ │ │ ├── ic_wifi.imageset/ │ │ │ │ └── Contents.json │ │ │ └── paper-plane-light.imageset/ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── Playground/ │ │ │ ├── Cells/ │ │ │ │ ├── AnimationSelectionTableViewCell.swift │ │ │ │ ├── BackgroundStyleSelectionTableViewCell.swift │ │ │ │ ├── BorderSelectionTableViewCell.swift │ │ │ │ ├── DisplayDurationSelectionTableViewCell.swift │ │ │ │ ├── HapticFeedbackSelectionTableViewCell.swift │ │ │ │ ├── HeightSelectionTableViewCell.swift │ │ │ │ ├── MaxWidthSelectionTableViewCell.swift │ │ │ │ ├── PositionSelectionTableViewCell.swift │ │ │ │ ├── PrioritySelectionTableViewCell.swift │ │ │ │ ├── RoundCornersSelectionTableViewCell.swift │ │ │ │ ├── SafeAreaSelectionTableViewCell.swift │ │ │ │ ├── ScrollSelectionTableViewCell.swift │ │ │ │ ├── SelectionHeaderView.swift │ │ │ │ ├── SelectionTableViewCell.swift │ │ │ │ ├── ShadowSelectionTableViewCell.swift │ │ │ │ ├── UserInteractionSelectionTableViewCell.swift │ │ │ │ ├── WidthSelectionTableViewCell.swift │ │ │ │ └── WindowLevelSelectionTableViewCell.swift │ │ │ ├── EntryAttributeWrapper.swift │ │ │ └── PlaygroundViewController.swift │ │ ├── Presets/ │ │ │ ├── FormFieldPresetFactory.swift │ │ │ ├── PresetTableViewCell.swift │ │ │ ├── PresetsData/ │ │ │ │ ├── PresetDescription.swift │ │ │ │ └── PresetsDataSource.swift │ │ │ ├── PresetsViewController.swift │ │ │ └── Samples/ │ │ │ ├── ExampleNavigationController/ │ │ │ │ ├── ContactsViewController.swift │ │ │ │ ├── ContactsViewController.xib │ │ │ │ ├── DescriptionViewController.swift │ │ │ │ ├── DescriptionViewController.xib │ │ │ │ └── ExampleNavigationViewController.swift │ │ │ ├── ExampleViewController/ │ │ │ │ └── ExampleViewController.swift │ │ │ └── NibExampleView/ │ │ │ ├── NibExampleView.swift │ │ │ └── NibExampleView.xib │ │ ├── SwiftEntryKit.h │ │ └── Utils/ │ │ ├── CGRect+Utils.swift │ │ ├── Font.swift │ │ ├── Object+ClassName.swift │ │ ├── UIColor+Utils.swift │ │ ├── UIScreen+Utils.swift │ │ └── UIView+Nib.swift │ ├── SwiftEntryKit.xcodeproj/ │ │ ├── project.pbxproj │ │ ├── project.xcworkspace/ │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata/ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata/ │ │ └── xcschemes/ │ │ ├── SwiftEntryKit.xcscheme │ │ └── SwiftEntryKitDemo.xcscheme │ ├── SwiftEntryKit.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings │ └── Tests/ │ ├── AttributesCreationTest.swift │ └── Info.plist ├── LICENSE ├── PULL_REQUEST_TEMPLATE.md ├── Package.swift ├── README.md ├── Source/ │ ├── Extensions/ │ │ ├── QuickLayout/ │ │ │ ├── QLCompatibility.swift │ │ │ ├── QLUtils.swift │ │ │ ├── UIView+QLContentWrap.swift │ │ │ ├── UIView+QuickLayout.swift │ │ │ └── UIViewArray+QuickLayout.swift │ │ ├── UIApplication+EKAppearance.swift │ │ ├── UIColor+Utils.swift │ │ ├── UIEdgeInsets+Utils.swift │ │ ├── UIRectCorner+Short.swift │ │ ├── UIView+Shadow.swift │ │ └── UIView+Utils.swift │ ├── Infra/ │ │ ├── EKBackgroundView.swift │ │ ├── EKContentView.swift │ │ ├── EKEntryView.swift │ │ ├── EKRootViewController.swift │ │ ├── EKStyleView.swift │ │ ├── EKWindow.swift │ │ ├── EKWindowProvider.swift │ │ ├── EKWrapperView.swift │ │ └── EntryCachingHeuristic.swift │ ├── MessageViews/ │ │ ├── EKAlertMessageView.swift │ │ ├── EKFormMessageView.swift │ │ ├── EKMessageContentView.swift │ │ ├── EKNotificationMessageView.swift │ │ ├── EKPopUpMessageView.swift │ │ ├── EKRatingMessageView.swift │ │ ├── EKSimpleMessageView.swift │ │ ├── MessagesUtils/ │ │ │ ├── EKButtonBarView.swift │ │ │ ├── EKButtonView.swift │ │ │ ├── EKRatingSymbolView.swift │ │ │ ├── EKRatingSymbolsContainerView.swift │ │ │ ├── EKTextField.swift │ │ │ └── EntryAppearanceDescriptor.swift │ │ └── Notes/ │ │ ├── EKAccessoryNoteMessageView.swift │ │ ├── EKImageNoteMessageView.swift │ │ ├── EKNoteMessageView.swift │ │ ├── EKProcessingNoteMessageView.swift │ │ └── EKXStatusBarMessageView.swift │ ├── Model/ │ │ ├── EKAlertMessage.swift │ │ ├── EKColor.swift │ │ ├── EKNotificationMessage.swift │ │ ├── EKPopUpMessage.swift │ │ ├── EKProperty.swift │ │ ├── EKRatingMessage.swift │ │ ├── EKSimpleMessage.swift │ │ └── EntryAttributes/ │ │ ├── EKAttributes+Animation.swift │ │ ├── EKAttributes+BackgroundStyle.swift │ │ ├── EKAttributes+DisplayMode.swift │ │ ├── EKAttributes+Duration.swift │ │ ├── EKAttributes+FrameStyle.swift │ │ ├── EKAttributes+HapticFeedback.swift │ │ ├── EKAttributes+LifecycleActions.swift │ │ ├── EKAttributes+PopBehavior.swift │ │ ├── EKAttributes+Position.swift │ │ ├── EKAttributes+PositionConstraints.swift │ │ ├── EKAttributes+Precedence.swift │ │ ├── EKAttributes+Presets.swift │ │ ├── EKAttributes+Scroll.swift │ │ ├── EKAttributes+Shadow.swift │ │ ├── EKAttributes+StatusBar.swift │ │ ├── EKAttributes+UserInteraction.swift │ │ ├── EKAttributes+Validations.swift │ │ ├── EKAttributes+WindowLevel.swift │ │ └── EKAttributes.swift │ ├── SwiftEntryKit.swift │ └── Utils/ │ ├── GradientView.swift │ ├── HapticFeedbackGenerator.swift │ └── UIView+Responder.swift └── SwiftEntryKit.podspec ================================================ FILE CONTENTS ================================================ ================================================ FILE: .codecov.yml ================================================ coverage: status: project: off patch: off ignore: - cmake-debug-build/* - Example/* - Scripts/* - Documentaion/* - Tests/* - Pods/* - Applications/Xcode.app/* - vendor/* - Carthage/* - build/* - .build/* - .vagrant/* ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: Bug report about: Create a report to help us improve --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **iPhone (please complete the following information):** - Device: [e.g. iPhone6] - iOS Version: [e.g. iOS9.3] - Xcode Version [e.g. 9.3] - Dependency Manager Version [e.g. CocoaPods 1.5.2, Carthage 0.29.0] - SwiftEntryKit Release # [e.g. 0.2.0] **Additional context** Add any other context about the problem here. **Screenshots / Video Links** ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.md ================================================ --- name: Feature request about: Suggest an idea for this project --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. ================================================ FILE: .gitignore ================================================ # OS X .DS_Store # Xcode build/ *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata/ *.xccheckout profile *.moved-aside DerivedData *.hmap *.ipa # Bundler .bundle # Swift Package Manager # # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. # Packages/ .build/ # Carthage # # Add this line if you want to avoid checking in source code from Carthage dependencies. # Carthage/Checkouts Carthage/Build # SwiftPM .swiftpm/ Package.resolved ================================================ FILE: .gitmodules ================================================ ================================================ FILE: .travis.yml ================================================ language: objective-c osx_image: xcode12.5 cache: cocoapods podfile: Example/Podfile env: global: - WORKSPACE=Example/SwiftEntryKit.xcworkspace - SCHEME=SwiftEntryKitDemo # travis cache isn't kept between builds before_install: - rvm use system - sudo gem install xcpretty - sudo gem install cocoapods -v '1.11.2' - pod repo update script: - set -o pipefail - carthage update --use-xcframeworks - xcodebuild clean build test -workspace "$WORKSPACE" -scheme "$SCHEME" -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=13.6,name=iPhone 11' -configuration Debug | xcpretty - bash <(curl -s https://codecov.io/bash) -J 'SwiftEntryKit' ================================================ FILE: CHANGELOG.md ================================================ # Change Log Any notable changes to this project will be documented in this file. ## 2.0.0 - Embed QuickLayout's source files within SwiftEntryKit ## 1.2.7 ### Fixes - #324 - iOS 14.2 keyWindow is always EKWindow - #277 - EKContentView.panGestureRecognized(gr:) crash ## 1.2.6 ### Features https://github.com/huri000/SwiftEntryKit/pull/307 ### Fixes Setting key window correctly: See https://github.com/huri000/SwiftEntryKit/issues/308 and https://github.com/huri000/SwiftEntryKit/pull/309. ## 1.2.5 ### Accessibility - https://github.com/huri000/SwiftEntryKit/issues/222 - https://github.com/huri000/SwiftEntryKit/issues/294 ## 1.2.4 ### Fixes - Remove scene from window: https://github.com/huri000/SwiftEntryKit/pull/299 - Added size option for EKRatingSymbolsContainerView: https://github.com/huri000/SwiftEntryKit/pull/266 - Access the foreground active window using connectedScenes: https://github.com/huri000/SwiftEntryKit/pull/257 ### Chore - Fix CI: https://github.com/huri000/SwiftEntryKit/pull/300 ## 1.2.3 Fix #253 - force unwrap for `EKMessageContentView`'s `subtitleContent` when `nil` is provided. ## 1.2.1 Expose `EKWindow` publicly as `UIWindow`. Add a warning for misuse of `EKAttributes.PopBehavior`. ## 1.2.0 Adjustment for iOS projects are are using `SwiftUI` as their default setup in their `plist`. ## 1.1.4 Fixes: #231 (iPad + iOS13) entries background is not interactable. ## 1.1.3 Fix `SPM` release ## 1.1.2 Fix: `EKTextField` crashes once no `tintColor` is provided. ## 1.1.1 iOS 13 color fix ## 1.1.0 ### Support dark mode (breaking change) Fully support dark mode pre iOS 13. New requirments were introduced: - `UIColor` was replaced with `EKColor` to allow specifying colors for light and dark modes. - `UIBlurEffect.Style` was replacd with `EKAttributes.BackgroundStyle.BlurStyle` to allow specifying visual effects for light and dark modes. - `EKAttributes` contains a new attribute named `displayMode: DisplayMode`. `displayMode` has the default value `.inferred`, which means that the display mode will be inferred from the user interface style. If the running iOS version is lower than 13, the display mode will be inferred as light mode. - All the presets support the new display mode by allowing to specify `displayMode` for their `EKProperty` The list of `EKProperty` constructs that contain `displayMode`: - `ButtonContent` - button descriptor - `LabelStyle` - label style descriptor - `ImageContent` - image view descriptor - `TextFieldContent` - text field descriptor - `ButtonBarContent` - button bar descriptor ### Revamp coding style The project coding style was revamped to be more friendly and readable. ## 1.0.4 ### Issues: - #191 - customized components support accessibility. ## 1.0.2 ### Issues: - #187 - ButtonBarContent` initialized with multiple buttons received as either variadic parameter or array. ## 1.0.1 ### Bug Fixes: #### #171 [Issue #171](https://github.com/huri000/SwiftEntryKit/issues/171) - Unable to dismiss a ViewControllerEntry in Xcode 10.2 (work in Xcode 10.1). Diagnosis: Only on Xcode 10.2. Probably be a Swift compiler bug. Reproduced using Release configuration. The compiler mistreats `UserInteraction.isResponsive` thus it always returns `false` when used on `attributes.screenInteraction`. ## 1.0.0 Swift 5 / Xcode 10.2 compatible. ## 0.8.9 ### Features: #### #155 [Issue #155](https://github.com/huri000/SwiftEntryKit/issues/155) - Setting textfield cursor color for EKProperty.TextFieldContent. `TextFieldContent` receives `tintColor` from now on. #### #160 [Issue #160](https://github.com/huri000/SwiftEntryKit/issues/160) - Animation with sequence of images From now on developers are able to sequence-animate and transform-animate every image within the presets using one of the designated public initializers available for `EKProperty.ImageContent`. ## 0.8.8 ### Bug Fixes: #### #109 [Issue #109](https://github.com/huri000/SwiftEntryKit/issues/109) - StatusBar appareance when moving to another UIViewController. Added another tatus bar type - `.ignored`. Using this ignores the status bar when the entry enters/exits the screen. #### #143 [Issue #143](https://github.com/huri000/SwiftEntryKit/issues/143) - Orientation incorrect when set to .portraitUpsideDown on iPhone. Changed `isRotationEnabled` to `Rotation` structure. ```Swift /** Rotation related position constraints */ public struct Rotation { /** Attributes of supported interface orientations */ public enum SupportedInterfaceOrientation { /** Uses standard supported interface orientation (target specification in general settings) */ case standard /** Supports all orinetations */ case all } /** Autorotate the entry along with the device orientation */ public var isEnabled: Bool /** The screen autorotates with accordance to this option */ public var supportedInterfaceOrientations: SwiftEntryKit.EKAttributes.PositionConstraints.Rotation.SupportedInterfaceOrientation } ``` #### Button Bar Horizontal Distribution Threshold `EKProperty.ButtonBarContent` supports an upper horizontal threshold for its button distribution. `EKProperty.ButtonBarContent` has an `Int` property named `horizontalDistributionThreshold`. It must be positive. ## 0.8.7 ### Bug Fixes: [Issue #117](https://github.com/huri000/SwiftEntryKit/issues/117) - Round buttons in alert. ## 0.8.6 [Issue #121](https://github.com/huri000/SwiftEntryKit/issues/121) - Long title for alert buttons. ## 0.8.4 ### Bug Fixes: [Issue #131](https://github.com/huri000/SwiftEntryKit/issues/131) - `EKAttributes.PositionConstraints` initializer parameter isn't referenced in implementation. ## 0.8.3 ### Bug Fixes: [Issue #132](https://github.com/huri000/SwiftEntryKit/issues/132) - Background dimmed view is NOT animating. ## 0.8.2 ### Bug Fixes: [Issue #119](https://github.com/huri000/SwiftEntryKit/issues/119) - Entry tap gesture doesn't cancel touches inside the entry view. ## 0.8.1 Apply a necessary fix for Xcode 10 and older than 4.2 Swift version compatibility. ## 0.8.0 ### Enhancements Adjustments for Swift 4.2. Related Issue: [Swift 4.2 Support #108](https://github.com/huri000/SwiftEntryKit/issues/108) ## 0.7.2 ### Bug Fixes [numberOfLines property #111](https://github.com/huri000/SwiftEntryKit/issues/111) - Allow multiple lines in image notes. ## 0.7.1 ### Feature - Add a way to make a specific text field first responder in `EKFormMessageView` Related issue: [Best way to present keyboard #107](https://github.com/huri000/SwiftEntryKit/issues/107). The window must be a key window, so setting `presentInsideKeyWindow` to `true` is necessary to achieve that goal. Likewise: ```Swift SwiftEntryKit.display(entry: formMessageView, using: attributes, presentInsideKeyWindow: true) ``` It is recommended to set `lifecycleEvents.didAppear` to perform the keyboard showing action. For example: ```Swift attributes.lifecycleEvents.didAppear = { formMessageView.becomeFirstResponder(with: 0) } ``` ## 0.7.0 ### Feature - Queue of Entries `displayPriority` is no longer nested inside `EKAttributes`. It has been replaced by another construct called `precedence`. `precedence` defines the manner in which a new entry is treated in case there already is another displayed entry. - See [Issue #103](https://github.com/huri000/SwiftEntryKit/issues/103) for feature basic requirements. - Please review the README.md and the API documentation to gain additional information. #### Backward Compatibility Be aware that `0.7.0` breaks previous releases. In order to adjust previous usage to current behavior, just replace any instance of: ```Swift attributes.displayPriority = value ```` To the following: ```Swift attributes.precedence = .override(priority: value, dropEnqueuedEntries: false) ```` ## 0.6.1 ### Adjustments for Xcode 10. ## 0.6.0 ### Autorotation flag for entries - [pull-request](https://github.com/huri000/SwiftEntryKit/pull/80) ### Additional documentation in README.md. ## 0.5.9 ### Issue [#85](https://github.com/huri000/SwiftEntryKit/pull/86) Lifecycle event `willDisappear` does not get called on swipe and prompt removeal of entry. ## 0.5.8 ### Issues Resolved: #### Allow injecting content into text field in form entry preset [How to set the value (not placeholder) to textfield for Forms preset? #79](https://github.com/huri000/SwiftEntryKit/issues/79) To support text injection to `EKTextField`, some minor changes have been done: 1. `EKTextField`'s `text` property has a setter now. 2. `TextFieldContent`'s `output` has been changed to `textContent` and has a setter now. 3. `outputWrapper` - changed to `contentWrapper`. ## 0.5.7 ### Changes: Dismiss entries using `touchesEnded` instead of `touchesBegan`. ### Issues Fixed [Deployment target is 9.3, not 9.0 #78](https://github.com/huri000/SwiftEntryKit/issues/78) ## 0.5.6 ### Bug Fixes: [App freezes on iOS 9.3.2 when displaying an entry and there is one shown already #73](https://github.com/huri000/SwiftEntryKit/issues/73) ## 0.5.5 ### Bug Fix #### Status Bar Visibility Status bar visibility using a view controller based status bar appearance ### Improvements #### Entry Name Entry can have a name. That property can be optionally set. Also, `SwiftEntryKit` is added a new method: ```Swift public class func isCurrentlyDisplaying(entryNamed name: String? = default) -> Bool ```` It can be used to inquire if a certain entry is currently displayed. It might prove helpful to troubleshoot some issues using it, and it also a boilerplate for future developments. ## 0.5.4 ### Changes #### Status Bar Style Appearance SwiftEntryKit supports applications that defines status bar behaviour that is based on the presented view controller. The related [issue](https://github.com/huri000/SwiftEntryKit/issues/66). #### Key Window Setting the entry window is key is not the default behavior anymore. The API `public class func display(entry view: UIView, using attributes: EKAttributes, presentInsideKeyWindow: Bool = default, rollbackWindow: RollbackWindow = default)` `public class func display(entry viewController: UIViewController, using attributes: EKAttributes, presentInsideKeyWindow: Bool = default, rollbackWindow: RollbackWindow = default)` #### Visual Effect View Mask (Entry Background) Performed only when really needed ## 0.5.3 ### Feature: - [EKNotificationMessage has broken layout #64](https://github.com/huri000/SwiftEntryKit/issues/64) - Add margins to `EKNotificationMessage`. ### Bug Fixes: - Animations of alert and EKRatingMessageView. - Constraints conflict in EKRatingMessageView ## 0.5.2 ### Bug Fixes: - [iPhone X issue with presenting Alert right after previous was closed #62](https://github.com/huri000/SwiftEntryKit/issues/62) ## 0.5.1 Rollback window bug fix ## 0.5.0 ### Features Handled the issue *[Exclude keyWindow occupancy #56](https://github.com/huri000/SwiftEntryKit/issues/56)* by adding an additional parameter `rollbackWindow` to `SwiftEntryKit.display` methods. The revised interface is as follows: `public class func display(entry view: UIView, using attributes: EKAttributes, rollbackWindow: UIWindow = default)` `public class func display(entry viewController: UIViewController, using attributes: EKAttributes, rollbackWindow: UIWindow = default)` After the entry has been dismissed, SwiftEntryKit rolls back to the given window value. By default it is the application key window. ## 0.4.3 ### Bug Fixes - [Shadow won't work with round corners #55](https://github.com/huri000/SwiftEntryKit/issues/55) - Small fix related to `EKRatingMessageView` initial presentation. ## 0.4.2 ### Features [Feature request: Callback when presented and dismissed #50](https://github.com/huri000/SwiftEntryKit/issues/50) - Added a `LifecycleEvents` construct to `EKAttributes`. It contains the following optional callbacks: willAppear, didAppear, willDisappear, didDisappear for the currently displayed entry. - Added an optional completion handler for `SwiftEntryKit`'s `dismiss` method. ## 0.4.1 ### Issues Handled [Keep Background Unchanged when 2 Consecutive Entry Screen Backgrounds Match #46](https://github.com/huri000/SwiftEntryKit/issues/46) ## 0.4.0 ### Features #### [Use UIViewController as an entry #40](https://github.com/huri000/SwiftEntryKit/issues/40) Developers can now use a customized view controller as an entry. A sample has been added to the custom presets section in example project. ## 0.3.3 ### Issues Handled: * [Multiple button support? #19](https://github.com/huri000/SwiftEntryKit/issues/19) ### Changes: EKButtonBarView exposes `func expand()`, it ## 0.3.2 ### Bug Fixes * [EKAlertMessageView fail to layout all of the ButtonContents inside EKAlertMessage #41](https://github.com/huri000/SwiftEntryKit/issues/41) ## 0.3.1 ### Features * Alert & Notification Entries are image-less as well. The image parameter is optional, in case it has a `nil` value, the entry is generated without it. * Added `numberOfLines` to `EKProperty.LabelStyle`. ## 0.3.0 ### Bug Fixes #### Typos `EKAttributes.PositionConstraints.SafeArea.isOverriden` to `EKAttributes.PositionConstraints.SafeArea.isOverridden` `EKAttributes.PositionConstraints.SafeArea.overriden` to `EKAttributes.PositionConstraints.SafeArea.overridden` ### Features #### Added an entry transform feature (ALPHA FEATURE) Developers are able to transform an entry to another entry using the same attributes. ```Swift let view = UIView() // Customize SwiftEntryKit.transform(to: view) ``` #### Rating Popup Added a rating popup (See custom presets). See also: `EKRatingMessage` and `EKRatingMessageView` ### Other Changes: #### Image-less popups `EKPopUpMessage` can be image-less by simply setting `themeImage` to `nil` (or leaving its default value as is). ```Swift /** Popup theme image */ public struct ThemeImage { /** Position of the theme image */ public enum Position { case topToTop(offset: CGFloat) case centerToTop(offset: CGFloat) } /** The content of the image */ public var image: EKProperty.ImageContent /** The psotion of the image */ public var position: Position } public init(themeImage: ThemeImage? = default, title: EKProperty.LabelContent, description: EKProperty.LabelContent, button: EKProperty.ButtonContent, action: @escaping EKPopUpMessageAction) ``` ## 0.2.4 ### Features ### Explicit direction of translation animation `EKAttributes.Animation.Translate` is added an `anchorPosition: AnchorPosition` property: That means that an entry can translate from the top and exit from the bottom, and vice versa. ```Swift /** Describes the anchor position */ public enum AnchorPosition { /** Top position - the entry shows from top or exits towards the top */ case top /** Bottom position - the entry shows from bottom or exits towards the bottom */ case bottom /** Automatic position - the entry shows and exits according to EKAttributes.Position value. If the position of the entry is top, bottom, the entry's translation anchor is top, bottom - respectively.*/ case automatic } ``` `anchorPosition` is determined the direction of the translation animation and is `.automatic` by default, meaning that the anchor is set automatically according to its position - if the position (`EKAttributes.Position`) is `.top` / `bottom`, then the entry enters and exit from the top / bottom edge. ## 0.2.3 ### Features #### Status bar revised * Instead of assigning the `UIStatusBarStyle`, use `EKAttributes.StatusBar` to define the status bar. * The benefit is an absolute control over the status bar appearance. * New statuses: - `.hidden` - Hides the status bar. - `inferred` - Infer the style from the previous style. ## 0.2.2 ### Features Added Carthage Support ## 0.2.1 ### Bug Fix The text of the text-fields is accessible after tapping the button using `EKFormMessageView`. Use `output` property inside `EKProperty.TextFieldContent`. ## 0.2.0 ### Features #### Keyboard support Keyboard support can be enabled using `EKAttributes.PositionConstraints.KeyboardRelation` enum. ```Swift // 10pt bottom offset from keyboard and at least 5pts from the screen edge while the keyboard is displayed. attributes.positionConstraints.keyboardRelation = .bind(offset: .init(bottom: 10, screenEdgeResistance: 5)) ``` #### Is Displaying Inquire if SwiftEntryKit is currently displaying an entry: ```Swift if SwiftEntryKit.isCurrentlyDisplaying { /* Do Something */ } ``` #### Naming `EKProperty.LabelStyle` replaced `EKProperty.Label`. ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. ## Our Standards Examples of behavior that contributes to creating a positive environment include: * Using welcoming and inclusive language * Being respectful of differing viewpoints and experiences * Gracefully accepting constructive criticism * Focusing on what is best for the community * Showing empathy towards other community members Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic address, without explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. ## Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at huri000@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing When contributing to this repository, please first discuss the change you wish to make via issue before making a change. Please note we have a code of conduct, please follow it in all your interactions with the project. ## Pull Request Process 1. Ensure any install or build dependencies are removed before the end of the layer when doing a build. 2. Ensure that no newly created warnings where generated by SwiftLint in the process of building the project. 3. Test that your code compiles using all dependency managers that are integrated into the project (for example: CocoaPods / Carthage / Swift Package Manager). 4. In case of a newly created entry preset, please update the example project preset screen by adding an example. 5. Update the README.md and the CHANGELOG.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters. 6. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). 7. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you. ================================================ FILE: CREDITS.md ================================================ # CREDITS ## Attributions - Example Project Icons Please be aware that any use of the icons included in the project requires attribution.
Icons made by Pause08 from www.flaticon.com is licensed by CC 3.0 BY
Icons made by Smashicons from www.flaticon.com is licensed by CC 3.0 BY
Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY
Icons made by Iconnice from www.flaticon.com is licensed by CC 3.0 BY
================================================ FILE: Example/Podfile ================================================ target 'SwiftEntryKitDemo' do platform :ios, '9.0' use_frameworks! pod 'SwiftEntryKit', :path => '../' end target 'SwiftEntryKitTests' do platform :ios, '9.0' use_frameworks! pod 'SwiftEntryKit', :path => '../' end ================================================ FILE: Example/Pods/Local Podspecs/SwiftEntryKit.podspec.json ================================================ { "name": "SwiftEntryKit", "version": "2.0.0", "summary": "A simple banner and pop-up displayer for iOS. Written in Swift.", "platforms": { "ios": "9.0" }, "swift_versions": "5.0", "requires_arc": true, "description": "SwiftEntryKit is a banner presenter library for iOS. It can be used to easily display pop-ups and notification-like views within your iOS apps. SwiftEntryKit is highly customizable but also offers a bunch of beautiful presets that can be themed with your app fonts and colors.", "homepage": "https://github.com/huri000/SwiftEntryKit", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "Daniel Huri": "huri000@gmail.com" }, "source": { "git": "https://github.com/huri000/SwiftEntryKit.git", "tag": "2.0.0" }, "source_files": "Source/**/*", "frameworks": "UIKit", "swift_version": "5.0" } ================================================ FILE: Example/Pods/Pods.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 0359FD65EC137FD6398B15FFA06FBD4E /* EKStyleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 355EC14B2CF1D527FABE1F54F422445D /* EKStyleView.swift */; }; 0443B823D09728A6A4AAEA741ED0EC1A /* EKAttributes+StatusBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DD21DA534C8E34356D26932C0B72F1B /* EKAttributes+StatusBar.swift */; }; 055EFFC858E25B12CE2921EC8C7233EB /* EKAttributes+Validations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 780B2C0C027974C5B034C4FB8559B10F /* EKAttributes+Validations.swift */; }; 05D9D1E4C707A5F023A1F94ACF486AC2 /* EKPopUpMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3BEAB4B42918B40DE6441C8C1540552 /* EKPopUpMessageView.swift */; }; 068E825D6FE9520EBE3FA985C5AE4DA0 /* Pods-SwiftEntryKitDemo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = D0598CC5B54F64EFF897D87A397E403E /* Pods-SwiftEntryKitDemo-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0A68662146E1586B4456FAB071D11DE2 /* QLCompatibility.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC25F9415CB019F995E220EF13ABAEE7 /* QLCompatibility.swift */; }; 0D2B4E91DB02BDA04E6BDF6DBA4A546E /* EKAttributes+UserInteraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10BAD6713BF41F1F4581FF4905CF4BE8 /* EKAttributes+UserInteraction.swift */; }; 0D6FB08663ED820FCE5FBE981E3C6A5A /* QLUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = B38771A605FA38F7F0D803B812F22552 /* QLUtils.swift */; }; 11E4007894DF1F2A3F475FBB8229F3A4 /* EKImageNoteMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82AD8AAF58BF64460BD8C07EC4DF6E35 /* EKImageNoteMessageView.swift */; }; 14DE35A5C2A9CDA68974BB63E54E980E /* Pods-SwiftEntryKitTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 78239DB78DD3345BC32A5B876DEA9726 /* Pods-SwiftEntryKitTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18734EC046ABAA79202629307DC9F249 /* UIView+Responder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E8374EF3E6B232F142B5987EA67FCA /* UIView+Responder.swift */; }; 2192DBD932E0F15BB67ACDC05443661A /* EKAccessoryNoteMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF205874ABD02019016E8D6F4823DF66 /* EKAccessoryNoteMessageView.swift */; }; 253D69D1B151BCD20DBBC6B6439C2033 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAB6F611E86A4758835A715E4B4184F6 /* Foundation.framework */; }; 27AB779347FB4F77C5609ECC8E822D47 /* EKAlertMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EEBC3A780D3C8A2EB25437BA8E46F5F /* EKAlertMessage.swift */; }; 28E32E39AD8DAAF8D769DB804E262758 /* EKAttributes+PositionConstraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2EBFF4F329202D38AE92B0E840A811B2 /* EKAttributes+PositionConstraints.swift */; }; 29BEEBBF37CF019B510DBFB73345AD85 /* UIApplication+EKAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F511D095B770B82902F13277AAF1AA6 /* UIApplication+EKAppearance.swift */; }; 302E32F7BE65307E4A589AFF78B43BB5 /* EKRatingSymbolView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB0F9C7644E67B3E509B16CA9E1AE2E6 /* EKRatingSymbolView.swift */; }; 348C406EE636A76C1FD17BB1D6524F76 /* UIColor+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65D30BCA570C5B5C8D4DA7E25F6254FA /* UIColor+Utils.swift */; }; 34D13E6FCD9A83500030FA87732A91E0 /* SwiftEntryKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DF7CDDFB196B307A3EA5A9EDF93C2B1 /* SwiftEntryKit.swift */; }; 36882C85632251103A44F147853939AA /* EKNotificationMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1DAD42E5C17E9F7FB324D45E3F7EDA42 /* EKNotificationMessage.swift */; }; 462DE7325DE86EFA2F3EC52CEBD9C1E5 /* EKBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FDEAA72AA62231A344DBE12315E9605 /* EKBackgroundView.swift */; }; 4BA5FF5F702BD658E11F0DFFCBD8F48D /* EKButtonBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E075598D423EEA3ACC102DB53CDB8E8C /* EKButtonBarView.swift */; }; 4E375F46869D4ACA0012FD19C628D27C /* EntryAppearanceDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED55558861058207FDC79BE639B3AB22 /* EntryAppearanceDescriptor.swift */; }; 559047DE0FD0172BD098F42C46EC99BF /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E55224D7193D977B96C4236E1F74164C /* GradientView.swift */; }; 55D8E7C94A4249CAD0CE60C5442C1647 /* UIView+Shadow.swift in Sources */ = {isa = PBXBuildFile; fileRef = C04EAE264EC7EFF0DA7C878F93D038E0 /* UIView+Shadow.swift */; }; 56E6DC85F5E9118377A587FB086E147B /* EKRootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDE85EC51CF37128659CEB00BB891354 /* EKRootViewController.swift */; }; 595221C70FBCDB1D0B2A3A937F1920DF /* UIView+QLContentWrap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45332FF34005CC3F284120BEEEA29FF2 /* UIView+QLContentWrap.swift */; }; 5A88DF76317A991C11AEB8F1FE918FBB /* UIViewArray+QuickLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CCA1057080C500AF93E7231B4A6CA52 /* UIViewArray+QuickLayout.swift */; }; 5C258564AFF20D612A3A339423F45584 /* Pods-SwiftEntryKitTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F352296AFDF8DE73AE8F78DB5150C5A7 /* Pods-SwiftEntryKitTests-dummy.m */; }; 60FC20D83228B2C4E383524E56F95CE2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D245E0514AAC1A2B9A6D5EA2F383E90F /* UIKit.framework */; }; 6ED875168F056413ECC87C941731E714 /* EKPopUpMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D431D0B0894B4B4EE88E680419E14CD /* EKPopUpMessage.swift */; }; 6FC9FC572974C469202D4ED5CD215B87 /* UIRectCorner+Short.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC54805D957AA8CD357A55ECD90EA0EF /* UIRectCorner+Short.swift */; }; 7108EDEF3D6F20A74A001A6095D5CEAF /* EKAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFC59CB5292F0EFB0006711614DE389E /* EKAttributes.swift */; }; 714A8C1AC51A1123F085369F696D98E0 /* EKAttributes+LifecycleActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4727C79CD0DD7F6239E77E81AA1C6592 /* EKAttributes+LifecycleActions.swift */; }; 734E4D1053D35D868CD9E2089C951A30 /* EKAttributes+FrameStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED0B495FDB5638F0BC7EFCCEF42EA31A /* EKAttributes+FrameStyle.swift */; }; 7BBD4032CA2769A7B3D5F79E95264689 /* EKRatingMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0CEBC832DB314A2208D054822F4DD85 /* EKRatingMessageView.swift */; }; 83D05E692A0CE612F52BC0B18745B370 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAB6F611E86A4758835A715E4B4184F6 /* Foundation.framework */; }; 85C9E605B0FDDDFAE52C4C098400BAB6 /* HapticFeedbackGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D09C2BD9BF43CB402ECC6239DDE80B1 /* HapticFeedbackGenerator.swift */; }; 87DDE964048660CDA29BE9EFBB20A8A7 /* EKRatingMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CC6592DF43B43BA46FC2CCA00C4F96F /* EKRatingMessage.swift */; }; 89A502FDBC5C0EF63831DD6A8537610A /* EntryCachingHeuristic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C977172E6A26597EAB05BDB41B2C104 /* EntryCachingHeuristic.swift */; }; 8A0A768C3ECBEEA388452EC31BEF6500 /* EKRatingSymbolsContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D47B05649A80A383D3EF8B4D372370C5 /* EKRatingSymbolsContainerView.swift */; }; 8B9C14384B947160FDC8C9082DFAC126 /* EKAttributes+HapticFeedback.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A7286E41D0650723E149E86FD1C04AF /* EKAttributes+HapticFeedback.swift */; }; 8BA44EB1BBDD85BB4527F5CA3A5776AD /* EKButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9B8F9B4651B86B74DCA4B914A4A1BE7 /* EKButtonView.swift */; }; 8D80DF7CFA1BE70D46E90462AE24C472 /* EKNotificationMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2239582C73BFB3D83DFDF57021299158 /* EKNotificationMessageView.swift */; }; 8E8D18BA7E2779FF915DD8D000E651F8 /* SwiftEntryKit-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E176C9E90FF69941C0F00D00FB87AF9 /* SwiftEntryKit-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 90F3D408915E74432EA7EEA31FA356E8 /* EKSimpleMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A2BF4EDF85A16F4331293366AA50FF0E /* EKSimpleMessageView.swift */; }; 92C9D280AC667D5F46DF47A9ECFD6CF8 /* EKAttributes+PopBehavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3ACA36A2CDB4DFCE6EF6D0E9F6CC937 /* EKAttributes+PopBehavior.swift */; }; 952D70DA0B30FC34603159D7CCC7B3CE /* EKAttributes+Position.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5D859AAFC1AF2603E93156384B31D9B /* EKAttributes+Position.swift */; }; 97AD66EB56B38157D92EEDBAEAECDBD0 /* EKWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32E1F387F3E3AE4CA929AB42EC170811 /* EKWindow.swift */; }; 98C43F17EB6BE6D18F9DA8EC7B2E04B0 /* EKEntryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 90D533185CEAE773480AB26167E64EF9 /* EKEntryView.swift */; }; A2413744FA4B848AA797FB365F69BFDC /* EKWrapperView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A9F62C7BFA289C715569ABCD8EC35AD /* EKWrapperView.swift */; }; A2BA4820371B5FEC4F05DAD50C6ABF6E /* EKAttributes+BackgroundStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B2EE663224F44CF351C3AF280D17945 /* EKAttributes+BackgroundStyle.swift */; }; A7011D8655938627E740F0C3CF8FA900 /* EKSimpleMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E7644AC1CA095C84B01E5BD5D080227 /* EKSimpleMessage.swift */; }; AFA1DC023B3E88B337F09BA31B2D648A /* EKWindowProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FD9F579DFDB3C3CE8BE7E16084849EAB /* EKWindowProvider.swift */; }; B0598238BC5A442270D9461A0E5A1D9D /* UIEdgeInsets+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 960DADF2CCCBDE8608C8DEDCA0B252EB /* UIEdgeInsets+Utils.swift */; }; B3AE89438313BC2BACC4D0DE03FC3DEE /* EKXStatusBarMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C31DB1E40DE39086DB4ADCFF6545A24E /* EKXStatusBarMessageView.swift */; }; BA2DA0C04BFBAEE25E534E24CFFF395A /* EKMessageContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A71EF7308CBBA90894BE1279E935279 /* EKMessageContentView.swift */; }; BC62184178B9BEB545A13961210A05DC /* EKAttributes+DisplayMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7A1D227F016C19203F287375463699A /* EKAttributes+DisplayMode.swift */; }; C60B01D9CD508925C0CE73F3A494AC50 /* Pods-SwiftEntryKitDemo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9593CFAEB0028E56754D269C799C66B0 /* Pods-SwiftEntryKitDemo-dummy.m */; }; C82054AF37DEB07E384A1525C3A90447 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EAB6F611E86A4758835A715E4B4184F6 /* Foundation.framework */; }; C8887B7C8B331F253936A033C82E7035 /* EKContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F643E9B2DC1F62BA4538C437A5BCCDFA /* EKContentView.swift */; }; C98CD0D413A41E34BCE66218A759A400 /* EKAlertMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDF1A0D1C37229695C259A378F96D0FC /* EKAlertMessageView.swift */; }; CB1EEDEDA94C738FAF66F1C885564292 /* EKAttributes+Animation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C0CFAEC4DF15650ED42C91AE124D09 /* EKAttributes+Animation.swift */; }; CF185599178E4DC6478502FAD3A58872 /* UIView+QuickLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D26C2C8F8C400F9BF58E6A104D4E446 /* UIView+QuickLayout.swift */; }; CF3C9AC716E31797CC2C3C81DECE4C97 /* UIView+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = E492E141CA1F65D689237579F214854C /* UIView+Utils.swift */; }; D51E20F00EB6CD7E0D7FF49D79E2F60C /* EKAttributes+Presets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 613497986B31AA146AC04D2FF125081D /* EKAttributes+Presets.swift */; }; D6AE33459B57384C2599C6C99F527BEB /* EKNoteMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D88A10C90E97BC0A8854366B352F3EE /* EKNoteMessageView.swift */; }; D7662DCD3ADE9F482B12D960A4517476 /* EKProcessingNoteMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79629988A737E957C9B6F4684B504368 /* EKProcessingNoteMessageView.swift */; }; DA0EC170AAC94082A6B5F33CF4DD391F /* EKAttributes+Shadow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BFE027CC4289C30AD3E768FCE5CEF0B /* EKAttributes+Shadow.swift */; }; DDA8C21B07CEAE9204BF7F435976CB9E /* EKFormMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3559532220E798158C20592737A02E39 /* EKFormMessageView.swift */; }; ED772CA4DAF478D6E0DF050C63F305F1 /* EKAttributes+Scroll.swift in Sources */ = {isa = PBXBuildFile; fileRef = D35FE84B7A5F378A9023B4D695D4B996 /* EKAttributes+Scroll.swift */; }; EF4520313EBDD8C00BD5ACED2BACA34F /* EKTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE3F0BD1D54DD958EBE89944FD4CEE99 /* EKTextField.swift */; }; F515A3A2C771F0BC0F95AA1BA4EEFFC1 /* EKAttributes+Duration.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6F169F2385B89ED18D6810657CDD3F6 /* EKAttributes+Duration.swift */; }; F59A2355405C20F6DBA556CADC3C8C13 /* SwiftEntryKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E20C7F7CA20B9D50699AFD4AD5BCE358 /* SwiftEntryKit-dummy.m */; }; F87B701EBA816F684B11F39CD1E39F47 /* EKAttributes+WindowLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7684F90C2E79E7591F8377058A81ADD0 /* EKAttributes+WindowLevel.swift */; }; F8D5E276EAFEE938C91DDCECB67EF87C /* EKAttributes+Precedence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11FCF376F5FE3AE52C3EE4D32A474534 /* EKAttributes+Precedence.swift */; }; F90BC550E43319147538AF88C987758E /* EKColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40327AF59BA584E6F6619BFCC3BAD434 /* EKColor.swift */; }; FC942184FF87AFA768AE2CA8218F1EC2 /* EKProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F7A459E0E2A5540FEA8FDFEBD5766C1 /* EKProperty.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 963D784716C5E411F3ADD005A0BAC41B /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; remoteGlobalIDString = FEA6FF0588A91CCD972EDCD698B85647; remoteInfo = SwiftEntryKit; }; C83659509B9A824D8B8B5FEE03EC4F73 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; remoteGlobalIDString = FEA6FF0588A91CCD972EDCD698B85647; remoteInfo = SwiftEntryKit; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ 0A1BEE5878A0598527D70E669A9DAF7E /* SwiftEntryKit.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = SwiftEntryKit.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 0C6D2F6A9763A4610B812B9109ACA447 /* Pods-SwiftEntryKitDemo.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwiftEntryKitDemo.modulemap"; sourceTree = ""; }; 0DC40BB88676D9A88905C0581BC836B6 /* SwiftEntryKit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftEntryKit.release.xcconfig; sourceTree = ""; }; 10BAD6713BF41F1F4581FF4905CF4BE8 /* EKAttributes+UserInteraction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+UserInteraction.swift"; sourceTree = ""; }; 11FCF376F5FE3AE52C3EE4D32A474534 /* EKAttributes+Precedence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Precedence.swift"; sourceTree = ""; }; 1A7286E41D0650723E149E86FD1C04AF /* EKAttributes+HapticFeedback.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+HapticFeedback.swift"; sourceTree = ""; }; 1DAD42E5C17E9F7FB324D45E3F7EDA42 /* EKNotificationMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKNotificationMessage.swift; sourceTree = ""; }; 1DD21DA534C8E34356D26932C0B72F1B /* EKAttributes+StatusBar.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+StatusBar.swift"; sourceTree = ""; }; 217D74CF28D2726D347E9E85D22057DA /* Pods-SwiftEntryKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftEntryKitTests.debug.xcconfig"; sourceTree = ""; }; 2239582C73BFB3D83DFDF57021299158 /* EKNotificationMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKNotificationMessageView.swift; sourceTree = ""; }; 2909A9134D532B091BC4BB03EAF83E0D /* Pods-SwiftEntryKitDemo-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftEntryKitDemo-Info.plist"; sourceTree = ""; }; 2E176C9E90FF69941C0F00D00FB87AF9 /* SwiftEntryKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftEntryKit-umbrella.h"; sourceTree = ""; }; 2EBFF4F329202D38AE92B0E840A811B2 /* EKAttributes+PositionConstraints.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+PositionConstraints.swift"; sourceTree = ""; }; 32E1F387F3E3AE4CA929AB42EC170811 /* EKWindow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKWindow.swift; sourceTree = ""; }; 3559532220E798158C20592737A02E39 /* EKFormMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKFormMessageView.swift; sourceTree = ""; }; 355EC14B2CF1D527FABE1F54F422445D /* EKStyleView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKStyleView.swift; sourceTree = ""; }; 3720AACA3DCA014803908A2E0592E7C5 /* Pods-SwiftEntryKitDemo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftEntryKitDemo-acknowledgements.markdown"; sourceTree = ""; }; 3A9F62C7BFA289C715569ABCD8EC35AD /* EKWrapperView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKWrapperView.swift; sourceTree = ""; }; 3FDEAA72AA62231A344DBE12315E9605 /* EKBackgroundView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKBackgroundView.swift; sourceTree = ""; }; 40327AF59BA584E6F6619BFCC3BAD434 /* EKColor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKColor.swift; sourceTree = ""; }; 45332FF34005CC3F284120BEEEA29FF2 /* UIView+QLContentWrap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+QLContentWrap.swift"; sourceTree = ""; }; 4727C79CD0DD7F6239E77E81AA1C6592 /* EKAttributes+LifecycleActions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+LifecycleActions.swift"; sourceTree = ""; }; 498F2A87868A376E6C8B01A8EFF7D2AC /* SwiftEntryKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftEntryKit-prefix.pch"; sourceTree = ""; }; 4B2EE663224F44CF351C3AF280D17945 /* EKAttributes+BackgroundStyle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+BackgroundStyle.swift"; sourceTree = ""; }; 4DF7CDDFB196B307A3EA5A9EDF93C2B1 /* SwiftEntryKit.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftEntryKit.swift; path = Source/SwiftEntryKit.swift; sourceTree = ""; }; 5C977172E6A26597EAB05BDB41B2C104 /* EntryCachingHeuristic.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EntryCachingHeuristic.swift; sourceTree = ""; }; 5CC6592DF43B43BA46FC2CCA00C4F96F /* EKRatingMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKRatingMessage.swift; sourceTree = ""; }; 5D26C2C8F8C400F9BF58E6A104D4E446 /* UIView+QuickLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+QuickLayout.swift"; sourceTree = ""; }; 5D431D0B0894B4B4EE88E680419E14CD /* EKPopUpMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKPopUpMessage.swift; sourceTree = ""; }; 5E7D71B2861945983BDCF0A559AF1FC6 /* SwiftEntryKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftEntryKit.debug.xcconfig; sourceTree = ""; }; 5F7A459E0E2A5540FEA8FDFEBD5766C1 /* EKProperty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKProperty.swift; sourceTree = ""; }; 613497986B31AA146AC04D2FF125081D /* EKAttributes+Presets.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Presets.swift"; sourceTree = ""; }; 62F1B1D97C760AD62E5A49983D4BDFA9 /* Pods-SwiftEntryKitTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftEntryKitTests-frameworks.sh"; sourceTree = ""; }; 659C18D29D4B9D963A2AD7360AAACC30 /* Pods-SwiftEntryKitDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftEntryKitDemo.release.xcconfig"; sourceTree = ""; }; 65D30BCA570C5B5C8D4DA7E25F6254FA /* UIColor+Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+Utils.swift"; sourceTree = ""; }; 67852BE5281D7C3C9D16CF8CB24FAEE4 /* SwiftEntryKit-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "SwiftEntryKit-Info.plist"; sourceTree = ""; }; 6D09C2BD9BF43CB402ECC6239DDE80B1 /* HapticFeedbackGenerator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HapticFeedbackGenerator.swift; sourceTree = ""; }; 7684F90C2E79E7591F8377058A81ADD0 /* EKAttributes+WindowLevel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+WindowLevel.swift"; sourceTree = ""; }; 780B2C0C027974C5B034C4FB8559B10F /* EKAttributes+Validations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Validations.swift"; sourceTree = ""; }; 78239DB78DD3345BC32A5B876DEA9726 /* Pods-SwiftEntryKitTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftEntryKitTests-umbrella.h"; sourceTree = ""; }; 79629988A737E957C9B6F4684B504368 /* EKProcessingNoteMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKProcessingNoteMessageView.swift; sourceTree = ""; }; 7E7644AC1CA095C84B01E5BD5D080227 /* EKSimpleMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKSimpleMessage.swift; sourceTree = ""; }; 7F6008542D45CF6DA2CF5F20B1B389D9 /* Pods-SwiftEntryKitTests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftEntryKitTests-Info.plist"; sourceTree = ""; }; 825DCCAAF219130678137286F5E77C47 /* Pods-SwiftEntryKitDemo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftEntryKitDemo-frameworks.sh"; sourceTree = ""; }; 82AD8AAF58BF64460BD8C07EC4DF6E35 /* EKImageNoteMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKImageNoteMessageView.swift; sourceTree = ""; }; 8BFE027CC4289C30AD3E768FCE5CEF0B /* EKAttributes+Shadow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Shadow.swift"; sourceTree = ""; }; 8CCA1057080C500AF93E7231B4A6CA52 /* UIViewArray+QuickLayout.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIViewArray+QuickLayout.swift"; sourceTree = ""; }; 8D88A10C90E97BC0A8854366B352F3EE /* EKNoteMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKNoteMessageView.swift; sourceTree = ""; }; 90D533185CEAE773480AB26167E64EF9 /* EKEntryView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKEntryView.swift; sourceTree = ""; }; 92A9FFF66919FF57D45F01FF9060B9DD /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; 9593CFAEB0028E56754D269C799C66B0 /* Pods-SwiftEntryKitDemo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwiftEntryKitDemo-dummy.m"; sourceTree = ""; }; 960DADF2CCCBDE8608C8DEDCA0B252EB /* UIEdgeInsets+Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIEdgeInsets+Utils.swift"; sourceTree = ""; }; 9A71EF7308CBBA90894BE1279E935279 /* EKMessageContentView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKMessageContentView.swift; sourceTree = ""; }; 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 9EEBC3A780D3C8A2EB25437BA8E46F5F /* EKAlertMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKAlertMessage.swift; sourceTree = ""; }; 9F511D095B770B82902F13277AAF1AA6 /* UIApplication+EKAppearance.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIApplication+EKAppearance.swift"; sourceTree = ""; }; A04A38B59673DEC84C7286AC1A5DD82E /* Pods-SwiftEntryKitTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftEntryKitTests-acknowledgements.plist"; sourceTree = ""; }; A14EAEBB9BEC7C4A28F157DA31131232 /* Pods-SwiftEntryKitDemo */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-SwiftEntryKitDemo"; path = Pods_SwiftEntryKitDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A2BF4EDF85A16F4331293366AA50FF0E /* EKSimpleMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKSimpleMessageView.swift; sourceTree = ""; }; A7A1D227F016C19203F287375463699A /* EKAttributes+DisplayMode.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+DisplayMode.swift"; sourceTree = ""; }; AC54805D957AA8CD357A55ECD90EA0EF /* UIRectCorner+Short.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIRectCorner+Short.swift"; sourceTree = ""; }; B1E8374EF3E6B232F142B5987EA67FCA /* UIView+Responder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+Responder.swift"; sourceTree = ""; }; B38771A605FA38F7F0D803B812F22552 /* QLUtils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = QLUtils.swift; sourceTree = ""; }; B3ACA36A2CDB4DFCE6EF6D0E9F6CC937 /* EKAttributes+PopBehavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+PopBehavior.swift"; sourceTree = ""; }; BC25F9415CB019F995E220EF13ABAEE7 /* QLCompatibility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = QLCompatibility.swift; sourceTree = ""; }; BFD8570D08FFA26DC70A6677B52879BE /* Pods-SwiftEntryKitDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftEntryKitDemo.debug.xcconfig"; sourceTree = ""; }; C04EAE264EC7EFF0DA7C878F93D038E0 /* UIView+Shadow.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+Shadow.swift"; sourceTree = ""; }; C31DB1E40DE39086DB4ADCFF6545A24E /* EKXStatusBarMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKXStatusBarMessageView.swift; sourceTree = ""; }; C563C9CF87F0274D774DB1D0BB8756F1 /* Pods-SwiftEntryKitDemo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftEntryKitDemo-acknowledgements.plist"; sourceTree = ""; }; CDE85EC51CF37128659CEB00BB891354 /* EKRootViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKRootViewController.swift; sourceTree = ""; }; CDF1A0D1C37229695C259A378F96D0FC /* EKAlertMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKAlertMessageView.swift; sourceTree = ""; }; CE2F7FD8E3DF8E80B033436940AFED3C /* Pods-SwiftEntryKitTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwiftEntryKitTests.modulemap"; sourceTree = ""; }; CF205874ABD02019016E8D6F4823DF66 /* EKAccessoryNoteMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKAccessoryNoteMessageView.swift; sourceTree = ""; }; CFC59CB5292F0EFB0006711614DE389E /* EKAttributes.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKAttributes.swift; sourceTree = ""; }; D0598CC5B54F64EFF897D87A397E403E /* Pods-SwiftEntryKitDemo-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftEntryKitDemo-umbrella.h"; sourceTree = ""; }; D0CEBC832DB314A2208D054822F4DD85 /* EKRatingMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKRatingMessageView.swift; sourceTree = ""; }; D124E32A8ED6A6A48F5EBBD4F7156FA9 /* Pods-SwiftEntryKitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftEntryKitTests.release.xcconfig"; sourceTree = ""; }; D245E0514AAC1A2B9A6D5EA2F383E90F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; D35FE84B7A5F378A9023B4D695D4B996 /* EKAttributes+Scroll.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Scroll.swift"; sourceTree = ""; }; D47B05649A80A383D3EF8B4D372370C5 /* EKRatingSymbolsContainerView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKRatingSymbolsContainerView.swift; sourceTree = ""; }; D6C0CFAEC4DF15650ED42C91AE124D09 /* EKAttributes+Animation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Animation.swift"; sourceTree = ""; }; DA5F7E5AA5A762E4504855EAF3216C8A /* SwiftEntryKit */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = SwiftEntryKit; path = SwiftEntryKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DA7DE56E720D81AC3D90007A2F61A084 /* Pods-SwiftEntryKitTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftEntryKitTests-acknowledgements.markdown"; sourceTree = ""; }; DB968E381D29D2484DC89ABEF5A08EF9 /* SwiftEntryKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SwiftEntryKit.modulemap; sourceTree = ""; }; E075598D423EEA3ACC102DB53CDB8E8C /* EKButtonBarView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKButtonBarView.swift; sourceTree = ""; }; E20C7F7CA20B9D50699AFD4AD5BCE358 /* SwiftEntryKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftEntryKit-dummy.m"; sourceTree = ""; }; E492E141CA1F65D689237579F214854C /* UIView+Utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+Utils.swift"; sourceTree = ""; }; E55224D7193D977B96C4236E1F74164C /* GradientView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = ""; }; E6F169F2385B89ED18D6810657CDD3F6 /* EKAttributes+Duration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Duration.swift"; sourceTree = ""; }; EAB6F611E86A4758835A715E4B4184F6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; EB0F9C7644E67B3E509B16CA9E1AE2E6 /* EKRatingSymbolView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKRatingSymbolView.swift; sourceTree = ""; }; ED0B495FDB5638F0BC7EFCCEF42EA31A /* EKAttributes+FrameStyle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+FrameStyle.swift"; sourceTree = ""; }; ED55558861058207FDC79BE639B3AB22 /* EntryAppearanceDescriptor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EntryAppearanceDescriptor.swift; sourceTree = ""; }; EE3F0BD1D54DD958EBE89944FD4CEE99 /* EKTextField.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKTextField.swift; sourceTree = ""; }; F352296AFDF8DE73AE8F78DB5150C5A7 /* Pods-SwiftEntryKitTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwiftEntryKitTests-dummy.m"; sourceTree = ""; }; F3BEAB4B42918B40DE6441C8C1540552 /* EKPopUpMessageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKPopUpMessageView.swift; sourceTree = ""; }; F47088C2B383BF12F74E0166C7B52E25 /* Pods-SwiftEntryKitTests */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-SwiftEntryKitTests"; path = Pods_SwiftEntryKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F5D859AAFC1AF2603E93156384B31D9B /* EKAttributes+Position.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Position.swift"; sourceTree = ""; }; F643E9B2DC1F62BA4538C437A5BCCDFA /* EKContentView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKContentView.swift; sourceTree = ""; }; F9B8F9B4651B86B74DCA4B914A4A1BE7 /* EKButtonView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKButtonView.swift; sourceTree = ""; }; FC3447757DFE9D7077BC50CF56C53740 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; FD9F579DFDB3C3CE8BE7E16084849EAB /* EKWindowProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EKWindowProvider.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ AAFF79C079AD948F35442BB67EB8E40D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( C82054AF37DEB07E384A1525C3A90447 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; AE6149CDF2E36FC955A98352466B991D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 83D05E692A0CE612F52BC0B18745B370 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; EFBB4DEC1ECFAAFCD8722E3D003646FF /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 253D69D1B151BCD20DBBC6B6439C2033 /* Foundation.framework in Frameworks */, 60FC20D83228B2C4E383524E56F95CE2 /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 0B0A0292996B17D3D92684F861EF0A04 /* Extensions */ = { isa = PBXGroup; children = ( 9F511D095B770B82902F13277AAF1AA6 /* UIApplication+EKAppearance.swift */, 65D30BCA570C5B5C8D4DA7E25F6254FA /* UIColor+Utils.swift */, 960DADF2CCCBDE8608C8DEDCA0B252EB /* UIEdgeInsets+Utils.swift */, AC54805D957AA8CD357A55ECD90EA0EF /* UIRectCorner+Short.swift */, C04EAE264EC7EFF0DA7C878F93D038E0 /* UIView+Shadow.swift */, E492E141CA1F65D689237579F214854C /* UIView+Utils.swift */, E897D76C39B3787ECA71B6592BD3F08F /* QuickLayout */, ); name = Extensions; path = Source/Extensions; sourceTree = ""; }; 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */ = { isa = PBXGroup; children = ( 59DA5C1F72E1D5BABC43EACBA672C3BA /* iOS */, ); name = Frameworks; sourceTree = ""; }; 19C48C63AF7B3E6901192100BC31B666 /* Pods-SwiftEntryKitTests */ = { isa = PBXGroup; children = ( CE2F7FD8E3DF8E80B033436940AFED3C /* Pods-SwiftEntryKitTests.modulemap */, DA7DE56E720D81AC3D90007A2F61A084 /* Pods-SwiftEntryKitTests-acknowledgements.markdown */, A04A38B59673DEC84C7286AC1A5DD82E /* Pods-SwiftEntryKitTests-acknowledgements.plist */, F352296AFDF8DE73AE8F78DB5150C5A7 /* Pods-SwiftEntryKitTests-dummy.m */, 62F1B1D97C760AD62E5A49983D4BDFA9 /* Pods-SwiftEntryKitTests-frameworks.sh */, 7F6008542D45CF6DA2CF5F20B1B389D9 /* Pods-SwiftEntryKitTests-Info.plist */, 78239DB78DD3345BC32A5B876DEA9726 /* Pods-SwiftEntryKitTests-umbrella.h */, 217D74CF28D2726D347E9E85D22057DA /* Pods-SwiftEntryKitTests.debug.xcconfig */, D124E32A8ED6A6A48F5EBBD4F7156FA9 /* Pods-SwiftEntryKitTests.release.xcconfig */, ); name = "Pods-SwiftEntryKitTests"; path = "Target Support Files/Pods-SwiftEntryKitTests"; sourceTree = ""; }; 1A5FA4CB5975E4578D32C4FB0001A045 /* Infra */ = { isa = PBXGroup; children = ( 3FDEAA72AA62231A344DBE12315E9605 /* EKBackgroundView.swift */, F643E9B2DC1F62BA4538C437A5BCCDFA /* EKContentView.swift */, 90D533185CEAE773480AB26167E64EF9 /* EKEntryView.swift */, CDE85EC51CF37128659CEB00BB891354 /* EKRootViewController.swift */, 355EC14B2CF1D527FABE1F54F422445D /* EKStyleView.swift */, 32E1F387F3E3AE4CA929AB42EC170811 /* EKWindow.swift */, FD9F579DFDB3C3CE8BE7E16084849EAB /* EKWindowProvider.swift */, 3A9F62C7BFA289C715569ABCD8EC35AD /* EKWrapperView.swift */, 5C977172E6A26597EAB05BDB41B2C104 /* EntryCachingHeuristic.swift */, ); name = Infra; path = Source/Infra; sourceTree = ""; }; 1C6D460CA567524F66BE585E5B07F4F7 /* EntryAttributes */ = { isa = PBXGroup; children = ( CFC59CB5292F0EFB0006711614DE389E /* EKAttributes.swift */, D6C0CFAEC4DF15650ED42C91AE124D09 /* EKAttributes+Animation.swift */, 4B2EE663224F44CF351C3AF280D17945 /* EKAttributes+BackgroundStyle.swift */, A7A1D227F016C19203F287375463699A /* EKAttributes+DisplayMode.swift */, E6F169F2385B89ED18D6810657CDD3F6 /* EKAttributes+Duration.swift */, ED0B495FDB5638F0BC7EFCCEF42EA31A /* EKAttributes+FrameStyle.swift */, 1A7286E41D0650723E149E86FD1C04AF /* EKAttributes+HapticFeedback.swift */, 4727C79CD0DD7F6239E77E81AA1C6592 /* EKAttributes+LifecycleActions.swift */, B3ACA36A2CDB4DFCE6EF6D0E9F6CC937 /* EKAttributes+PopBehavior.swift */, F5D859AAFC1AF2603E93156384B31D9B /* EKAttributes+Position.swift */, 2EBFF4F329202D38AE92B0E840A811B2 /* EKAttributes+PositionConstraints.swift */, 11FCF376F5FE3AE52C3EE4D32A474534 /* EKAttributes+Precedence.swift */, 613497986B31AA146AC04D2FF125081D /* EKAttributes+Presets.swift */, D35FE84B7A5F378A9023B4D695D4B996 /* EKAttributes+Scroll.swift */, 8BFE027CC4289C30AD3E768FCE5CEF0B /* EKAttributes+Shadow.swift */, 1DD21DA534C8E34356D26932C0B72F1B /* EKAttributes+StatusBar.swift */, 10BAD6713BF41F1F4581FF4905CF4BE8 /* EKAttributes+UserInteraction.swift */, 780B2C0C027974C5B034C4FB8559B10F /* EKAttributes+Validations.swift */, 7684F90C2E79E7591F8377058A81ADD0 /* EKAttributes+WindowLevel.swift */, ); name = EntryAttributes; path = EntryAttributes; sourceTree = ""; }; 22E1E4E9D635E1A61F945752082C4A00 /* MessagesUtils */ = { isa = PBXGroup; children = ( E075598D423EEA3ACC102DB53CDB8E8C /* EKButtonBarView.swift */, F9B8F9B4651B86B74DCA4B914A4A1BE7 /* EKButtonView.swift */, D47B05649A80A383D3EF8B4D372370C5 /* EKRatingSymbolsContainerView.swift */, EB0F9C7644E67B3E509B16CA9E1AE2E6 /* EKRatingSymbolView.swift */, EE3F0BD1D54DD958EBE89944FD4CEE99 /* EKTextField.swift */, ED55558861058207FDC79BE639B3AB22 /* EntryAppearanceDescriptor.swift */, ); name = MessagesUtils; path = MessagesUtils; sourceTree = ""; }; 3A2E3B3AB935C46DD4CD42871261C941 /* Notes */ = { isa = PBXGroup; children = ( CF205874ABD02019016E8D6F4823DF66 /* EKAccessoryNoteMessageView.swift */, 82AD8AAF58BF64460BD8C07EC4DF6E35 /* EKImageNoteMessageView.swift */, 8D88A10C90E97BC0A8854366B352F3EE /* EKNoteMessageView.swift */, 79629988A737E957C9B6F4684B504368 /* EKProcessingNoteMessageView.swift */, C31DB1E40DE39086DB4ADCFF6545A24E /* EKXStatusBarMessageView.swift */, ); name = Notes; path = Notes; sourceTree = ""; }; 51EA9FA7C39A49553F210B8F94DF5A34 /* Targets Support Files */ = { isa = PBXGroup; children = ( 782EBC3ECB80CAFA27E5D2F6442EE0C2 /* Pods-SwiftEntryKitDemo */, 19C48C63AF7B3E6901192100BC31B666 /* Pods-SwiftEntryKitTests */, ); name = "Targets Support Files"; sourceTree = ""; }; 59DA5C1F72E1D5BABC43EACBA672C3BA /* iOS */ = { isa = PBXGroup; children = ( EAB6F611E86A4758835A715E4B4184F6 /* Foundation.framework */, D245E0514AAC1A2B9A6D5EA2F383E90F /* UIKit.framework */, ); name = iOS; sourceTree = ""; }; 782EBC3ECB80CAFA27E5D2F6442EE0C2 /* Pods-SwiftEntryKitDemo */ = { isa = PBXGroup; children = ( 0C6D2F6A9763A4610B812B9109ACA447 /* Pods-SwiftEntryKitDemo.modulemap */, 3720AACA3DCA014803908A2E0592E7C5 /* Pods-SwiftEntryKitDemo-acknowledgements.markdown */, C563C9CF87F0274D774DB1D0BB8756F1 /* Pods-SwiftEntryKitDemo-acknowledgements.plist */, 9593CFAEB0028E56754D269C799C66B0 /* Pods-SwiftEntryKitDemo-dummy.m */, 825DCCAAF219130678137286F5E77C47 /* Pods-SwiftEntryKitDemo-frameworks.sh */, 2909A9134D532B091BC4BB03EAF83E0D /* Pods-SwiftEntryKitDemo-Info.plist */, D0598CC5B54F64EFF897D87A397E403E /* Pods-SwiftEntryKitDemo-umbrella.h */, BFD8570D08FFA26DC70A6677B52879BE /* Pods-SwiftEntryKitDemo.debug.xcconfig */, 659C18D29D4B9D963A2AD7360AAACC30 /* Pods-SwiftEntryKitDemo.release.xcconfig */, ); name = "Pods-SwiftEntryKitDemo"; path = "Target Support Files/Pods-SwiftEntryKitDemo"; sourceTree = ""; }; 9EE8007757EEFD14C62114882173F3C3 /* Utils */ = { isa = PBXGroup; children = ( E55224D7193D977B96C4236E1F74164C /* GradientView.swift */, 6D09C2BD9BF43CB402ECC6239DDE80B1 /* HapticFeedbackGenerator.swift */, B1E8374EF3E6B232F142B5987EA67FCA /* UIView+Responder.swift */, ); name = Utils; path = Source/Utils; sourceTree = ""; }; A9A2577C6BECA8A4E94E1FF7CA2DBD08 /* SwiftEntryKit */ = { isa = PBXGroup; children = ( 4DF7CDDFB196B307A3EA5A9EDF93C2B1 /* SwiftEntryKit.swift */, 0B0A0292996B17D3D92684F861EF0A04 /* Extensions */, 1A5FA4CB5975E4578D32C4FB0001A045 /* Infra */, DD9349715C9792A78269FF61E726D532 /* MessageViews */, E732E6E65BADA40D7AA84C450E4F4192 /* Model */, EAFA7292DA2C19DFB8393C82375DFBE0 /* Pod */, DD4A5106BAB6CB5031677AFB2567580D /* Support Files */, 9EE8007757EEFD14C62114882173F3C3 /* Utils */, ); name = SwiftEntryKit; path = ../..; sourceTree = ""; }; CF1408CF629C7361332E53B88F7BD30C = { isa = PBXGroup; children = ( 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, DE1A6CB57FB2556E66BBD204D206C703 /* Development Pods */, 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */, EA55FF6C4388512B5E53F22767C7731E /* Products */, 51EA9FA7C39A49553F210B8F94DF5A34 /* Targets Support Files */, ); sourceTree = ""; }; DD4A5106BAB6CB5031677AFB2567580D /* Support Files */ = { isa = PBXGroup; children = ( DB968E381D29D2484DC89ABEF5A08EF9 /* SwiftEntryKit.modulemap */, E20C7F7CA20B9D50699AFD4AD5BCE358 /* SwiftEntryKit-dummy.m */, 67852BE5281D7C3C9D16CF8CB24FAEE4 /* SwiftEntryKit-Info.plist */, 498F2A87868A376E6C8B01A8EFF7D2AC /* SwiftEntryKit-prefix.pch */, 2E176C9E90FF69941C0F00D00FB87AF9 /* SwiftEntryKit-umbrella.h */, 5E7D71B2861945983BDCF0A559AF1FC6 /* SwiftEntryKit.debug.xcconfig */, 0DC40BB88676D9A88905C0581BC836B6 /* SwiftEntryKit.release.xcconfig */, ); name = "Support Files"; path = "Example/Pods/Target Support Files/SwiftEntryKit"; sourceTree = ""; }; DD9349715C9792A78269FF61E726D532 /* MessageViews */ = { isa = PBXGroup; children = ( CDF1A0D1C37229695C259A378F96D0FC /* EKAlertMessageView.swift */, 3559532220E798158C20592737A02E39 /* EKFormMessageView.swift */, 9A71EF7308CBBA90894BE1279E935279 /* EKMessageContentView.swift */, 2239582C73BFB3D83DFDF57021299158 /* EKNotificationMessageView.swift */, F3BEAB4B42918B40DE6441C8C1540552 /* EKPopUpMessageView.swift */, D0CEBC832DB314A2208D054822F4DD85 /* EKRatingMessageView.swift */, A2BF4EDF85A16F4331293366AA50FF0E /* EKSimpleMessageView.swift */, 22E1E4E9D635E1A61F945752082C4A00 /* MessagesUtils */, 3A2E3B3AB935C46DD4CD42871261C941 /* Notes */, ); name = MessageViews; path = Source/MessageViews; sourceTree = ""; }; DE1A6CB57FB2556E66BBD204D206C703 /* Development Pods */ = { isa = PBXGroup; children = ( A9A2577C6BECA8A4E94E1FF7CA2DBD08 /* SwiftEntryKit */, ); name = "Development Pods"; sourceTree = ""; }; E732E6E65BADA40D7AA84C450E4F4192 /* Model */ = { isa = PBXGroup; children = ( 9EEBC3A780D3C8A2EB25437BA8E46F5F /* EKAlertMessage.swift */, 40327AF59BA584E6F6619BFCC3BAD434 /* EKColor.swift */, 1DAD42E5C17E9F7FB324D45E3F7EDA42 /* EKNotificationMessage.swift */, 5D431D0B0894B4B4EE88E680419E14CD /* EKPopUpMessage.swift */, 5F7A459E0E2A5540FEA8FDFEBD5766C1 /* EKProperty.swift */, 5CC6592DF43B43BA46FC2CCA00C4F96F /* EKRatingMessage.swift */, 7E7644AC1CA095C84B01E5BD5D080227 /* EKSimpleMessage.swift */, 1C6D460CA567524F66BE585E5B07F4F7 /* EntryAttributes */, ); name = Model; path = Source/Model; sourceTree = ""; }; E897D76C39B3787ECA71B6592BD3F08F /* QuickLayout */ = { isa = PBXGroup; children = ( BC25F9415CB019F995E220EF13ABAEE7 /* QLCompatibility.swift */, B38771A605FA38F7F0D803B812F22552 /* QLUtils.swift */, 45332FF34005CC3F284120BEEEA29FF2 /* UIView+QLContentWrap.swift */, 5D26C2C8F8C400F9BF58E6A104D4E446 /* UIView+QuickLayout.swift */, 8CCA1057080C500AF93E7231B4A6CA52 /* UIViewArray+QuickLayout.swift */, ); name = QuickLayout; path = QuickLayout; sourceTree = ""; }; EA55FF6C4388512B5E53F22767C7731E /* Products */ = { isa = PBXGroup; children = ( A14EAEBB9BEC7C4A28F157DA31131232 /* Pods-SwiftEntryKitDemo */, F47088C2B383BF12F74E0166C7B52E25 /* Pods-SwiftEntryKitTests */, DA5F7E5AA5A762E4504855EAF3216C8A /* SwiftEntryKit */, ); name = Products; sourceTree = ""; }; EAFA7292DA2C19DFB8393C82375DFBE0 /* Pod */ = { isa = PBXGroup; children = ( 92A9FFF66919FF57D45F01FF9060B9DD /* LICENSE */, FC3447757DFE9D7077BC50CF56C53740 /* README.md */, 0A1BEE5878A0598527D70E669A9DAF7E /* SwiftEntryKit.podspec */, ); name = Pod; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ 99BABE702C3C493BA8CAB3E336A34B27 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 068E825D6FE9520EBE3FA985C5AE4DA0 /* Pods-SwiftEntryKitDemo-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; E6BAD1529D8C727E12D41EDF7AD9152D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 14DE35A5C2A9CDA68974BB63E54E980E /* Pods-SwiftEntryKitTests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; F4783D94789658207BFCD39A626B865D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 8E8D18BA7E2779FF915DD8D000E651F8 /* SwiftEntryKit-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ B8014556AF0886B4EB6E36F9E2B39AD9 /* Pods-SwiftEntryKitDemo */ = { isa = PBXNativeTarget; buildConfigurationList = 4E88838E1E6C08C5578E22556F29CAA7 /* Build configuration list for PBXNativeTarget "Pods-SwiftEntryKitDemo" */; buildPhases = ( 99BABE702C3C493BA8CAB3E336A34B27 /* Headers */, AB81991149CA6B4EF230C069201E4021 /* Sources */, AE6149CDF2E36FC955A98352466B991D /* Frameworks */, 0A8161BE98F7D32C5840F08177AD3ADC /* Resources */, ); buildRules = ( ); dependencies = ( C86C643BCFA6FDCA3B5C59BB383589B1 /* PBXTargetDependency */, ); name = "Pods-SwiftEntryKitDemo"; productName = Pods_SwiftEntryKitDemo; productReference = A14EAEBB9BEC7C4A28F157DA31131232 /* Pods-SwiftEntryKitDemo */; productType = "com.apple.product-type.framework"; }; FCD9AC41A4A4EDDDE8502389BCD0C13B /* Pods-SwiftEntryKitTests */ = { isa = PBXNativeTarget; buildConfigurationList = 90A70CCE8C71B2D2C42B41405AA889B4 /* Build configuration list for PBXNativeTarget "Pods-SwiftEntryKitTests" */; buildPhases = ( E6BAD1529D8C727E12D41EDF7AD9152D /* Headers */, 6F4C80DAEDD21B05210518D4EE069D77 /* Sources */, AAFF79C079AD948F35442BB67EB8E40D /* Frameworks */, DBF81C754494252ACC410282CE94329D /* Resources */, ); buildRules = ( ); dependencies = ( 2C6FC358BF1EBEE3E0C43EBD2EF4A94A /* PBXTargetDependency */, ); name = "Pods-SwiftEntryKitTests"; productName = Pods_SwiftEntryKitTests; productReference = F47088C2B383BF12F74E0166C7B52E25 /* Pods-SwiftEntryKitTests */; productType = "com.apple.product-type.framework"; }; FEA6FF0588A91CCD972EDCD698B85647 /* SwiftEntryKit */ = { isa = PBXNativeTarget; buildConfigurationList = D1BF1EE05C7922DC0C7CFB1924C63F69 /* Build configuration list for PBXNativeTarget "SwiftEntryKit" */; buildPhases = ( F4783D94789658207BFCD39A626B865D /* Headers */, FA2F292C528E0D64BE6614D4E34EE473 /* Sources */, EFBB4DEC1ECFAAFCD8722E3D003646FF /* Frameworks */, B5D1E1884FB3A1D0F211E939528A5B27 /* Resources */, ); buildRules = ( ); dependencies = ( ); name = SwiftEntryKit; productName = SwiftEntryKit; productReference = DA5F7E5AA5A762E4504855EAF3216C8A /* SwiftEntryKit */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ BFDFE7DC352907FC980B868725387E98 /* Project object */ = { isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1240; LastUpgradeCheck = 1240; }; buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( Base, en, ); mainGroup = CF1408CF629C7361332E53B88F7BD30C; productRefGroup = EA55FF6C4388512B5E53F22767C7731E /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( B8014556AF0886B4EB6E36F9E2B39AD9 /* Pods-SwiftEntryKitDemo */, FCD9AC41A4A4EDDDE8502389BCD0C13B /* Pods-SwiftEntryKitTests */, FEA6FF0588A91CCD972EDCD698B85647 /* SwiftEntryKit */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 0A8161BE98F7D32C5840F08177AD3ADC /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; B5D1E1884FB3A1D0F211E939528A5B27 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; DBF81C754494252ACC410282CE94329D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 6F4C80DAEDD21B05210518D4EE069D77 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 5C258564AFF20D612A3A339423F45584 /* Pods-SwiftEntryKitTests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; AB81991149CA6B4EF230C069201E4021 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( C60B01D9CD508925C0CE73F3A494AC50 /* Pods-SwiftEntryKitDemo-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; FA2F292C528E0D64BE6614D4E34EE473 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 2192DBD932E0F15BB67ACDC05443661A /* EKAccessoryNoteMessageView.swift in Sources */, 27AB779347FB4F77C5609ECC8E822D47 /* EKAlertMessage.swift in Sources */, C98CD0D413A41E34BCE66218A759A400 /* EKAlertMessageView.swift in Sources */, 7108EDEF3D6F20A74A001A6095D5CEAF /* EKAttributes.swift in Sources */, CB1EEDEDA94C738FAF66F1C885564292 /* EKAttributes+Animation.swift in Sources */, A2BA4820371B5FEC4F05DAD50C6ABF6E /* EKAttributes+BackgroundStyle.swift in Sources */, BC62184178B9BEB545A13961210A05DC /* EKAttributes+DisplayMode.swift in Sources */, F515A3A2C771F0BC0F95AA1BA4EEFFC1 /* EKAttributes+Duration.swift in Sources */, 734E4D1053D35D868CD9E2089C951A30 /* EKAttributes+FrameStyle.swift in Sources */, 8B9C14384B947160FDC8C9082DFAC126 /* EKAttributes+HapticFeedback.swift in Sources */, 714A8C1AC51A1123F085369F696D98E0 /* EKAttributes+LifecycleActions.swift in Sources */, 92C9D280AC667D5F46DF47A9ECFD6CF8 /* EKAttributes+PopBehavior.swift in Sources */, 952D70DA0B30FC34603159D7CCC7B3CE /* EKAttributes+Position.swift in Sources */, 28E32E39AD8DAAF8D769DB804E262758 /* EKAttributes+PositionConstraints.swift in Sources */, F8D5E276EAFEE938C91DDCECB67EF87C /* EKAttributes+Precedence.swift in Sources */, D51E20F00EB6CD7E0D7FF49D79E2F60C /* EKAttributes+Presets.swift in Sources */, ED772CA4DAF478D6E0DF050C63F305F1 /* EKAttributes+Scroll.swift in Sources */, DA0EC170AAC94082A6B5F33CF4DD391F /* EKAttributes+Shadow.swift in Sources */, 0443B823D09728A6A4AAEA741ED0EC1A /* EKAttributes+StatusBar.swift in Sources */, 0D2B4E91DB02BDA04E6BDF6DBA4A546E /* EKAttributes+UserInteraction.swift in Sources */, 055EFFC858E25B12CE2921EC8C7233EB /* EKAttributes+Validations.swift in Sources */, F87B701EBA816F684B11F39CD1E39F47 /* EKAttributes+WindowLevel.swift in Sources */, 462DE7325DE86EFA2F3EC52CEBD9C1E5 /* EKBackgroundView.swift in Sources */, 4BA5FF5F702BD658E11F0DFFCBD8F48D /* EKButtonBarView.swift in Sources */, 8BA44EB1BBDD85BB4527F5CA3A5776AD /* EKButtonView.swift in Sources */, F90BC550E43319147538AF88C987758E /* EKColor.swift in Sources */, C8887B7C8B331F253936A033C82E7035 /* EKContentView.swift in Sources */, 98C43F17EB6BE6D18F9DA8EC7B2E04B0 /* EKEntryView.swift in Sources */, DDA8C21B07CEAE9204BF7F435976CB9E /* EKFormMessageView.swift in Sources */, 11E4007894DF1F2A3F475FBB8229F3A4 /* EKImageNoteMessageView.swift in Sources */, BA2DA0C04BFBAEE25E534E24CFFF395A /* EKMessageContentView.swift in Sources */, D6AE33459B57384C2599C6C99F527BEB /* EKNoteMessageView.swift in Sources */, 36882C85632251103A44F147853939AA /* EKNotificationMessage.swift in Sources */, 8D80DF7CFA1BE70D46E90462AE24C472 /* EKNotificationMessageView.swift in Sources */, 6ED875168F056413ECC87C941731E714 /* EKPopUpMessage.swift in Sources */, 05D9D1E4C707A5F023A1F94ACF486AC2 /* EKPopUpMessageView.swift in Sources */, D7662DCD3ADE9F482B12D960A4517476 /* EKProcessingNoteMessageView.swift in Sources */, FC942184FF87AFA768AE2CA8218F1EC2 /* EKProperty.swift in Sources */, 87DDE964048660CDA29BE9EFBB20A8A7 /* EKRatingMessage.swift in Sources */, 7BBD4032CA2769A7B3D5F79E95264689 /* EKRatingMessageView.swift in Sources */, 8A0A768C3ECBEEA388452EC31BEF6500 /* EKRatingSymbolsContainerView.swift in Sources */, 302E32F7BE65307E4A589AFF78B43BB5 /* EKRatingSymbolView.swift in Sources */, 56E6DC85F5E9118377A587FB086E147B /* EKRootViewController.swift in Sources */, A7011D8655938627E740F0C3CF8FA900 /* EKSimpleMessage.swift in Sources */, 90F3D408915E74432EA7EEA31FA356E8 /* EKSimpleMessageView.swift in Sources */, 0359FD65EC137FD6398B15FFA06FBD4E /* EKStyleView.swift in Sources */, EF4520313EBDD8C00BD5ACED2BACA34F /* EKTextField.swift in Sources */, 97AD66EB56B38157D92EEDBAEAECDBD0 /* EKWindow.swift in Sources */, AFA1DC023B3E88B337F09BA31B2D648A /* EKWindowProvider.swift in Sources */, A2413744FA4B848AA797FB365F69BFDC /* EKWrapperView.swift in Sources */, B3AE89438313BC2BACC4D0DE03FC3DEE /* EKXStatusBarMessageView.swift in Sources */, 4E375F46869D4ACA0012FD19C628D27C /* EntryAppearanceDescriptor.swift in Sources */, 89A502FDBC5C0EF63831DD6A8537610A /* EntryCachingHeuristic.swift in Sources */, 559047DE0FD0172BD098F42C46EC99BF /* GradientView.swift in Sources */, 85C9E605B0FDDDFAE52C4C098400BAB6 /* HapticFeedbackGenerator.swift in Sources */, 0A68662146E1586B4456FAB071D11DE2 /* QLCompatibility.swift in Sources */, 0D6FB08663ED820FCE5FBE981E3C6A5A /* QLUtils.swift in Sources */, 34D13E6FCD9A83500030FA87732A91E0 /* SwiftEntryKit.swift in Sources */, F59A2355405C20F6DBA556CADC3C8C13 /* SwiftEntryKit-dummy.m in Sources */, 29BEEBBF37CF019B510DBFB73345AD85 /* UIApplication+EKAppearance.swift in Sources */, 348C406EE636A76C1FD17BB1D6524F76 /* UIColor+Utils.swift in Sources */, B0598238BC5A442270D9461A0E5A1D9D /* UIEdgeInsets+Utils.swift in Sources */, 6FC9FC572974C469202D4ED5CD215B87 /* UIRectCorner+Short.swift in Sources */, 595221C70FBCDB1D0B2A3A937F1920DF /* UIView+QLContentWrap.swift in Sources */, CF185599178E4DC6478502FAD3A58872 /* UIView+QuickLayout.swift in Sources */, 18734EC046ABAA79202629307DC9F249 /* UIView+Responder.swift in Sources */, 55D8E7C94A4249CAD0CE60C5442C1647 /* UIView+Shadow.swift in Sources */, CF3C9AC716E31797CC2C3C81DECE4C97 /* UIView+Utils.swift in Sources */, 5A88DF76317A991C11AEB8F1FE918FBB /* UIViewArray+QuickLayout.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 2C6FC358BF1EBEE3E0C43EBD2EF4A94A /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SwiftEntryKit; target = FEA6FF0588A91CCD972EDCD698B85647 /* SwiftEntryKit */; targetProxy = 963D784716C5E411F3ADD005A0BAC41B /* PBXContainerItemProxy */; }; C86C643BCFA6FDCA3B5C59BB383589B1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = SwiftEntryKit; target = FEA6FF0588A91CCD972EDCD698B85647 /* SwiftEntryKit */; targetProxy = C83659509B9A824D8B8B5FEE03EC4F73 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 25AD9454612BF454A1E3DC4CD4FA8C6D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_DEBUG=1", "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 = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; 85FC0D3EAE3F86C9BA6B769F2CCDFD83 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = D124E32A8ED6A6A48F5EBBD4F7156FA9 /* Pods-SwiftEntryKitTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests-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-SwiftEntryKitTests/Pods-SwiftEntryKitTests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; 974FE3B7E5BC8335BB591829F9B5A22B /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 0DC40BB88676D9A88905C0581BC836B6 /* SwiftEntryKit.release.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_PREFIX_HEADER = "Target Support Files/SwiftEntryKit/SwiftEntryKit-prefix.pch"; INFOPLIST_FILE = "Target Support Files/SwiftEntryKit/SwiftEntryKit-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/SwiftEntryKit/SwiftEntryKit.modulemap"; PRODUCT_MODULE_NAME = SwiftEntryKit; PRODUCT_NAME = SwiftEntryKit; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; 99962B8BE26F904FBDF6FB1B445A6003 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 5E7D71B2861945983BDCF0A559AF1FC6 /* SwiftEntryKit.debug.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_PREFIX_HEADER = "Target Support Files/SwiftEntryKit/SwiftEntryKit-prefix.pch"; INFOPLIST_FILE = "Target Support Files/SwiftEntryKit/SwiftEntryKit-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/SwiftEntryKit/SwiftEntryKit.modulemap"; PRODUCT_MODULE_NAME = SwiftEntryKit; PRODUCT_NAME = SwiftEntryKit; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; B49B2FDC6E95FC5D63C413BCC63A3521 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = BFD8570D08FFA26DC70A6677B52879BE /* Pods-SwiftEntryKitDemo.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo-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-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; CA547D2C7E9A8A153DC2B27FBE00B112 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=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 = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; SYMROOT = "${SRCROOT}/../build"; }; name = Release; }; CF077D663DDCCD59AC06D753AA16D0A2 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 659C18D29D4B9D963A2AD7360AAACC30 /* Pods-SwiftEntryKitDemo.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo-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-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; D47E402F78A11C41B5BA98FE73CAEC40 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 217D74CF28D2726D347E9E85D22057DA /* Pods-SwiftEntryKitTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests-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-SwiftEntryKitTests/Pods-SwiftEntryKitTests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( 25AD9454612BF454A1E3DC4CD4FA8C6D /* Debug */, CA547D2C7E9A8A153DC2B27FBE00B112 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 4E88838E1E6C08C5578E22556F29CAA7 /* Build configuration list for PBXNativeTarget "Pods-SwiftEntryKitDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( B49B2FDC6E95FC5D63C413BCC63A3521 /* Debug */, CF077D663DDCCD59AC06D753AA16D0A2 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 90A70CCE8C71B2D2C42B41405AA889B4 /* Build configuration list for PBXNativeTarget "Pods-SwiftEntryKitTests" */ = { isa = XCConfigurationList; buildConfigurations = ( D47E402F78A11C41B5BA98FE73CAEC40 /* Debug */, 85FC0D3EAE3F86C9BA6B769F2CCDFD83 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; D1BF1EE05C7922DC0C7CFB1924C63F69 /* Build configuration list for PBXNativeTarget "SwiftEntryKit" */ = { isa = XCConfigurationList; buildConfigurations = ( 99962B8BE26F904FBDF6FB1B445A6003 /* Debug */, 974FE3B7E5BC8335BB591829F9B5A22B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; } ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo-Info.plist ================================================ 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 ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo-acknowledgements.markdown ================================================ # Acknowledgements This application makes use of the following third party libraries: ## SwiftEntryKit MIT License Copyright (c) 2018 Daniel Huri, huri000@gmail.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 ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo-acknowledgements.plist ================================================ PreferenceSpecifiers FooterText This application makes use of the following third party libraries: Title Acknowledgements Type PSGroupSpecifier FooterText MIT License Copyright (c) 2018 Daniel Huri, huri000@gmail.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 SwiftEntryKit Type PSGroupSpecifier FooterText Generated by CocoaPods - https://cocoapods.org Title Type PSGroupSpecifier StringsTable Acknowledgements Title Acknowledgements ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo-dummy.m ================================================ #import @interface PodsDummy_Pods_SwiftEntryKitDemo : NSObject @end @implementation PodsDummy_Pods_SwiftEntryKitDemo @end ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo-frameworks.sh ================================================ #!/bin/sh set -e set -u set -o pipefail function on_error { echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" } trap 'on_error $LINENO' ERR if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy # frameworks to, so exit 0 (signalling the script phase was successful). exit 0 fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" BCSYMBOLMAP_DIR="BCSymbolMaps" # This protects against multiple targets copying the same framework dependency at the same time. The solution # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") # Copies and strips a vendored framework 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 if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do echo "Installing $f" install_bcsymbolmap "$f" "$destination" rm "$f" done rmdir "${source}/${BCSYMBOLMAP_DIR}" fi # Use filter instead of exclude so missing patterns don't throw errors. echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --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}" elif [ -L "${binary}" ]; then echo "Destination binary is symlinked..." dirname="$(dirname "${binary}")" binary="${dirname}/$(readlink "${binary}")" 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) 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 } # Copies and strips a vendored dSYM install_dsym() { local source="$1" warn_missing_arch=${2:-true} if [ -r "$source" ]; then # Copy the dSYM into the targets temp dir. echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" local basename basename="$(basename -s .dSYM "$source")" binary_name="$(ls "$source/Contents/Resources/DWARF")" binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" # Strip invalid architectures from the dSYM. if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then strip_invalid_archs "$binary" "$warn_missing_arch" fi if [[ $STRIP_BINARY_RETVAL == 0 ]]; then # Move the stripped file into its final destination. echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" else # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. mkdir -p "${DWARF_DSYM_FOLDER_PATH}" touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" fi fi } # Used as a return value for each invocation of `strip_invalid_archs` function. STRIP_BINARY_RETVAL=0 # Strip invalid architectures strip_invalid_archs() { binary="$1" warn_missing_arch=${2:-true} # Get architectures for current target binary binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" # Intersect them with the architectures we are building for intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" # If there are no archs supported by this binary then warn the user if [[ -z "$intersected_archs" ]]; then if [[ "$warn_missing_arch" == "true" ]]; then echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." fi STRIP_BINARY_RETVAL=1 return fi stripped="" for arch in $binary_archs; do if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" stripped="$stripped $arch" fi done if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi STRIP_BINARY_RETVAL=0 } # Copies the bcsymbolmap files of a vendored framework install_bcsymbolmap() { local bcsymbolmap_path="$1" local destination="${BUILT_PRODUCTS_DIR}" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" } # 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_identity 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 } if [[ "$CONFIGURATION" == "Debug" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/SwiftEntryKit/SwiftEntryKit.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/SwiftEntryKit/SwiftEntryKit.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait fi ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo-umbrella.h ================================================ #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_SwiftEntryKitDemoVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_SwiftEntryKitDemoVersionString[]; ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo.debug.xcconfig ================================================ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -framework "SwiftEntryKit" -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo.modulemap ================================================ framework module Pods_SwiftEntryKitDemo { umbrella header "Pods-SwiftEntryKitDemo-umbrella.h" export * module * { export * } } ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo.release.xcconfig ================================================ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -framework "SwiftEntryKit" -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests-Info.plist ================================================ 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 ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests-acknowledgements.markdown ================================================ # Acknowledgements This application makes use of the following third party libraries: ## SwiftEntryKit MIT License Copyright (c) 2018 Daniel Huri, huri000@gmail.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 ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests-acknowledgements.plist ================================================ PreferenceSpecifiers FooterText This application makes use of the following third party libraries: Title Acknowledgements Type PSGroupSpecifier FooterText MIT License Copyright (c) 2018 Daniel Huri, huri000@gmail.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 SwiftEntryKit Type PSGroupSpecifier FooterText Generated by CocoaPods - https://cocoapods.org Title Type PSGroupSpecifier StringsTable Acknowledgements Title Acknowledgements ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests-dummy.m ================================================ #import @interface PodsDummy_Pods_SwiftEntryKitTests : NSObject @end @implementation PodsDummy_Pods_SwiftEntryKitTests @end ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests-frameworks.sh ================================================ #!/bin/sh set -e set -u set -o pipefail function on_error { echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" } trap 'on_error $LINENO' ERR if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy # frameworks to, so exit 0 (signalling the script phase was successful). exit 0 fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" BCSYMBOLMAP_DIR="BCSymbolMaps" # This protects against multiple targets copying the same framework dependency at the same time. The solution # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") # Copies and strips a vendored framework 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 if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do echo "Installing $f" install_bcsymbolmap "$f" "$destination" rm "$f" done rmdir "${source}/${BCSYMBOLMAP_DIR}" fi # Use filter instead of exclude so missing patterns don't throw errors. echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --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}" elif [ -L "${binary}" ]; then echo "Destination binary is symlinked..." dirname="$(dirname "${binary}")" binary="${dirname}/$(readlink "${binary}")" 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) 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 } # Copies and strips a vendored dSYM install_dsym() { local source="$1" warn_missing_arch=${2:-true} if [ -r "$source" ]; then # Copy the dSYM into the targets temp dir. echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" local basename basename="$(basename -s .dSYM "$source")" binary_name="$(ls "$source/Contents/Resources/DWARF")" binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" # Strip invalid architectures from the dSYM. if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then strip_invalid_archs "$binary" "$warn_missing_arch" fi if [[ $STRIP_BINARY_RETVAL == 0 ]]; then # Move the stripped file into its final destination. echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" else # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. mkdir -p "${DWARF_DSYM_FOLDER_PATH}" touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" fi fi } # Used as a return value for each invocation of `strip_invalid_archs` function. STRIP_BINARY_RETVAL=0 # Strip invalid architectures strip_invalid_archs() { binary="$1" warn_missing_arch=${2:-true} # Get architectures for current target binary binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" # Intersect them with the architectures we are building for intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" # If there are no archs supported by this binary then warn the user if [[ -z "$intersected_archs" ]]; then if [[ "$warn_missing_arch" == "true" ]]; then echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." fi STRIP_BINARY_RETVAL=1 return fi stripped="" for arch in $binary_archs; do if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" stripped="$stripped $arch" fi done if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi STRIP_BINARY_RETVAL=0 } # Copies the bcsymbolmap files of a vendored framework install_bcsymbolmap() { local bcsymbolmap_path="$1" local destination="${BUILT_PRODUCTS_DIR}" echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" } # 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_identity 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 } if [[ "$CONFIGURATION" == "Debug" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/SwiftEntryKit/SwiftEntryKit.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then install_framework "${BUILT_PRODUCTS_DIR}/SwiftEntryKit/SwiftEntryKit.framework" fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait fi ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests-umbrella.h ================================================ #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_SwiftEntryKitTestsVersionNumber; FOUNDATION_EXPORT const unsigned char Pods_SwiftEntryKitTestsVersionString[]; ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests.debug.xcconfig ================================================ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/Frameworks' '@loader_path/Frameworks' LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -framework "SwiftEntryKit" -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests.modulemap ================================================ framework module Pods_SwiftEntryKitTests { umbrella header "Pods-SwiftEntryKitTests-umbrella.h" export * module * { export * } } ================================================ FILE: Example/Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests.release.xcconfig ================================================ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit/SwiftEntryKit.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/Frameworks' '@loader_path/Frameworks' LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -framework "SwiftEntryKit" -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: Example/Pods/Target Support Files/SwiftEntryKit/SwiftEntryKit-Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleShortVersionString 2.0.0 CFBundleSignature ???? CFBundleVersion ${CURRENT_PROJECT_VERSION} NSPrincipalClass ================================================ FILE: Example/Pods/Target Support Files/SwiftEntryKit/SwiftEntryKit-dummy.m ================================================ #import @interface PodsDummy_SwiftEntryKit : NSObject @end @implementation PodsDummy_SwiftEntryKit @end ================================================ FILE: Example/Pods/Target Support Files/SwiftEntryKit/SwiftEntryKit-prefix.pch ================================================ #ifdef __OBJC__ #import #else #ifndef FOUNDATION_EXPORT #if defined(__cplusplus) #define FOUNDATION_EXPORT extern "C" #else #define FOUNDATION_EXPORT extern #endif #endif #endif ================================================ FILE: Example/Pods/Target Support Files/SwiftEntryKit/SwiftEntryKit-umbrella.h ================================================ #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 SwiftEntryKitVersionNumber; FOUNDATION_EXPORT const unsigned char SwiftEntryKitVersionString[]; ================================================ FILE: Example/Pods/Target Support Files/SwiftEntryKit/SwiftEntryKit.debug.xcconfig ================================================ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: Example/Pods/Target Support Files/SwiftEntryKit/SwiftEntryKit.modulemap ================================================ framework module SwiftEntryKit { umbrella header "SwiftEntryKit-umbrella.h" export * module * { export * } } ================================================ FILE: Example/Pods/Target Support Files/SwiftEntryKit/SwiftEntryKit.release.xcconfig ================================================ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES ================================================ FILE: Example/SwiftEntryKit/AppDelegate.swift ================================================ // // AppDelegate.swift // SwiftEntryKit // // Created by huri000@gmail.com on 04/21/2018. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } } ================================================ FILE: Example/SwiftEntryKit/Base.lproj/LaunchScreen.xib ================================================ ================================================ FILE: Example/SwiftEntryKit/Base.lproj/Main.storyboard ================================================ ================================================ FILE: Example/SwiftEntryKit/DemoAppInfo.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 LSRequiresIPhoneOS UILaunchStoryboardName LaunchScreen UIMainStoryboardFile Main UIRequiredDeviceCapabilities armv7 UISupportedInterfaceOrientations UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortraitUpsideDown UIViewControllerBasedStatusBarAppearance ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/AppIcon.appiconset/Contents.json ================================================ { "images" : [ { "idiom" : "iphone", "size" : "20x20", "scale" : "2x" }, { "idiom" : "iphone", "size" : "20x20", "scale" : "3x" }, { "idiom" : "iphone", "size" : "29x29", "scale" : "2x" }, { "idiom" : "iphone", "size" : "29x29", "scale" : "3x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "3x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "3x" }, { "idiom" : "ios-marketing", "size" : "1024x1024", "scale" : "1x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/audience-band-blur-518389.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "audience-band-blur-518389.png", "scale" : "1x" }, { "idiom" : "universal", "scale" : "2x" }, { "idiom" : "universal", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/battery/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/battery/battery0.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "battery.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "battery@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "battery@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" }, "properties" : { "template-rendering-intent" : "template" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/battery/battery1.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "battery (1).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "battery (1)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "battery (1)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" }, "properties" : { "template-rendering-intent" : "template" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/battery/battery2.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "battery (2).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "battery (2)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "battery (2)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" }, "properties" : { "template-rendering-intent" : "template" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/battery/battery3.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "battery (3).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "battery (3)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "battery (3)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" }, "properties" : { "template-rendering-intent" : "template" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/battery/battery4.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "battery (4).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "battery (4)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "battery (4)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" }, "properties" : { "template-rendering-intent" : "template" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/battery/battery5.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "battery (5).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "battery (5)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "battery (5)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" }, "properties" : { "template-rendering-intent" : "template" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/iPhone Icons/Contents.json ================================================ { "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/iPhone Icons/ic_bottom_float.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "icon1.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "icon1@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "icon1@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/iPhone Icons/ic_bottom_popup.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "icon4.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "icon4@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "icon4@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/iPhone Icons/ic_bottom_toast.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "icon3.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "icon3@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "icon3@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/iPhone Icons/ic_sb_note.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "icon7.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "icon7@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "icon7@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/iPhone Icons/ic_top_float.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "icon2.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "icon2@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "icon2@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/iPhone Icons/ic_top_note.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "icon6.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "icon6@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "icon6@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/iPhone Icons/ic_top_toast.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "icon5.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "icon5@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "icon5@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_apple.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "apple.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "apple@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "apple@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_books.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "books.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "books@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "books@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_coffee_light.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "coffee (2).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "coffee (2)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "coffee (2)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_done_all_dark_48pt.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "ic_done_all_48pt.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "ic_done_all_48pt_2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "ic_done_all_48pt_3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_done_all_light_48pt.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "ic_done_all_white_48pt.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "ic_done_all_white_48pt_2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "ic_done_all_white_48pt_3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" }, "properties" : { "template-rendering-intent" : "template" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_fast_forward_white.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "ic_fast_forward_white.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "ic_fast_forward_white_2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "ic_fast_forward_white_3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_fast_rewind_white.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "ic_fast_rewind_white.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "ic_fast_rewind_white_2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "ic_fast_rewind_white_3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_info_outline.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "ic_info_outline.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "ic_info_outline_2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "ic_info_outline_3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_lock_dark.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "key.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "key@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "key@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_lock_light.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "key (1).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "key (1)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "key (1)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_madi_profile.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "madlen.jpg", "scale" : "1x" }, { "idiom" : "universal", "scale" : "2x" }, { "idiom" : "universal", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_mail_dark.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "mail.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "mail@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "mail@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_mail_light.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "mail (1).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "mail (1)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "mail (1)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_pause_circle_outline_white_36pt.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "ic_pause_circle_outline_white_36pt.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "ic_pause_circle_outline_white_36pt_2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "ic_pause_circle_outline_white_36pt_3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_pause_white.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "ic_pause_white.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "ic_pause_white_2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "ic_pause_white_3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_phone_dark.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "phone-call.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "phone-call@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "phone-call@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_phone_light.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "phone-call (1).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "phone-call (1)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "phone-call (1)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_pizza.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "pizza.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "pizza@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "pizza@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_star_selected.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "star.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "star@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "star@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_star_unselected.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "star (1).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "star (1)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "star (1)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_success.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "success.png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "success@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "success@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_user_dark.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "user (1).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "user (1)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "user (1)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_user_light.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "user (2).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "user (2)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "user (2)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/ic_wifi.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "wifi (3).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "wifi (3)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "wifi (3)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Images.xcassets/paper-plane-light.imageset/Contents.json ================================================ { "images" : [ { "idiom" : "universal", "filename" : "paper-plane (1).png", "scale" : "1x" }, { "idiom" : "universal", "filename" : "paper-plane (1)@2x.png", "scale" : "2x" }, { "idiom" : "universal", "filename" : "paper-plane (1)@3x.png", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } } ================================================ FILE: Example/SwiftEntryKit/Info.plist ================================================ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType FMWK CFBundleShortVersionString 1.0 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/AnimationSelectionTableViewCell.swift ================================================ // // AnimationSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/26/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import SwiftEntryKit final class AnimationSelectionTableViewCell: SelectionTableViewCell { enum Action: String { case entrance case exit case pop var isOut: Bool { return Set([.exit, .pop]).contains(self) } } var action: Action = .entrance var animation: EKAttributes.Animation { set { switch action { case .entrance: attributesWrapper.attributes.entranceAnimation = newValue case .exit: attributesWrapper.attributes.exitAnimation = newValue case .pop: attributesWrapper.attributes.popBehavior = EKAttributes.PopBehavior.animated(animation: newValue) } } get { switch action { case .entrance: return attributesWrapper.attributes.entranceAnimation case .exit: return attributesWrapper.attributes.exitAnimation case .pop: if case EKAttributes.PopBehavior.animated(animation: let animation) = attributesWrapper.attributes.popBehavior { return animation } else { fatalError() } } } } func configure(attributesWrapper: EntryAttributeWrapper, action: Action) { self.action = action configure(attributesWrapper: attributesWrapper) } override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "\(action.rawValue.capitalized) Animation" descriptionValue = "Describes the \(action.rawValue) animation of the entry" insertSegments(by: ["Translate", "Scale", "Fade"]) selectSegment() } private func selectSegment() { if animation.containsTranslation { segmentedControl.selectedSegmentIndex = 0 } else if animation.containsScale { segmentedControl.selectedSegmentIndex = 1 } else if animation.containsFade { segmentedControl.selectedSegmentIndex = 2 } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: animation = .translation case 1 where action.isOut: animation = .init(scale: .init(from: 1, to: 0, duration: 0.3)) case 1: animation = .init(scale: .init(from: 0, to: 1, duration: 0.3)) case 2 where action.isOut: animation = .init(fade: .init(from: 1, to: 0, duration: 0.3)) case 2: animation = .init(fade: .init(from: 0, to: 1, duration: 0.3)) default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/BackgroundStyleSelectionTableViewCell.swift ================================================ // // ScreenBackgroundStyleSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit import SwiftEntryKit final class BackgroundStyleSelectionTableViewCell: SelectionTableViewCell { private var focus: Focus = .entry private var backgroundStyle: EKAttributes.BackgroundStyle { get { switch focus { case .entry: return attributesWrapper.attributes.entryBackground case .screen: return attributesWrapper.attributes.screenBackground } } set { switch focus { case .entry: attributesWrapper.attributes.entryBackground = newValue case .screen: attributesWrapper.attributes.screenBackground = newValue } } } func configure(attributesWrapper: EntryAttributeWrapper, focus: Focus) { self.focus = focus configure(attributesWrapper: attributesWrapper) } override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "\(focus.rawValue.capitalized) Background Style" descriptionValue = "The style of the \(focus.rawValue)'s background can be one of the following options" insertSegments(by: ["Clear", "Blur", "Gradient", "Color"]) selectSegment() } private func selectSegment() { switch backgroundStyle { case .clear: segmentedControl.selectedSegmentIndex = 0 case .visualEffect(style: _): segmentedControl.selectedSegmentIndex = 1 case .gradient(gradient: _): segmentedControl.selectedSegmentIndex = 2 case .color(color: _): segmentedControl.selectedSegmentIndex = 3 default: // TODO: Image isn't handled yet break } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: backgroundStyle = .clear case 1: backgroundStyle = .visualEffect(style: .standard) case 2: let gradient = EKAttributes.BackgroundStyle.Gradient( colors: [Color.BlueGray.c100, Color.BlueGray.c300], startPoint: .zero, endPoint: CGPoint(x: 1, y: 1) ) backgroundStyle = .gradient(gradient: gradient) case 3: let color: EKColor switch focus { case .entry: color = .amber case .screen: color = EKColor.black.with(alpha: 0.5) } backgroundStyle = .color(color: color) default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/BorderSelectionTableViewCell.swift ================================================ // // BorderSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/28/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final class BorderSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Border" descriptionValue = "Add a border to the entry" insertSegments(by: ["Off", "On"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.border { case .none: segmentedControl.selectedSegmentIndex = 0 case .value(color: _, width: _): segmentedControl.selectedSegmentIndex = 1 } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.border = .none case 1: attributesWrapper.attributes.border = .value(color: UIColor.black, width: 0.5) default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/DisplayDurationSelectionTableViewCell.swift ================================================ // // VisibleDurationTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/24/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final class DisplayDurationSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Display Duration" descriptionValue = "How long the entry is displayed" insertSegments(by: ["2 Seconds", "4 Seconds", "infinite"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.displayDuration { case 2: segmentedControl.selectedSegmentIndex = 0 case 4: segmentedControl.selectedSegmentIndex = 1 case .infinity: segmentedControl.selectedSegmentIndex = 2 default: break } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.displayDuration = 2 case 1: attributesWrapper.attributes.displayDuration = 4 case 2: attributesWrapper.attributes.displayDuration = .infinity default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/HapticFeedbackSelectionTableViewCell.swift ================================================ // // NotificationFeedbackSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import Foundation final class HapticFeedbackSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Notification Haptic Feedback" descriptionValue = "Generate a haptic feedback once the entry shows" insertSegments(by: ["Off", "Success", "Warning", "Error"]) selectSegment() } private func selectSegment() { switch attributes.hapticFeedbackType { case .none: segmentedControl.selectedSegmentIndex = 0 case .success: segmentedControl.selectedSegmentIndex = 1 case .warning: segmentedControl.selectedSegmentIndex = 2 case .error: segmentedControl.selectedSegmentIndex = 3 } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.hapticFeedbackType = .none case 1: attributesWrapper.attributes.hapticFeedbackType = .success case 2: attributesWrapper.attributes.hapticFeedbackType = .warning case 3: attributesWrapper.attributes.hapticFeedbackType = .error default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/HeightSelectionTableViewCell.swift ================================================ // // HeightSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/26/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final class HeightSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Height" descriptionValue = "Describes the entry's height inside the screen. It can be a constant, receive intrinsic height or even get a screen height ratio" insertSegments(by: ["Intrinsic", "100pts", "50% Ratio"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.positionConstraints.size.height { case .intrinsic: segmentedControl.selectedSegmentIndex = 0 case .constant(value: 100): segmentedControl.selectedSegmentIndex = 1 case .ratio(value: 0.5): segmentedControl.selectedSegmentIndex = 2 default: break } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.positionConstraints.size.height = .intrinsic case 1: attributesWrapper.attributes.positionConstraints.size.height = .constant(value: 100) case 2: attributesWrapper.attributes.positionConstraints.size.height = .ratio(value: 0.5) default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/MaxWidthSelectionTableViewCell.swift ================================================ // // MaxWidthSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/26/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final class MaxWidthSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Max Width" descriptionValue = "Describes the entry's maximum width limitation. It can stretch to the width of the screen, get screen edge less 40pts, or be 90% of the screen width" insertSegments(by: ["Stretch", "Min Edge", "90% Screen"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.positionConstraints.maxSize.width { case .offset(value: _): segmentedControl.selectedSegmentIndex = 0 case .constant(value: _): segmentedControl.selectedSegmentIndex = 1 case .ratio(value: 0.9): segmentedControl.selectedSegmentIndex = 2 default: break } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.positionConstraints.maxSize.width = .offset(value: 0) case 1: attributesWrapper.attributes.positionConstraints.maxSize.width = .constant(value: UIScreen.main.minEdge - 40) case 2: attributesWrapper.attributes.positionConstraints.maxSize.width = .ratio(value: 0.9) default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/PositionSelectionTableViewCell.swift ================================================ // // LocationSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/24/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit import SwiftEntryKit final class PositionSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Position" descriptionValue = "The position of the entry inside the screen" insertSegments(by: ["Top", "Bottom", "Center"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.position { case .top: segmentedControl.selectedSegmentIndex = 0 case .bottom: segmentedControl.selectedSegmentIndex = 1 case .center: segmentedControl.selectedSegmentIndex = 2 } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.position = .top case 1: attributesWrapper.attributes.position = .bottom case 2: attributesWrapper.attributes.position = .center default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/PrioritySelectionTableViewCell.swift ================================================ // // PrioritySelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/29/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final class PrioritySelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Display Priority" descriptionValue = "The priority of the entry. *Max* overrides any other entry. *Normal* overrides only other normal priority entry" insertSegments(by: ["Normal", "High", "Max"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.precedence.priority { case .normal: segmentedControl.selectedSegmentIndex = 0 case .high: segmentedControl.selectedSegmentIndex = 1 case .max: segmentedControl.selectedSegmentIndex = 2 default: break } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.precedence.priority = .normal case 1: attributesWrapper.attributes.precedence.priority = .high case 2: attributesWrapper.attributes.precedence.priority = .max default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/RoundCornersSelectionTableViewCell.swift ================================================ // // RoundCornersSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit import SwiftEntryKit final class RoundCornersSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Round Corners" descriptionValue = "The entry's corners can be rounded in one of the following manner" insertSegments(by: ["None", "Top", "Bottom", "All"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.roundCorners { case .none: segmentedControl.selectedSegmentIndex = 0 case .top(radius: _): segmentedControl.selectedSegmentIndex = 1 case .bottom(radius: _): segmentedControl.selectedSegmentIndex = 2 case .all(radius: _): segmentedControl.selectedSegmentIndex = 3 } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.roundCorners = .none case 1: attributesWrapper.attributes.roundCorners = .top(radius: 10) case 2: attributesWrapper.attributes.roundCorners = .bottom(radius: 10) case 3: attributesWrapper.attributes.roundCorners = .all(radius: 10) default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/SafeAreaSelectionTableViewCell.swift ================================================ // // SafeAreaSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final class SafeAreaSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Safe Area Adjustment" descriptionValue = "Describes whether the entry overrides / ignore safe area insets" insertSegments(by: ["Colored", "Uncolored", "Override"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.positionConstraints.safeArea { case .empty(fillSafeArea: let fill) where fill: segmentedControl.selectedSegmentIndex = 0 case .empty(fillSafeArea: let fill) where !fill: segmentedControl.selectedSegmentIndex = 1 case .overridden: segmentedControl.selectedSegmentIndex = 2 default: break } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.positionConstraints.safeArea = .empty(fillSafeArea: true) case 1: attributesWrapper.attributes.positionConstraints.safeArea = .empty(fillSafeArea: false) case 2: attributesWrapper.attributes.positionConstraints.safeArea = .overridden default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/ScrollSelectionTableViewCell.swift ================================================ // // ScrollSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final class ScrollSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Scroll Behavior" descriptionValue = "Describes whether the entry is vertically scrollable" insertSegments(by: ["Loosed", "Disabled", "One Side"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.scroll { case .enabled: segmentedControl.selectedSegmentIndex = 0 case .disabled: segmentedControl.selectedSegmentIndex = 1 case .edgeCrossingDisabled: segmentedControl.selectedSegmentIndex = 2 } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.scroll = .enabled(swipeable: true, pullbackAnimation: .jolt) case 1: attributesWrapper.attributes.scroll = .disabled case 2: attributesWrapper.attributes.scroll = .edgeCrossingDisabled(swipeable: true) default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/SelectionHeaderView.swift ================================================ // // SelectionHeaderView.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/26/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit import SwiftEntryKit final class SelectionHeaderView: UITableViewHeaderFooterView { var text: String { set { textLabel?.text = newValue } get { return textLabel?.text ?? "" } } var displayMode = EKAttributes.DisplayMode.inferred { didSet { setupInterfaceStyle() } } override init(reuseIdentifier: String?) { super.init(reuseIdentifier: reuseIdentifier) backgroundView = UIView() textLabel?.font = MainFont.bold.with(size: 17) setupInterfaceStyle() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupInterfaceStyle() { backgroundView?.backgroundColor = EKColor.headerBackground.color( for: traitCollection, mode: PresetsDataSource.displayMode ) textLabel?.textColor = EKColor.standardContent.with(alpha: 0.8).color( for: traitCollection, mode: PresetsDataSource.displayMode ) } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupInterfaceStyle() } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/SelectionTableViewCell.swift ================================================ // // SelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/23/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit import SwiftEntryKit class SelectionBaseCell: UITableViewCell { func configure(attributesWrapper: EntryAttributeWrapper) {} } class SelectionTableViewCell: SelectionBaseCell { enum Focus: String { case entry case screen } enum Setting { case position case windowLevel } private let titleLabel = UILabel() private let descriptionLabel = UILabel() let segmentedControl = UISegmentedControl() var attributesWrapper: EntryAttributeWrapper! var attributes: EKAttributes { return attributesWrapper.attributes } var titleValue: String { set { titleLabel.text = newValue } get { return titleLabel.text ?? "" } } var descriptionValue: String { set { descriptionLabel.text = newValue } get { return descriptionLabel.text ?? "" } } override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) setupTitleLabel() setupDescriptionLabel() setupSegmentedControl() setupInterfaceStyle() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupTitleLabel() { contentView.addSubview(titleLabel) titleLabel.font = MainFont.bold.with(size: 18) titleLabel.layoutToSuperview(.top, offset: 20) titleLabel.layoutToSuperview(axis: .horizontally, offset: 20) titleLabel.forceContentWrap(.vertically) } private func setupDescriptionLabel() { contentView.addSubview(descriptionLabel) descriptionLabel.font = MainFont.light.with(size: 15) descriptionLabel.numberOfLines = 0 descriptionLabel.layout(.top, to: .bottom, of: titleLabel, offset: 10) descriptionLabel.layoutToSuperview(axis: .horizontally, offset: 20) descriptionLabel.forceContentWrap(.vertically) } private func setupSegmentedControl() { contentView.addSubview(segmentedControl) segmentedControl.setTitleTextAttributes( [NSAttributedString.Key.font: MainFont.light.with(size: 15)], for: .normal ) segmentedControl.setTitleTextAttributes( [NSAttributedString.Key.font: MainFont.medium.with(size: 15)], for: .selected ) segmentedControl.addTarget( self, action: #selector(segmentChanged), for: .valueChanged ) segmentedControl.layout(.top, to: .bottom, of: descriptionLabel, offset: 10) segmentedControl.layoutToSuperview(axis: .horizontally, offset: 20) segmentedControl.layoutToSuperview(.bottom, offset: -20) } override func configure(attributesWrapper: EntryAttributeWrapper) { segmentedControl.removeAllSegments() self.attributesWrapper = attributesWrapper } func insertSegments(by array: [String]) { for (index, info) in array.enumerated() { segmentedControl.insertSegment(withTitle: info, at: index, animated: false) } } @objc func segmentChanged() {} private func setupInterfaceStyle() { contentView.backgroundColor = EKColor.standardBackground.color( for: traitCollection, mode: PresetsDataSource.displayMode ) segmentedControl.tintColor = EKColor.segmentedControlTint.color( for: traitCollection, mode: PresetsDataSource.displayMode ) segmentedControl.setTitleTextAttributes( [NSAttributedString.Key.foregroundColor: EKColor.standardContent.color( for: traitCollection, mode: PresetsDataSource.displayMode ) ], for: .normal ) segmentedControl.setTitleTextAttributes( [NSAttributedString.Key.foregroundColor: EKColor.standardContent.inverted.color( for: traitCollection, mode: PresetsDataSource.displayMode ) ], for: .selected ) titleLabel.textColor = EKColor.standardContent.color( for: traitCollection, mode: PresetsDataSource.displayMode ) descriptionLabel.textColor = EKColor.standardContent.with(alpha: 0.8).color( for: traitCollection, mode: PresetsDataSource.displayMode ) } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupInterfaceStyle() } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/ShadowSelectionTableViewCell.swift ================================================ // // ShadowSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit import SwiftEntryKit final class ShadowSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Drop Shadow" descriptionValue = "A drop shadow effect that can be applied to the entry" insertSegments(by: ["Off", "On"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.shadow { case .none: segmentedControl.selectedSegmentIndex = 0 case .active(with: _): segmentedControl.selectedSegmentIndex = 1 } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.shadow = .none case 1: let value = EKAttributes.Shadow.Value(color: .black, opacity: 0.5, radius: 10, offset: .zero) attributesWrapper.attributes.shadow = .active(with: value) default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/UserInteractionSelectionTableViewCell.swift ================================================ // // UserInteractionSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit import SwiftEntryKit final class UserInteractionSelectionTableViewCell: SelectionTableViewCell { var focus: Focus = .entry private var interactionAction: EKAttributes.UserInteraction.Default { get { switch focus { case .entry: return attributesWrapper.attributes.entryInteraction.defaultAction case .screen: return attributesWrapper.attributes.screenInteraction.defaultAction } } set { switch focus { case .entry: attributesWrapper.attributes.entryInteraction.defaultAction = newValue case .screen: attributesWrapper.attributes.screenInteraction.defaultAction = newValue } } } func configure(attributesWrapper: EntryAttributeWrapper, focus: Focus) { self.focus = focus configure(attributesWrapper: attributesWrapper) } override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "\(focus.rawValue.capitalized) User Interaction" descriptionValue = "Describes what happens when the user taps the \(focus.rawValue). The touch can be absorbed, delay the exit, be forwarded to the window below, or dismiss the entry." insertSegments(by: ["Absorb", "Delay", "Forward", "Dismiss"]) selectSegment() } private func selectSegment() { switch interactionAction { case .absorbTouches: segmentedControl.selectedSegmentIndex = 0 case .delayExit(by: _): segmentedControl.selectedSegmentIndex = 1 case .forward: segmentedControl.selectedSegmentIndex = 2 case .dismissEntry: segmentedControl.selectedSegmentIndex = 3 } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: interactionAction = .absorbTouches case 1: interactionAction = .delayExit(by: 4) case 2: interactionAction = .forward case 3: interactionAction = .dismissEntry default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/WidthSelectionTableViewCell.swift ================================================ // // WidthSelectionTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final class WidthSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Width" descriptionValue = "Describes the entry's width inside the screen. It can be stretched to the margins, it can have an offset, can a constant or have a ratio to the screen" insertSegments(by: ["Stretch", "20pts Offset", "90% Screen"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.positionConstraints.size.width { case .offset(value: let value): if value == 0 { segmentedControl.selectedSegmentIndex = 0 } else { segmentedControl.selectedSegmentIndex = 1 } case .ratio(value: _): segmentedControl.selectedSegmentIndex = 2 default: break } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.positionConstraints.size.width = .offset(value: 0) case 1: attributesWrapper.attributes.positionConstraints.size.width = .offset(value: 20) case 2: attributesWrapper.attributes.positionConstraints.size.width = .ratio(value: 0.9) default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/Cells/WindowLevelSelectionTableViewCell.swift ================================================ // // WindowLevelTableViewCell.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/24/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final class WindowLevelSelectionTableViewCell: SelectionTableViewCell { override func configure(attributesWrapper: EntryAttributeWrapper) { super.configure(attributesWrapper: attributesWrapper) titleValue = "Window Level" descriptionValue = "Where the entry should be displayed in the application window hierarchy" insertSegments(by: ["Normal", "Status Bar", "Alerts"]) selectSegment() } private func selectSegment() { switch attributesWrapper.attributes.windowLevel { case .normal: segmentedControl.selectedSegmentIndex = 0 case .statusBar: segmentedControl.selectedSegmentIndex = 1 case .alerts: segmentedControl.selectedSegmentIndex = 2 default: break } } @objc override func segmentChanged() { switch segmentedControl.selectedSegmentIndex { case 0: attributesWrapper.attributes.windowLevel = .normal case 1: attributesWrapper.attributes.windowLevel = .statusBar case 2: attributesWrapper.attributes.windowLevel = .alerts default: break } } } ================================================ FILE: Example/SwiftEntryKit/Playground/EntryAttributeWrapper.swift ================================================ // // EntryAttributeWrapper.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/23/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import SwiftEntryKit class EntryAttributeWrapper { var attributes: EKAttributes init(with attributes: EKAttributes) { self.attributes = attributes } } ================================================ FILE: Example/SwiftEntryKit/Playground/PlaygroundViewController.swift ================================================ // // PlaygroundViewController.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/21/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit import SwiftEntryKit final class PlaygroundViewController: UIViewController { // MARK: - Types struct Cells { static let sectionTitles = ["Display", "Theme & Style", "Interaction", "Size & Position", "Animation"] static let header = SelectionHeaderView.self static let cells = [[PositionSelectionTableViewCell.self, WindowLevelSelectionTableViewCell.self, DisplayDurationSelectionTableViewCell.self, PrioritySelectionTableViewCell.self], [ShadowSelectionTableViewCell.self, RoundCornersSelectionTableViewCell.self, BorderSelectionTableViewCell.self, BackgroundStyleSelectionTableViewCell.self, BackgroundStyleSelectionTableViewCell.self], [UserInteractionSelectionTableViewCell.self, UserInteractionSelectionTableViewCell.self, ScrollSelectionTableViewCell.self, HapticFeedbackSelectionTableViewCell.self], [WidthSelectionTableViewCell.self, HeightSelectionTableViewCell.self, MaxWidthSelectionTableViewCell.self, SafeAreaSelectionTableViewCell.self], [AnimationSelectionTableViewCell.self, AnimationSelectionTableViewCell.self, AnimationSelectionTableViewCell.self]] } // MARK: - Properties private let tableView = UITableView() private lazy var attributesWrapper: EntryAttributeWrapper = { var attributes = EKAttributes() attributes.positionConstraints = .fullWidth attributes.hapticFeedbackType = .success attributes.positionConstraints.safeArea = .empty(fillSafeArea: true) attributes.entryBackground = .visualEffect(style: .standard) return EntryAttributeWrapper(with: attributes) }() // MARK: - Lifecycle & Setup override func viewDidLoad() { super.viewDidLoad() setupTableView() setupInterfaceStyle() } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupInterfaceStyle() } private func setupInterfaceStyle() { tableView.backgroundColor = EKColor.standardBackground.color( for: traitCollection, mode: PresetsDataSource.displayMode ) tableView.reloadData() } private func setupTableView() { view.addSubview(tableView) tableView.delegate = self tableView.dataSource = self tableView.allowsSelection = false tableView.estimatedRowHeight = UITableView.automaticDimension tableView.estimatedSectionHeaderHeight = UITableView.automaticDimension tableView.register(Cells.header, forHeaderFooterViewReuseIdentifier: Cells.header.className) Cells.cells.forEach { cells in cells.forEach { tableView.register($0, forCellReuseIdentifier: $0.className) } } tableView.fillSuperview() } // MARK: Actions @IBAction func play() { let title = EKProperty.LabelContent( text: "Hi there!", style: EKProperty.LabelStyle( font: MainFont.bold.with(size: 16), color: .black) ) let description = EKProperty.LabelContent( text: "Are you ready for some testing?", style: EKProperty.LabelStyle( font: MainFont.light.with(size: 14), color: .black ) ) let image = EKProperty.ImageContent( image: UIImage(named: "ic_info_outline")!, size: CGSize(width: 30, height: 30) ) let simpleMessage = EKSimpleMessage( image: image, title: title, description: description ) let notificationMessage = EKNotificationMessage(simpleMessage: simpleMessage) let contentView = EKNotificationMessageView(with: notificationMessage) SwiftEntryKit.display(entry: contentView, using: attributesWrapper.attributes) } } // MARK: - UITableViewDelegate, UITableViewDataSource extension PlaygroundViewController: UITableViewDelegate, UITableViewDataSource { private func selectionCell(by id: String, and indexPath: IndexPath) -> SelectionBaseCell { return tableView.dequeueReusableCell(withIdentifier: id, for: indexPath) as! SelectionBaseCell } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell: SelectionBaseCell cell = selectionCell(by: Cells.cells[indexPath.section][indexPath.row].className, and: indexPath) switch (indexPath.section, indexPath.row) { case (0, 0...3): cell.configure(attributesWrapper: attributesWrapper) case (1, 0...2): cell.configure(attributesWrapper: attributesWrapper) case (1, 3): let cell = cell as! BackgroundStyleSelectionTableViewCell cell.configure(attributesWrapper: attributesWrapper, focus: .screen) case (1, 4): let cell = cell as! BackgroundStyleSelectionTableViewCell cell.configure(attributesWrapper: attributesWrapper, focus: .entry) case (2, 0): let cell = cell as! UserInteractionSelectionTableViewCell cell.configure(attributesWrapper: attributesWrapper, focus: .screen) case (2, 1): let cell = cell as! UserInteractionSelectionTableViewCell cell.configure(attributesWrapper: attributesWrapper, focus: .entry) case (2, 2...4): cell.configure(attributesWrapper: attributesWrapper) case (3, 0...3): cell.configure(attributesWrapper: attributesWrapper) case (4, 0): let cell = cell as! AnimationSelectionTableViewCell cell.configure(attributesWrapper: attributesWrapper, action: .entrance) case (4, 1): let cell = cell as! AnimationSelectionTableViewCell cell.configure(attributesWrapper: attributesWrapper, action: .exit) case (4, 2): let cell = cell as! AnimationSelectionTableViewCell cell.configure(attributesWrapper: attributesWrapper, action: .pop) default: fatalError() } return cell } func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { let header = tableView.dequeueReusableHeaderFooterView(withIdentifier: Cells.header.className) as! SelectionHeaderView header.text = Cells.sectionTitles[section] return header } func numberOfSections(in tableView: UITableView) -> Int { return Cells.cells.count } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return Cells.cells[section].count } // iOS 9, 10 support func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat { return 80 } func tableView(_ tableView: UITableView, estimatedHeightForHeaderInSection section: Int) -> CGFloat { return 50 } } ================================================ FILE: Example/SwiftEntryKit/Presets/FormFieldPresetFactory.swift ================================================ // // FormFieldPresetFactory.swift // SwiftEntryKitDemo // // Created by Daniel Huri on 5/18/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import Foundation import SwiftEntryKit struct TextFieldOptionSet: OptionSet { let rawValue: Int static let fullName = TextFieldOptionSet(rawValue: 1 << 0) static let mobile = TextFieldOptionSet(rawValue: 1 << 1) static let email = TextFieldOptionSet(rawValue: 1 << 2) static let password = TextFieldOptionSet(rawValue: 1 << 3) } enum FormStyle { case light case metallic var buttonTitle: EKProperty.LabelStyle { return .init( font: MainFont.bold.with(size: 16), color: buttonTitleColor ) } var textColor: EKColor { switch self { case .metallic: return .white case .light: return .standardContent } } var buttonTitleColor: EKColor { switch self { case .metallic: return .black case .light: return .white } } var buttonBackground: EKColor { switch self { case .metallic: return .white case .light: return .redish } } var placeholder: EKProperty.LabelStyle { let font = MainFont.light.with(size: 14) switch self { case .metallic: return .init(font: font, color: UIColor(white: 0.8, alpha: 1).ekColor) case .light: return .init(font: font, color: UIColor(white: 0.5, alpha: 1).ekColor) } } var separator: EKColor { return UIColor(white: 0.8784, alpha: 0.6).ekColor } } final class FormFieldPresetFactory { private static var displayMode: EKAttributes.DisplayMode { return PresetsDataSource.displayMode } class func email(placeholderStyle: EKProperty.LabelStyle, textStyle: EKProperty.LabelStyle, separatorColor: EKColor, style: FormStyle) -> EKProperty.TextFieldContent { let emailPlaceholder = EKProperty.LabelContent( text: "Email Address", style: placeholderStyle ) return .init(keyboardType: .emailAddress, placeholder: emailPlaceholder, tintColor: style.textColor, displayMode: displayMode, textStyle: textStyle, leadingImage: UIImage(named: "ic_mail_light")!.withRenderingMode(.alwaysTemplate), bottomBorderColor: separatorColor, accessibilityIdentifier: "emailTextField") } class func fullName(placeholderStyle: EKProperty.LabelStyle, textStyle: EKProperty.LabelStyle, separatorColor: EKColor, style: FormStyle) -> EKProperty.TextFieldContent { let fullNamePlaceholder = EKProperty.LabelContent( text: "Full Name", style: placeholderStyle ) return .init(keyboardType: .namePhonePad, placeholder: fullNamePlaceholder, tintColor: style.textColor, displayMode: displayMode, textStyle: textStyle, leadingImage: UIImage(named: "ic_user_light")!.withRenderingMode(.alwaysTemplate), bottomBorderColor: separatorColor, accessibilityIdentifier: "nameTextField") } class func mobile(placeholderStyle: EKProperty.LabelStyle, textStyle: EKProperty.LabelStyle, separatorColor: EKColor, style: FormStyle) -> EKProperty.TextFieldContent { let mobilePlaceholder = EKProperty.LabelContent( text: "Mobile Phone", style: placeholderStyle ) return .init(keyboardType: .decimalPad, placeholder: mobilePlaceholder, tintColor: style.textColor, displayMode: displayMode, textStyle: textStyle, leadingImage: UIImage(named: "ic_phone_light")!.withRenderingMode(.alwaysTemplate), bottomBorderColor: separatorColor, accessibilityIdentifier: "mobilePhoneTextField") } class func password(placeholderStyle: EKProperty.LabelStyle, textStyle: EKProperty.LabelStyle, separatorColor: EKColor, style: FormStyle) -> EKProperty.TextFieldContent { let passwordPlaceholder = EKProperty.LabelContent(text: "Password", style: placeholderStyle) return .init(keyboardType: .namePhonePad, placeholder: passwordPlaceholder, tintColor: style.textColor, displayMode: displayMode, textStyle: textStyle, isSecure: true, leadingImage: UIImage(named: "ic_lock_light")!.withRenderingMode(.alwaysTemplate), bottomBorderColor: separatorColor, accessibilityIdentifier: "passwordTextField") } class func fields(by set: TextFieldOptionSet, style: FormStyle) -> [EKProperty.TextFieldContent] { var array: [EKProperty.TextFieldContent] = [] let placeholderStyle = style.placeholder let textStyle = EKProperty.LabelStyle( font: MainFont.light.with(size: 14), color: .standardContent, displayMode: displayMode ) let separatorColor = style.separator if set.contains(.fullName) { array.append(fullName(placeholderStyle: placeholderStyle, textStyle: textStyle, separatorColor: separatorColor, style: style)) } if set.contains(.mobile) { array.append(mobile(placeholderStyle: placeholderStyle, textStyle: textStyle, separatorColor: separatorColor, style: style)) } if set.contains(.email) { array.append(email(placeholderStyle: placeholderStyle, textStyle: textStyle, separatorColor: separatorColor, style: style)) } if set.contains(.password) { array.append(password(placeholderStyle: placeholderStyle, textStyle: textStyle, separatorColor: separatorColor, style: style)) } return array } } ================================================ FILE: Example/SwiftEntryKit/Presets/PresetTableViewCell.swift ================================================ // // PresetTableViewCell.swift // SwiftEntryKit // // Created by Daniel Huri on 04/14/2018. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import SwiftEntryKit import UIKit class PresetTableViewCell: UITableViewCell { // MARK: - Properties private let thumbImageView = UIImageView() private let titleLabel = UILabel() private let descriptionLabel = UILabel() var presetDescription: PresetDescription! { didSet { titleLabel.text = presetDescription.title descriptionLabel.text = presetDescription.description thumbImageView.image = UIImage(named: presetDescription.thumb) } } var displayMode: EKAttributes.DisplayMode = .inferred { didSet { setupInterfaceStyle() } } // MARK: - Setup override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) setupImageView() setupTitleLabel() setupDescriptionLabel() setupInterfaceStyle() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupImageView() { contentView.addSubview(thumbImageView) thumbImageView.contentMode = .scaleAspectFit thumbImageView.layoutToSuperview(.left, .top, offset: 16) thumbImageView.set(.width, .height, of: 50) } private func setupTitleLabel() { contentView.addSubview(titleLabel) titleLabel.font = MainFont.medium.with(size: 18) titleLabel.numberOfLines = 0 titleLabel.layout(.left, to: .right, of: thumbImageView, offset: 16) titleLabel.layout(to: .top, of: thumbImageView) titleLabel.layoutToSuperview(.right, offset: -12) } private func setupDescriptionLabel() { contentView.addSubview(descriptionLabel) descriptionLabel.font = MainFont.light.with(size: 14) descriptionLabel.numberOfLines = 0 descriptionLabel.layout(.top, to: .bottom, of: titleLabel, offset: 4) descriptionLabel.layout(to: .left, of: titleLabel) descriptionLabel.layout(to: .right, of: titleLabel) descriptionLabel.layoutToSuperview(.bottom, offset: -16) } private func setupInterfaceStyle() { contentView.backgroundColor = EKColor.standardBackground.color( for: traitCollection, mode: displayMode ) titleLabel.textColor = EKColor.standardContent.color( for: traitCollection, mode: displayMode ) descriptionLabel.textColor = EKColor.standardContent.with(alpha: 0.8).color( for: traitCollection, mode: displayMode ) } override func setHighlighted(_ highlighted: Bool, animated: Bool) { let color: EKColor = highlighted ? .selectedBackground : .standardBackground contentView.backgroundColor = color.color( for: traitCollection, mode: displayMode ) } override func setSelected(_ selected: Bool, animated: Bool) {} override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupInterfaceStyle() } } ================================================ FILE: Example/SwiftEntryKit/Presets/PresetsData/PresetDescription.swift ================================================ // // PresetDescription.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/24/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import SwiftEntryKit // Description of a single preset to be presented struct PresetDescription { let title: String let description: String let thumb: String let attributes: EKAttributes init(with attributes: EKAttributes, title: String, description: String = "", thumb: String) { self.attributes = attributes self.title = title self.description = description self.thumb = thumb } } ================================================ FILE: Example/SwiftEntryKit/Presets/PresetsData/PresetsDataSource.swift ================================================ // // PresetsDataSource.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/27/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import Foundation import SwiftEntryKit struct PresetsDataSource { // Cluster of presets, aggregated under name typealias Cluster = (title: String, data: [PresetDescription]) private enum ThumbDesc: String { case bottomToast = "ic_bottom_toast" case bottomFloat = "ic_bottom_float" case topToast = "ic_top_toast" case topFloat = "ic_top_float" case statusBarNote = "ic_sb_note" case topNote = "ic_top_note" case bottomPopup = "ic_bottom_popup" } private(set) var dataSource: [Cluster] = [] private(set) subscript(section: Int) -> Cluster { get { return dataSource[section] } set { return dataSource[section] = newValue } } private(set) subscript(section: Int, index: Int) -> PresetDescription { get { return dataSource[section].data[index] } set { return dataSource[section].data[index] = newValue } } static var displayMode = EKAttributes.DisplayMode.inferred private var displayMode: EKAttributes.DisplayMode { return PresetsDataSource.displayMode } // Cumputed for the sake of reusability var bottomAlertAttributes: EKAttributes { var attributes = EKAttributes.bottomFloat attributes.hapticFeedbackType = .success attributes.displayDuration = .infinity attributes.entryBackground = .color(color: .standardBackground) attributes.screenBackground = .color(color: .dimmedLightBackground) attributes.shadow = .active( with: .init( color: .black, opacity: 0.3, radius: 8 ) ) attributes.screenInteraction = .dismiss attributes.entryInteraction = .absorbTouches attributes.scroll = .enabled( swipeable: true, pullbackAnimation: .jolt ) attributes.roundCorners = .all(radius: 25) attributes.entranceAnimation = .init( translate: .init( duration: 0.7, spring: .init(damping: 1, initialVelocity: 0) ), scale: .init( from: 1.05, to: 1, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0) ) ) attributes.exitAnimation = .init( translate: .init(duration: 0.2) ) attributes.popBehavior = .animated( animation: .init( translate: .init(duration: 0.2) ) ) attributes.positionConstraints.verticalOffset = 10 attributes.positionConstraints.size = .init( width: .offset(value: 20), height: .intrinsic ) attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) attributes.statusBar = .dark return attributes } // MARK: Setup init() { setup() } mutating func setup() { dataSource = [] setupToastPresets() setupNotePresets() setupFloatPresets() setupPopupPresets() setupFormPresets() setupCustomPresets() } private mutating func setupToastPresets() { var toasts: [PresetDescription] = [] var attributes: EKAttributes var description: PresetDescription var descriptionString: String var descriptionThumb: String // Preset I attributes = .topToast attributes.hapticFeedbackType = .success attributes.displayMode = displayMode attributes.entryBackground = .color(color: Color.LightBlue.a700) attributes.entranceAnimation = .init( translate: .init(duration: 0.3), scale: .init(from: 1.07, to: 1, duration: 0.3) ) attributes.exitAnimation = .init(translate: .init(duration: 0.3)) attributes.statusBar = .hidden attributes.scroll = .edgeCrossingDisabled(swipeable: false) descriptionString = "Regular toast that appears at the top. Hides status Bar." descriptionThumb = ThumbDesc.topToast.rawValue description = .init( with: attributes, title: "Top I", description: descriptionString, thumb: descriptionThumb ) toasts.append(description) // Preset II attributes = .topToast attributes.hapticFeedbackType = .success attributes.displayMode = displayMode attributes.statusBar = .light attributes.entryBackground = .color(color: .chatMessage) attributes.entranceAnimation = .translation attributes.exitAnimation = .translation attributes.scroll = .edgeCrossingDisabled(swipeable: true) attributes.displayDuration = 4 attributes.shadow = .active( with: .init( color: .chatMessage, opacity: 0.5, radius: 10 ) ) descriptionString = "Chat message style toast" descriptionThumb = ThumbDesc.topToast.rawValue description = .init( with: attributes, title: "Top II", description: descriptionString, thumb: descriptionThumb ) toasts.append(description) // Preset III attributes = .bottomToast attributes.displayMode = displayMode attributes.entryBackground = .visualEffect(style: .standard) attributes.scroll = .edgeCrossingDisabled(swipeable: true) attributes.statusBar = .dark descriptionString = "Regular bottom toast with blurred background" descriptionThumb = ThumbDesc.bottomToast.rawValue description = .init( with: attributes, title: "Bottom I", description: descriptionString, thumb: descriptionThumb ) toasts.append(description) // Preset IV attributes = .bottomToast attributes.displayMode = displayMode attributes.windowLevel = .normal attributes.entryBackground = .color(color: EKColor.standardBackground.with(alpha: 0.98)) attributes.scroll = .edgeCrossingDisabled(swipeable: true) attributes.statusBar = .dark descriptionString = "Bottom toast without an image, appears below the status bar" descriptionThumb = ThumbDesc.bottomToast.rawValue description = .init( with: attributes, title: "Bottom II", description: descriptionString, thumb: descriptionThumb ) toasts.append(description) dataSource.append(("Toasts", toasts)) } private mutating func setupNotePresets() { var notes: [PresetDescription] = [] var attributes: EKAttributes var description: PresetDescription var descriptionString: String var descriptionThumb: String // Preset I attributes = .topNote attributes.displayMode = displayMode attributes.name = "Top Note" attributes.hapticFeedbackType = .success attributes.popBehavior = .animated(animation: .translation) attributes.entryBackground = .color(color: .satCyan) attributes.shadow = .active( with: .init( color: .chatMessage, opacity: 0.5, radius: 2 ) ) attributes.statusBar = .light attributes.lifecycleEvents.willAppear = { print("will appear action goes here") } attributes.lifecycleEvents.didAppear = { print("did appear action goes here") } attributes.lifecycleEvents.willDisappear = { print("will disappear action goes here") } attributes.lifecycleEvents.didDisappear = { print("did disappear action goes here") } descriptionString = "Absorbs (swallows) touches and the status bar becomes light" descriptionThumb = ThumbDesc.topNote.rawValue description = .init( with: attributes, title: "Top Standard Note", description: descriptionString, thumb: descriptionThumb ) notes.append(description) // Preset II attributes = .topNote attributes.displayMode = displayMode attributes.hapticFeedbackType = .success attributes.displayDuration = .infinity attributes.popBehavior = .animated(animation: .translation) attributes.entryBackground = .color(color: .pinky) attributes.statusBar = .light descriptionString = "Appears for an infinite duration" descriptionThumb = ThumbDesc.topNote.rawValue description = .init( with: attributes, title: "Top Processing Note", description: descriptionString, thumb: descriptionThumb ) notes.append(description) // Preset III attributes = .topNote attributes.displayMode = displayMode attributes.hapticFeedbackType = .error attributes.displayDuration = 3 attributes.popBehavior = .animated(animation: .translation) attributes.entryBackground = .color(color: Color.Purple.deep) attributes.statusBar = .light descriptionString = "Appears for 3 seconds. Generates error notification haptic feedback" descriptionThumb = ThumbDesc.topNote.rawValue description = .init( with: attributes, title: "Top Image Note", description: descriptionString, thumb: descriptionThumb ) notes.append(description) // Preset IV attributes = .topNote attributes.displayMode = displayMode attributes.hapticFeedbackType = .success attributes.displayDuration = 5 attributes.popBehavior = .animated(animation: .translation) attributes.entryBackground = .color(color: .white) attributes.statusBar = .dark attributes.shadow = .active( with: .init( opacity: 0.2, radius: 1 ) ) descriptionString = """ Appears for 5 seconds. Has a thin shadow. Displays image animation. \ Generates success notification haptic feedback """ descriptionThumb = ThumbDesc.topNote.rawValue description = .init( with: attributes, title: "Top Animating Image Note", description: descriptionString, thumb: descriptionThumb ) notes.append(description) // Preset V attributes = .statusBar attributes.displayMode = displayMode attributes.hapticFeedbackType = .success attributes.popBehavior = .animated(animation: .translation) attributes.entryBackground = .color(color: .greenGrass) descriptionString = "Overrides the status bar" descriptionThumb = ThumbDesc.statusBarNote.rawValue description = .init( with: attributes, title: "Status Bar Note", description: descriptionString, thumb: descriptionThumb ) notes.append(description) // Preset VI attributes = .bottomNote attributes.displayMode = displayMode attributes.hapticFeedbackType = .success attributes.shadow = .active( with: .init( color: .black, opacity: 0.3, radius: 6 ) ) attributes.entryBackground = .gradient( gradient: .init( colors: [Color.Purple.a300, Color.Purple.a400, Color.Purple.a700], startPoint: .zero, endPoint: CGPoint(x: 1, y: 1) ) ) attributes.statusBar = .dark descriptionString = "Presented at the bottom / Above the notch" descriptionThumb = ThumbDesc.bottomToast.rawValue description = .init( with: attributes, title: "Bottom Standard Note", description: descriptionString, thumb: descriptionThumb ) notes.append(description) dataSource.append(("Notes", notes)) } private mutating func setupFloatPresets() { var floats: [PresetDescription] = [] var description: PresetDescription var attributes: EKAttributes var descriptionString: String var descriptionThumb: String // Preset I attributes = .topFloat attributes.displayMode = displayMode attributes.hapticFeedbackType = .success attributes.entryBackground = .gradient( gradient: .init( colors: [.amber, .pinky], startPoint: .zero, endPoint: CGPoint(x: 1, y: 1) ) ) attributes.popBehavior = .animated( animation: .init( translate: .init(duration: 0.3), scale: .init(from: 1, to: 0.7, duration: 0.7) ) ) attributes.shadow = .active( with: .init( color: .black, opacity: 0.5, radius: 10 ) ) attributes.statusBar = .dark attributes.scroll = .enabled( swipeable: true, pullbackAnimation: .easeOut ) attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) descriptionString = "Top float with gradient background" descriptionThumb = ThumbDesc.topFloat.rawValue description = .init( with: attributes, title: "Top", description: descriptionString, thumb: descriptionThumb ) floats.append(description) // Preset II attributes = .bottomFloat attributes.displayMode = displayMode attributes.hapticFeedbackType = .success attributes.entryBackground = .gradient( gradient: .init( colors: [Color.BlueGradient.dark, Color.BlueGradient.light], startPoint: .zero, endPoint: CGPoint(x: 1, y: 1) ) ) attributes.entryInteraction = .delayExit(by: 3) attributes.scroll = .enabled( swipeable: true, pullbackAnimation: .jolt ) attributes.statusBar = .dark attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) descriptionString = "Bottom float with gradient background. Touches delay exit" descriptionThumb = ThumbDesc.bottomFloat.rawValue description = .init( with: attributes, title: "Bottom", description: descriptionString, thumb: descriptionThumb ) floats.append(description) dataSource.append(("Floats", floats)) } private mutating func setupPopupPresets() { var presets: [PresetDescription] = [] var attributes: EKAttributes var description: PresetDescription var descriptionString: String var descriptionThumb: String // Preset I attributes = bottomAlertAttributes attributes.displayMode = displayMode attributes.entryBackground = .color(color: .musicBackground) descriptionString = "Bottom floating popup with dimmed background." descriptionThumb = ThumbDesc.bottomPopup.rawValue description = .init( with: attributes, title: "Pop Up I", description: descriptionString, thumb: descriptionThumb ) presets.append(description) // Preset II attributes = EKAttributes.centerFloat attributes.hapticFeedbackType = .success attributes.displayDuration = .infinity attributes.entryBackground = .gradient( gradient: .init( colors: [EKColor(rgb: 0xfffbd5), EKColor(rgb: 0xb20a2c)], startPoint: .zero, endPoint: CGPoint(x: 1, y: 1) ) ) attributes.screenBackground = .color(color: .dimmedDarkBackground) attributes.shadow = .active( with: .init( color: .black, opacity: 0.3, radius: 8 ) ) attributes.screenInteraction = .dismiss attributes.entryInteraction = .absorbTouches attributes.scroll = .enabled( swipeable: true, pullbackAnimation: .jolt ) attributes.roundCorners = .all(radius: 8) attributes.entranceAnimation = .init( translate: .init( duration: 0.7, spring: .init(damping: 0.7, initialVelocity: 0) ), scale: .init( from: 0.7, to: 1, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0) ) ) attributes.exitAnimation = .init( translate: .init(duration: 0.2) ) attributes.popBehavior = .animated( animation: .init( translate: .init(duration: 0.35) ) ) attributes.positionConstraints.size = .init( width: .offset(value: 20), height: .intrinsic ) attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) attributes.statusBar = .dark descriptionString = "Centeralized floating popup with dimmed background" descriptionThumb = ThumbDesc.bottomPopup.rawValue description = .init( with: attributes, title: "Pop Up II", description: descriptionString, thumb: descriptionThumb ) presets.append(description) // Preset III attributes = bottomAlertAttributes attributes.displayMode = displayMode attributes.scroll = .edgeCrossingDisabled(swipeable: true) attributes.entranceAnimation = .init( translate: .init( duration: 0.5, spring: .init(damping: 1, initialVelocity: 0) ) ) attributes.entryBackground = .gradient( gradient: .init( colors: [Color.LightPink.first, Color.LightPink.last], startPoint: .zero, endPoint: CGPoint(x: 1, y: 1) ) ) attributes.positionConstraints = .fullWidth attributes.positionConstraints.safeArea = .empty(fillSafeArea: true) attributes.roundCorners = .top(radius: 20) descriptionString = "Bottom toast popup with gradient background" descriptionThumb = ThumbDesc.bottomPopup.rawValue description = .init( with: attributes, title: "Pop Up III", description: descriptionString, thumb: descriptionThumb ) presets.append(description) // Preset IV attributes = .topFloat attributes.displayMode = displayMode attributes.hapticFeedbackType = .success attributes.statusBar = .dark attributes.displayDuration = .infinity attributes.screenInteraction = .dismiss attributes.entryInteraction = .absorbTouches attributes.scroll = .enabled( swipeable: true, pullbackAnimation: .jolt ) attributes.screenBackground = .color(color: .dimmedLightBackground) attributes.entryBackground = .color(color: .white) attributes.entranceAnimation = .init( translate: .init( duration: 0.7, spring: .init(damping: 1, initialVelocity: 0) ), scale: .init( from: 0.6, to: 1, duration: 0.7 ), fade: .init( from: 0.8, to: 1, duration: 0.3 ) ) attributes.exitAnimation = .init( scale: .init( from: 1, to: 0.7, duration: 0.3 ), fade: .init( from: 1, to: 0, duration: 0.3 ) ) attributes.border = .value(color: .black, width: 0.5) attributes.shadow = .active( with: .init( color: .black, opacity: 0.5, radius: 5 ) ) attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) descriptionString = "Top floating alert view with button bar. Smooths in animately." descriptionThumb = ThumbDesc.topFloat.rawValue description = .init( with: attributes, title: "Top Alert View", description: descriptionString, thumb: descriptionThumb ) presets.append(description) // Preset V attributes = .centerFloat attributes.displayMode = displayMode attributes.windowLevel = .alerts attributes.displayDuration = .infinity attributes.hapticFeedbackType = .success attributes.screenInteraction = .absorbTouches attributes.entryInteraction = .absorbTouches attributes.scroll = .disabled attributes.screenBackground = .color(color: .dimmedLightBackground) attributes.entryBackground = .color(color: .white) attributes.entranceAnimation = .init( scale: .init( from: 0.9, to: 1, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0) ), fade: .init( from: 0, to: 1, duration: 0.3 ) ) attributes.exitAnimation = .init( fade: .init( from: 1, to: 0, duration: 0.2 ) ) attributes.shadow = .active( with: .init( color: .black, opacity: 0.3, radius: 5 ) ) attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) descriptionString = "Center floating alert view with button bar." descriptionThumb = ThumbDesc.topFloat.rawValue description = .init( with: attributes, title: "Center Alert View", description: descriptionString, thumb: descriptionThumb ) presets.append(description) // Preset VI attributes = .centerFloat attributes.displayMode = displayMode attributes.windowLevel = .alerts attributes.displayDuration = .infinity attributes.hapticFeedbackType = .success attributes.screenInteraction = .absorbTouches attributes.entryInteraction = .absorbTouches attributes.scroll = .disabled attributes.screenBackground = .color(color: .dimmedLightBackground) attributes.entryBackground = .visualEffect(style: .standard) attributes.entranceAnimation = .init( scale: .init( from: 0.9, to: 1, duration: 0.4, spring: .init(damping: 0.8, initialVelocity: 0) ), fade: .init( from: 0, to: 1, duration: 0.3 ) ) attributes.exitAnimation = .init( scale: .init( from: 1, to: 0.4, duration: 0.4, spring: .init(damping: 1, initialVelocity: 0) ), fade: .init( from: 1, to: 0, duration: 0.2 ) ) attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) descriptionString = "Appears in the center. Fun, expressive, and rich with animations" descriptionThumb = ThumbDesc.bottomPopup.rawValue description = .init( with: attributes, title: "Service Rating", description: descriptionString, thumb: descriptionThumb ) presets.append(description) dataSource.append(("Alerts & Popups", presets)) } private mutating func setupFormPresets() { var presets: [PresetDescription] = [] var attributes: EKAttributes var description: PresetDescription var descriptionString: String var descriptionThumb: String // Preset I attributes = .float attributes.displayMode = displayMode attributes.windowLevel = .normal attributes.position = .top attributes.displayDuration = .infinity attributes.entranceAnimation = .init( translate: .init( duration: 0.65, spring: .init(damping: 0.8, initialVelocity: 0) ) ) attributes.exitAnimation = .init( translate: .init( duration: 0.65, spring: .init(damping: 0.8, initialVelocity: 0) ) ) attributes.popBehavior = .animated( animation: .init( translate: .init( duration: 0.65, spring: .init(damping: 0.8, initialVelocity: 0) ) ) ) attributes.entryInteraction = .absorbTouches attributes.screenInteraction = .dismiss attributes.entryBackground = .visualEffect(style: .standard) attributes.screenBackground = .color(color: .dimmedDarkBackground) attributes.scroll = .enabled( swipeable: false, pullbackAnimation: .jolt ) attributes.statusBar = .light attributes.positionConstraints.keyboardRelation = .bind( offset: .init( bottom: 10, screenEdgeResistance: 5 ) ) attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) descriptionString = """ Keeps 10pts offset and resist screen top edge with 5pts offset. \ Dismissed with background tap. """ descriptionThumb = ThumbDesc.bottomPopup.rawValue description = .init( with: attributes, title: "Top Float", description: descriptionString, thumb: descriptionThumb ) presets.append(description) // Preset II attributes = .float attributes.displayMode = displayMode attributes.windowLevel = .normal attributes.position = .center attributes.displayDuration = .infinity attributes.entranceAnimation = .init( translate: .init( duration: 0.65, anchorPosition: .bottom, spring: .init(damping: 1, initialVelocity: 0) ) ) attributes.exitAnimation = .init( translate: .init( duration: 0.65, anchorPosition: .top, spring: .init(damping: 1, initialVelocity: 0) ) ) attributes.popBehavior = .animated( animation: .init( translate: .init( duration: 0.65, spring: .init(damping: 1, initialVelocity: 0) ) ) ) attributes.entryInteraction = .absorbTouches attributes.screenInteraction = .dismiss attributes.entryBackground = .color(color: .standardBackground) attributes.screenBackground = .color(color: .dimmedDarkBackground) attributes.border = .value( color: UIColor(white: 0.6, alpha: 1), width: 1 ) attributes.shadow = .active( with: .init( color: .black, opacity: 0.3, radius: 3 ) ) attributes.scroll = .enabled( swipeable: false, pullbackAnimation: .jolt ) attributes.statusBar = .light attributes.positionConstraints.keyboardRelation = .bind( offset: .init( bottom: 15, screenEdgeResistance: 0 ) ) attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) descriptionString = """ Keeps 15pts offset. Resists screen top edge \ (Could not exceed screen top bounds when the keyboard is open). \ Dismissed with background tap. """ descriptionThumb = ThumbDesc.bottomPopup.rawValue description = .init( with: attributes, title: "Center Float", description: descriptionString, thumb: descriptionThumb ) presets.append(description) // Preset III attributes = .toast attributes.displayMode = displayMode attributes.windowLevel = .normal attributes.position = .bottom attributes.displayDuration = .infinity attributes.entranceAnimation = .init( translate: .init( duration: 0.65, spring: .init(damping: 1, initialVelocity: 0) ) ) attributes.exitAnimation = .init( translate: .init( duration: 0.65, spring: .init(damping: 1, initialVelocity: 0) ) ) attributes.popBehavior = .animated( animation: .init( translate: .init( duration: 0.65, spring: .init(damping: 1, initialVelocity: 0) ) ) ) attributes.entryInteraction = .absorbTouches attributes.screenInteraction = .dismiss attributes.entryBackground = .gradient( gradient: .init( colors: [Color.Netflix.light, Color.Netflix.dark], startPoint: .zero, endPoint: CGPoint(x: 1, y: 1) ) ) attributes.shadow = .active( with: .init( color: .black, opacity: 0.3, radius: 3 ) ) attributes.screenBackground = .color(color: .dimmedDarkBackground) attributes.scroll = .edgeCrossingDisabled(swipeable: true) attributes.statusBar = .light attributes.positionConstraints.keyboardRelation = .bind( offset: .init( bottom: 0, screenEdgeResistance: 0 ) ) attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) descriptionString = "Keeps 10pts offset and resists screen top edge. Can be dismissed using swipe." descriptionThumb = ThumbDesc.bottomPopup.rawValue description = .init( with: attributes, title: "Bottom Toast", description: descriptionString, thumb: descriptionThumb ) presets.append(description) dataSource.append(("Forms", presets)) } private mutating func setupCustomPresets() { var presets: [PresetDescription] = [] var attributes: EKAttributes var description: PresetDescription var descriptionString: String var descriptionThumb: String // Preset I attributes = .bottomFloat attributes.displayMode = displayMode attributes.displayDuration = .infinity attributes.screenBackground = .color(color: .dimmedLightBackground) attributes.entryBackground = .color(color: .white) attributes.screenInteraction = .dismiss attributes.entryInteraction = .absorbTouches attributes.scroll = .edgeCrossingDisabled(swipeable: true) attributes.entranceAnimation = .init( translate: .init( duration: 0.5, spring: .init(damping: 1, initialVelocity: 0) ) ) attributes.exitAnimation = .init( translate: .init(duration: 0.35) ) attributes.popBehavior = .animated( animation: .init( translate: .init(duration: 0.35) ) ) attributes.shadow = .active( with: .init( color: .black, opacity: 0.3, radius: 6 ) ) attributes.positionConstraints.size = .init( width: .fill, height: .ratio(value: 0.6) ) attributes.positionConstraints.verticalOffset = 0 attributes.positionConstraints.safeArea = .overridden attributes.statusBar = .dark descriptionString = "Navigation flow with multiple view controllers" descriptionThumb = ThumbDesc.bottomPopup.rawValue description = .init( with: attributes, title: "Navigation Flow", description: descriptionString, thumb: descriptionThumb ) presets.append(description) // Preset II attributes = .bottomFloat attributes.displayMode = displayMode attributes.hapticFeedbackType = .success attributes.displayDuration = 3 attributes.screenBackground = .clear attributes.entryBackground = .clear attributes.screenInteraction = .forward attributes.entryInteraction = .absorbTouches attributes.entranceAnimation = .init( translate: .init( duration: 0.5, spring: .init(damping: 0.9, initialVelocity: 0) ), scale: .init( from: 0.8, to: 1, duration: 0.5, spring: .init(damping: 0.8, initialVelocity: 0) ), fade: .init( from: 0.7, to: 1, duration: 0.3 ) ) attributes.exitAnimation = .init( translate: .init(duration: 0.5), scale: .init( from: 1, to: 0.8, duration: 0.5 ), fade: .init( from: 1, to: 0, duration: 0.5 ) ) attributes.popBehavior = .animated( animation: .init( translate: .init( duration: 0.3 ), scale: .init( from: 1, to: 0.8, duration: 0.3 ) ) ) attributes.shadow = .active( with: .init( color: .black, opacity: 0.3, radius: 6 ) ) attributes.positionConstraints.verticalOffset = 10 attributes.positionConstraints.size = .init( width: .offset(value: 20), height: .intrinsic ) attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) attributes.statusBar = .dark descriptionString = "Customized UIViewController that is using an injected view" descriptionThumb = ThumbDesc.bottomFloat.rawValue description = .init( with: attributes, title: "View Controller", description: descriptionString, thumb: descriptionThumb ) presets.append(description) // Preset III attributes = .bottomFloat attributes.displayMode = displayMode attributes.hapticFeedbackType = .success attributes.displayDuration = 3 attributes.screenBackground = .clear attributes.entryBackground = .clear attributes.screenInteraction = .forward attributes.entryInteraction = .absorbTouches attributes.entranceAnimation = .init( translate: .init( duration: 0.5, spring: .init(damping: 0.9, initialVelocity: 0) ), scale: .init( from: 0.8, to: 1, duration: 0.5, spring: .init(damping: 0.8, initialVelocity: 0) ), fade: .init( from: 0.7, to: 1, duration: 0.3 ) ) attributes.exitAnimation = .init( translate: .init( duration: 0.5 ), scale: .init( from: 1, to: 0.8, duration: 0.5 ), fade: .init( from: 1, to: 0, duration: 0.5 ) ) attributes.popBehavior = .animated( animation: .init( translate: .init( duration: 0.3 ), scale: .init( from: 1, to: 0.8, duration: 0.3 ) ) ) attributes.shadow = .active( with: .init( color: .black, opacity: 0.3, radius: 6 ) ) attributes.positionConstraints.verticalOffset = 10 attributes.positionConstraints.size = .init( width: .offset(value: 20), height: .intrinsic ) attributes.positionConstraints.maxSize = .init( width: .constant(value: UIScreen.main.minEdge), height: .intrinsic ) attributes.statusBar = .ignored descriptionString = """ Customized view that is initialized by a nib file, \ it is additionally added various attributes such as round corners and a mild shadow """ descriptionThumb = ThumbDesc.bottomFloat.rawValue description = .init( with: attributes, title: "View from Nib", description: descriptionString, thumb: descriptionThumb ) presets.append(description) dataSource.append(("Custom", presets)) } } ================================================ FILE: Example/SwiftEntryKit/Presets/PresetsViewController.swift ================================================ // // PresetsViewController.swift // SwiftEntryKit // // Created by Daniel Huri on 04/14/2018. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import SwiftEntryKit import UIKit /** This view controller offers presets to choose from */ class PresetsViewController: UIViewController { enum DisplayModeSegment: Int { case light case dark case inferred var displayMode: EKAttributes.DisplayMode { switch self { case .light: return .light case .dark: return .dark case .inferred: return .inferred } } } // MARK: - Properties private var displayMode: EKAttributes.DisplayMode { return PresetsDataSource.displayMode } private var dataSource = PresetsDataSource() private let tableView = UITableView() @IBOutlet private var displayModeSegmentedControl: UISegmentedControl! override var preferredStatusBarStyle: UIStatusBarStyle { switch PresetsDataSource.displayMode { case .dark: return .lightContent case .light: if #available(iOS 13, *) { return .darkContent } else { return .default } case .inferred: return super.preferredStatusBarStyle } } // MARK: - Lifecycle & Setup override func viewDidLoad() { super.viewDidLoad() setupInterfaceStyle() setupTableView() displayModeSegmentedControl.selectedSegmentIndex = DisplayModeSegment.inferred.rawValue } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupInterfaceStyle() } @IBAction private func displayModeSegmentedControlValueChanged() { guard let segment = DisplayModeSegment(rawValue: displayModeSegmentedControl.selectedSegmentIndex) else { return } PresetsDataSource.displayMode = segment.displayMode dataSource.setup() setupInterfaceStyle() tableView.reloadData() } private func setupInterfaceStyle() { navigationController?.navigationBar.titleTextAttributes = [ NSAttributedString.Key.foregroundColor: EKColor.standardContent.color( for: traitCollection, mode: PresetsDataSource.displayMode ) ] navigationController?.navigationBar.tintColor = EKColor.navigationItemColor.color( for: traitCollection, mode: PresetsDataSource.displayMode ) navigationController?.navigationBar.barTintColor = EKColor.navigationBackgroundColor.color( for: traitCollection, mode: PresetsDataSource.displayMode ) displayModeSegmentedControl.setTitleTextAttributes( [NSAttributedString.Key.foregroundColor: EKColor.standardContent.color( for: traitCollection, mode: PresetsDataSource.displayMode ) ], for: .normal ) displayModeSegmentedControl.setTitleTextAttributes( [NSAttributedString.Key.foregroundColor: EKColor.standardContent.color( for: traitCollection, mode: PresetsDataSource.displayMode ) ], for: .selected ) displayModeSegmentedControl.tintColor = EKColor.selectedBackground.color( for: traitCollection, mode: PresetsDataSource.displayMode ) view.backgroundColor = EKColor.standardBackground.color( for: traitCollection, mode: PresetsDataSource.displayMode ) tableView.backgroundColor = EKColor.standardBackground.color( for: traitCollection, mode: PresetsDataSource.displayMode ) tableView.separatorColor = EKColor.standardContent.with(alpha: 0.3).color( for: traitCollection, mode: PresetsDataSource.displayMode ) // Just in case view-controller-based-status-bar-appearance is being tinkered with UIApplication.shared.statusBarStyle = preferredStatusBarStyle setNeedsStatusBarAppearanceUpdate() } private func setupTableView() { view.addSubview(tableView) tableView.estimatedRowHeight = UITableView.automaticDimension tableView.estimatedSectionHeaderHeight = UITableView.automaticDimension tableView.register( PresetTableViewCell.self, forCellReuseIdentifier: PresetTableViewCell.className ) tableView.register( SelectionHeaderView.self, forHeaderFooterViewReuseIdentifier: SelectionHeaderView.className ) tableView.dataSource = self tableView.delegate = self tableView.fillSuperview() } // MARK: Entry Samples // Bumps a standard note private func showNote(attributes: EKAttributes) { let text = "Pssst! I have something to tell you..." let style = EKProperty.LabelStyle( font: MainFont.light.with(size: 14), color: .white, alignment: .center ) let labelContent = EKProperty.LabelContent( text: text, style: style ) let contentView = EKNoteMessageView(with: labelContent) SwiftEntryKit.display(entry: contentView, using: attributes) } private func showImageNote(attributes: EKAttributes) { let text = "The thrill is gone" let style = EKProperty.LabelStyle( font: MainFont.light.with(size: 14), color: .white, alignment: .center, displayMode: displayMode ) let labelContent = EKProperty.LabelContent( text: text, style: style ) let imageContent = EKProperty.ImageContent( image: UIImage(named: "ic_wifi")!, displayMode: displayMode ) let contentView = EKImageNoteMessageView( with: labelContent, imageContent: imageContent ) SwiftEntryKit.display(entry: contentView, using: attributes) } private func showAnimatingImageNote(attributes: EKAttributes) { let text = "Up and charge" let style = EKProperty.LabelStyle( font: MainFont.light.with(size: 14), color: .black, alignment: .center, displayMode: displayMode ) let labelContent = EKProperty.LabelContent( text: text, style: style ) let sequence = (0...5).map { "battery\($0)" } let animationDuration: TimeInterval = 1 let animation = EKProperty.ImageContent.TransformAnimation.animate( duration: animationDuration, options: [.curveEaseInOut], transform: .init(scaleX: 1.1, y: 1.1) ) let imageContent = EKProperty.ImageContent( imagesNames: sequence, imageSequenceAnimationDuration: animationDuration, displayMode: displayMode, animation: animation, size: CGSize(width: 16, height: 16), tint: .black, contentMode: .scaleAspectFit ) let contentView = EKImageNoteMessageView( with: labelContent, imageContent: imageContent ) SwiftEntryKit.display(entry: contentView, using: attributes) } private func showProcessingNote(attributes: EKAttributes) { let text = "Waiting for the goodies to arrive!" let style = EKProperty.LabelStyle( font: MainFont.light.with(size: 14), color: .white, alignment: .center, displayMode: displayMode ) let labelContent = EKProperty.LabelContent( text: text, style: style ) let contentView = EKProcessingNoteMessageView( with: labelContent, activityIndicator: .white ) SwiftEntryKit.display(entry: contentView, using: attributes) } // Bumps a status bar replacement entry private func showStatusBarMessage(attributes: EKAttributes) { let statusBarHeight = UIApplication.shared.statusBarFrame.maxY let contentView: UIView let font = MainFont.light.with(size: 12) let labelStyle = EKProperty.LabelStyle( font: font, color: .white, alignment: .center, displayMode: displayMode ) if statusBarHeight > 20 { let leading = EKProperty.LabelContent( text: "My 🧠", style: labelStyle ) let trailing = EKProperty.LabelContent( text: "Wonders!", style: labelStyle ) contentView = EKXStatusBarMessageView( leading: leading, trailing: trailing ) } else { let labelContent = EKProperty.LabelContent( text: "My 🧠 is doing some thinking...", style: labelStyle ) let noteView = EKNoteMessageView(with: labelContent) noteView.verticalOffset = 0 noteView.set(.height, of: statusBarHeight) contentView = noteView } SwiftEntryKit.display(entry: contentView, using: attributes) } // Show rating view private func showRatingView(attributes: EKAttributes) { let unselectedImage = EKProperty.ImageContent( image: UIImage(named: "ic_star_unselected")!.withRenderingMode(.alwaysTemplate), displayMode: displayMode, tint: .standardContent ) let selectedImage = EKProperty.ImageContent( image: UIImage(named: "ic_star_selected")!.withRenderingMode(.alwaysTemplate), displayMode: displayMode, tint: EKColor.ratingStar ) let initialTitle = EKProperty.LabelContent( text: "Rate our food", style: .init( font: MainFont.medium.with(size: 34), color: .standardContent, alignment: .center, displayMode: displayMode ) ) let initialDescription = EKProperty.LabelContent( text: "How was it?", style: .init( font: MainFont.light.with(size: 24), color: EKColor.standardContent.with(alpha: 0.5), alignment: .center, displayMode: displayMode ) ) let items = [("💩", "Pooish!"), ("🤨", "Ahhh?!"), ("👍", "OK!"), ("👌", "Tasty!"), ("😋", "Delicius!")].map { texts -> EKProperty.EKRatingItemContent in let itemTitle = EKProperty.LabelContent( text: texts.0, style: .init( font: MainFont.medium.with(size: 48), color: .standardContent, alignment: .center, displayMode: displayMode ) ) let itemDescription = EKProperty.LabelContent( text: texts.1, style: .init( font: MainFont.light.with(size: 24), color: .standardContent, alignment: .center, displayMode: displayMode ) ) return EKProperty.EKRatingItemContent( title: itemTitle, description: itemDescription, unselectedImage: unselectedImage, selectedImage: selectedImage ) } var message: EKRatingMessage! let lightFont = MainFont.light.with(size: 20) let mediumFont = MainFont.medium.with(size: 20) let closeButtonLabelStyle = EKProperty.LabelStyle( font: mediumFont, color: .standardContent, displayMode: displayMode ) let closeButtonLabel = EKProperty.LabelContent( text: "Dismiss", style: closeButtonLabelStyle ) let closeButton = EKProperty.ButtonContent( label: closeButtonLabel, backgroundColor: .clear, highlightedBackgroundColor: EKColor.standardBackground.with(alpha: 0.2), displayMode: displayMode) { SwiftEntryKit.dismiss { // Here you may perform a completion handler } } let pinkyColor = EKColor.pinky let okButtonLabelStyle = EKProperty.LabelStyle( font: lightFont, color: pinkyColor, displayMode: displayMode ) let okButtonLabel = EKProperty.LabelContent( text: "Tell us more", style: okButtonLabelStyle ) let okButton = EKProperty.ButtonContent( label: okButtonLabel, backgroundColor: .clear, highlightedBackgroundColor: pinkyColor.with(alpha: 0.05), displayMode: displayMode) { SwiftEntryKit.dismiss() } let buttonsBarContent = EKProperty.ButtonBarContent( with: closeButton, okButton, separatorColor: EKColor(light: Color.Gray.light.light, dark: Color.Gray.mid.light), horizontalDistributionThreshold: 1, displayMode: displayMode, expandAnimatedly: true ) message = EKRatingMessage( initialTitle: initialTitle, initialDescription: initialDescription, ratingItems: items, buttonBarContent: buttonsBarContent) { index in // Rating selected - do something } let contentView = EKRatingMessageView(with: message) SwiftEntryKit.display(entry: contentView, using: attributes) } // Bumps a notification structured entry private func showNotificationMessage(attributes: EKAttributes, title: String, desc: String, textColor: EKColor, imageName: String? = nil) { let title = EKProperty.LabelContent( text: title, style: .init( font: MainFont.medium.with(size: 16), color: textColor, displayMode: displayMode ), accessibilityIdentifier: "title" ) let description = EKProperty.LabelContent( text: desc, style: .init( font: MainFont.light.with(size: 14), color: textColor, displayMode: displayMode ), accessibilityIdentifier: "description" ) var image: EKProperty.ImageContent? if let imageName = imageName { image = EKProperty.ImageContent( image: UIImage(named: imageName)!.withRenderingMode(.alwaysTemplate), displayMode: displayMode, size: CGSize(width: 35, height: 35), tint: textColor, accessibilityIdentifier: "thumbnail" ) } let simpleMessage = EKSimpleMessage( image: image, title: title, description: description ) let notificationMessage = EKNotificationMessage(simpleMessage: simpleMessage) let contentView = EKNotificationMessageView(with: notificationMessage) SwiftEntryKit.display(entry: contentView, using: attributes) } // Bumps a chat message structured entry private func showChatNotificationMessage(attributes: EKAttributes) { let title = EKProperty.LabelContent( text: "Madi", style: .init( font: MainFont.medium.with(size: 14), color: .white, displayMode: displayMode ) ) let description = EKProperty.LabelContent( text: "Hey! I'll come by at your office for lunch... 🍲", style: .init( font: MainFont.light.with(size: 12), color: .white, displayMode: displayMode ) ) let time = EKProperty.LabelContent( text: "09:00", style: .init( font: MainFont.light.with(size: 10), color: .white, displayMode: displayMode ) ) let image = EKProperty.ImageContent.thumb( with: "ic_madi_profile", edgeSize: 35 ) let simpleMessage = EKSimpleMessage( image: image, title: title, description: description ) let notificationMessage = EKNotificationMessage( simpleMessage: simpleMessage, auxiliary: time ) let contentView = EKNotificationMessageView(with: notificationMessage) SwiftEntryKit.display(entry: contentView, using: attributes) } private func showDarkAwesomePopupMessage(attributes: EKAttributes) { let image = UIImage(named: "ic_done_all_dark_48pt")!.withRenderingMode(.alwaysTemplate) let title = "Awesome!" let description = """ You are using SwiftEntryKit, \ and this is a customized alert \ view that is floating at the bottom. """ showPopupMessage(attributes: attributes, title: title, titleColor: .text, description: description, descriptionColor: .subText, buttonTitleColor: .white, buttonBackgroundColor: .amber, image: image) } private func showLightAwesomePopupMessage(attributes: EKAttributes) { let image = UIImage(named: "ic_done_all_light_48pt")!.withRenderingMode(.alwaysTemplate) let title = "Awesome!" let description = "You are using SwiftEntryKit, and this is a pop up with important content" showPopupMessage(attributes: attributes, title: title, titleColor: .white, description: description, descriptionColor: .white, buttonTitleColor: Color.Gray.mid, buttonBackgroundColor: .white, image: image) } private func showPopupMessage(attributes: EKAttributes, title: String, titleColor: EKColor, description: String, descriptionColor: EKColor, buttonTitleColor: EKColor, buttonBackgroundColor: EKColor, image: UIImage? = nil) { var themeImage: EKPopUpMessage.ThemeImage? if let image = image { themeImage = EKPopUpMessage.ThemeImage( image: EKProperty.ImageContent( image: image, displayMode: displayMode, size: CGSize(width: 60, height: 60), tint: titleColor, contentMode: .scaleAspectFit ) ) } let title = EKProperty.LabelContent( text: title, style: .init( font: MainFont.medium.with(size: 24), color: titleColor, alignment: .center, displayMode: displayMode ), accessibilityIdentifier: "title" ) let description = EKProperty.LabelContent( text: description, style: .init( font: MainFont.light.with(size: 16), color: descriptionColor, alignment: .center, displayMode: displayMode ), accessibilityIdentifier: "description" ) let button = EKProperty.ButtonContent( label: .init( text: "Got it!", style: .init( font: MainFont.bold.with(size: 16), color: buttonTitleColor, displayMode: displayMode ) ), backgroundColor: buttonBackgroundColor, highlightedBackgroundColor: buttonTitleColor.with(alpha: 0.05), displayMode: displayMode, accessibilityIdentifier: "button" ) let message = EKPopUpMessage( themeImage: themeImage, title: title, description: description, button: button) { SwiftEntryKit.dismiss() } let contentView = EKPopUpMessageView(with: message) SwiftEntryKit.display(entry: contentView, using: attributes) } private func showButtonBarMessage(attributes: EKAttributes) { let title = EKProperty.LabelContent( text: "Dear Reader!", style: .init( font: MainFont.medium.with(size: 15), color: .black, displayMode: displayMode ), accessibilityIdentifier: "title" ) let description = EKProperty.LabelContent( text: "Get your coupon for a free book now", style: .init( font: MainFont.light.with(size: 13), color: .black, displayMode: displayMode ), accessibilityIdentifier: "description" ) let image = EKProperty.ImageContent( imageName: "ic_books", displayMode: displayMode, size: CGSize(width: 35, height: 35), contentMode: .scaleAspectFit, accessibilityIdentifier: "image" ) let simpleMessage = EKSimpleMessage( image: image, title: title, description: description ) let buttonFont = MainFont.medium.with(size: 16) let closeButtonLabelStyle = EKProperty.LabelStyle( font: buttonFont, color: Color.Gray.a800, displayMode: displayMode ) let closeButtonLabel = EKProperty.LabelContent( text: "NOT NOW", style: closeButtonLabelStyle ) let closeButton = EKProperty.ButtonContent( label: closeButtonLabel, backgroundColor: .clear, highlightedBackgroundColor: Color.Gray.a800.with(alpha: 0.05), accessibilityIdentifier: "close-button") { SwiftEntryKit.dismiss() } let okButtonLabelStyle = EKProperty.LabelStyle( font: buttonFont, color: Color.Teal.a600, displayMode: displayMode ) let okButtonLabel = EKProperty.LabelContent( text: "LET ME HAVE IT", style: okButtonLabelStyle ) let okButton = EKProperty.ButtonContent( label: okButtonLabel, backgroundColor: .clear, highlightedBackgroundColor: Color.Teal.a600.with(alpha: 0.05), displayMode: displayMode, accessibilityIdentifier: "ok-button") { [unowned self] in var attributes = self.dataSource.bottomAlertAttributes attributes.entryBackground = .color(color: Color.Teal.a600) attributes.entranceAnimation = .init( translate: .init(duration: 0.65, spring: .init(damping: 0.8, initialVelocity: 0)) ) let image = UIImage(named: "ic_success")! let title = "Congratz!" let description = "Your book coupon is 5w1ft3ntr1k1t" self.showPopupMessage( attributes: attributes, title: title, titleColor: .white, description: description, descriptionColor: .white, buttonTitleColor: .subText, buttonBackgroundColor: .white, image: image ) } let buttonsBarContent = EKProperty.ButtonBarContent( with: closeButton, okButton, separatorColor: Color.Gray.light, buttonHeight: 60, displayMode: displayMode, expandAnimatedly: true ) let alertMessage = EKAlertMessage( simpleMessage: simpleMessage, imagePosition: .left, buttonBarContent: buttonsBarContent ) let contentView = EKAlertMessageView(with: alertMessage) SwiftEntryKit.display(entry: contentView, using: attributes) } private func showAlertView(attributes: EKAttributes) { let title = EKProperty.LabelContent( text: "Hopa!", style: .init( font: MainFont.medium.with(size: 15), color: .black, alignment: .center, displayMode: displayMode ) ) let text = """ This is a system-like alert, with several buttons. \ You can display even more buttons if you want. \ Click on one of them to dismiss it. """ let description = EKProperty.LabelContent( text: text, style: .init( font: MainFont.light.with(size: 13), color: .black, alignment: .center, displayMode: displayMode ) ) let image = EKProperty.ImageContent( imageName: "ic_apple", displayMode: displayMode, size: CGSize(width: 25, height: 25), contentMode: .scaleAspectFit ) let simpleMessage = EKSimpleMessage( image: image, title: title, description: description ) let buttonFont = MainFont.medium.with(size: 16) let closeButtonLabelStyle = EKProperty.LabelStyle( font: buttonFont, color: Color.Gray.a800, displayMode: displayMode ) let closeButtonLabel = EKProperty.LabelContent( text: "NOT NOW", style: closeButtonLabelStyle ) let closeButton = EKProperty.ButtonContent( label: closeButtonLabel, backgroundColor: .clear, highlightedBackgroundColor: Color.Gray.a800.with(alpha: 0.05), displayMode: displayMode) { SwiftEntryKit.dismiss() } let laterButtonLabelStyle = EKProperty.LabelStyle( font: buttonFont, color: Color.Teal.a600, displayMode: displayMode ) let laterButtonLabel = EKProperty.LabelContent( text: "MAYBE LATER", style: laterButtonLabelStyle ) let laterButton = EKProperty.ButtonContent( label: laterButtonLabel, backgroundColor: .clear, highlightedBackgroundColor: Color.Teal.a600.with(alpha: 0.05), displayMode: displayMode) { SwiftEntryKit.dismiss() } let okButtonLabelStyle = EKProperty.LabelStyle( font: buttonFont, color: Color.Teal.a600, displayMode: displayMode ) let okButtonLabel = EKProperty.LabelContent( text: "SHOW ME", style: okButtonLabelStyle ) let okButton = EKProperty.ButtonContent( label: okButtonLabel, backgroundColor: .clear, highlightedBackgroundColor: Color.Teal.a600.with(alpha: 0.05), displayMode: displayMode) { SwiftEntryKit.dismiss() } // Generate the content let buttonsBarContent = EKProperty.ButtonBarContent( with: okButton, laterButton, closeButton, separatorColor: Color.Gray.light, displayMode: displayMode, expandAnimatedly: true ) let alertMessage = EKAlertMessage( simpleMessage: simpleMessage, buttonBarContent: buttonsBarContent ) let contentView = EKAlertMessageView(with: alertMessage) SwiftEntryKit.display(entry: contentView, using: attributes) } // Bumps a navigation controller private func showNavigationController(with attributes: EKAttributes) { let viewController = ContactsViewController() let navigationController = ExampleNavigationViewController(rootViewController: viewController) SwiftEntryKit.display(entry: navigationController, using: attributes) } // Bumps a custom nib originated view private func showCustomNibView(attributes: EKAttributes) { SwiftEntryKit.display(entry: NibExampleView(), using: attributes) } // Bumps a custom view controller that is using a view from nib private func showCustomViewController(attributes: EKAttributes) { let viewController = ExampleViewController(with: NibExampleView()) SwiftEntryKit.display(entry: viewController, using: attributes) } // Sign in form private func showSigninForm(attributes: EKAttributes, style: FormStyle) { let titleStyle = EKProperty.LabelStyle( font: MainFont.medium.with(size: 16), color: .standardContent, alignment: .center, displayMode: displayMode ) let title = EKProperty.LabelContent( text: "Sign in to your account", style: titleStyle ) let textFields = FormFieldPresetFactory.fields( by: [.email, .password], style: style ) let button = EKProperty.ButtonContent( label: .init(text: "Continue", style: style.buttonTitle), backgroundColor: style.buttonBackground, highlightedBackgroundColor: style.buttonBackground.with(alpha: 0.8), displayMode: displayMode, accessibilityIdentifier: "continueButton") { SwiftEntryKit.dismiss() } let contentView = EKFormMessageView( with: title, textFieldsContent: textFields, buttonContent: button ) SwiftEntryKit.display(entry: contentView, using: attributes) } // Sign up form private func showSignupForm(attributes: inout EKAttributes, style: FormStyle) { let titleStyle = EKProperty.LabelStyle( font: MainFont.light.with(size: 14), color: style.textColor, displayMode: displayMode ) let title = EKProperty.LabelContent( text: "Fill your personal details", style: titleStyle ) let textFields = FormFieldPresetFactory.fields( by: [.fullName, .mobile, .email, .password], style: style ) let button = EKProperty.ButtonContent( label: .init(text: "Continue", style: style.buttonTitle), backgroundColor: style.buttonBackground, highlightedBackgroundColor: style.buttonBackground.with(alpha: 0.8), displayMode: displayMode) { SwiftEntryKit.dismiss() } let contentView = EKFormMessageView( with: title, textFieldsContent: textFields, buttonContent: button ) attributes.lifecycleEvents.didAppear = { contentView.becomeFirstResponder(with: 0) } SwiftEntryKit.display(entry: contentView, using: attributes, presentInsideKeyWindow: true) } } // MARK: - UITableViewDelegate, UITableViewDataSource extension PresetsViewController: UITableViewDelegate, UITableViewDataSource { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) let attributes = dataSource[indexPath.section, indexPath.row].attributes switch indexPath.section { case 0: toastCellSelected(with: attributes, row: indexPath.row) case 1: noteCellSelected(with: attributes, row: indexPath.row) case 2: floatCellSelected(with: attributes, row: indexPath.row) case 3: popupCellSelected(with: attributes, row: indexPath.row) case 4: formCellSelected(with: attributes, row: indexPath.row) case 5: customCellSelected(with: attributes, row: indexPath.row) case 6: showNavigationController(with: attributes) default: break } } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: PresetTableViewCell.className, for: indexPath) as! PresetTableViewCell cell.presetDescription = dataSource[indexPath.section, indexPath.row] cell.displayMode = PresetsDataSource.displayMode return cell } func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { let header = tableView.dequeueReusableHeaderFooterView(withIdentifier: SelectionHeaderView.className) as! SelectionHeaderView header.text = dataSource[section].title header.displayMode = PresetsDataSource.displayMode return header } func numberOfSections(in tableView: UITableView) -> Int { return dataSource.dataSource.count } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return dataSource[section].data.count } func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat { return 80 } func tableView(_ tableView: UITableView, estimatedHeightForHeaderInSection section: Int) -> CGFloat { return 60 } } // MARK: Selection Helpers extension PresetsViewController { private func toastCellSelected(with attributes: EKAttributes, row: Int) { switch row { case 0: let title = "Mail Received!" let desc = "Daniel sent you a message" showNotificationMessage(attributes: attributes, title: title, desc: desc, textColor: .white, imageName: "paper-plane-light") case 1: showChatNotificationMessage(attributes: attributes) case 2: let title = "15% Discount!" let desc = "Receive your coupon for 15% discount at Swifty Kitty Bakery" showNotificationMessage(attributes: attributes, title: title, desc: desc, textColor: .standardContent, imageName: "ic_pizza") case 3: let title = "Simple Notification-Like Message" let desc = """ Robot moustache gentleman lip warmer nefarious, lip warmer robot moustache gentleman brandy crumb catcher groomed testosterone trophy nefarious, cappuccino collector testosterone trophy top gun testosterone trophy consectetur nefarious groomed brandy gentleman lip warmer robot moustache super mario crumb catcher. Toothbrush timothy dalton goose dali, louis xiii horseshoe mark lawrenson goose wario graeme souness tricky sneezes timothy dalton toothbrush louis xiii id dali? """ showNotificationMessage(attributes: attributes, title: title, desc: desc, textColor: .standardContent) default: break } } private func noteCellSelected(with attributes: EKAttributes, row: Int) { switch row { case 0: showNote(attributes: attributes) case 1: showProcessingNote(attributes: attributes) case 2: showImageNote(attributes: attributes) case 3: showAnimatingImageNote(attributes: attributes) case 4: showStatusBarMessage(attributes: attributes) case 5: showNote(attributes: attributes) default: break } } private func floatCellSelected(with attributes: EKAttributes, row: Int) { let title = "Kofi Shop" let desc = "Over two weeks of quality coffee beans concentrated into a single entry kit" let image = "ic_coffee_light" switch row { case 0: showNotificationMessage(attributes: attributes, title: title, desc: desc, textColor: .white, imageName: image) case 1: showNotificationMessage(attributes: attributes, title: title, desc: desc, textColor: .white, imageName: image) default: break } } private func popupCellSelected(with attributes: EKAttributes, row: Int) { switch row { case 0: showDarkAwesomePopupMessage(attributes: attributes) case 1: showLightAwesomePopupMessage(attributes: attributes) case 2: showLightAwesomePopupMessage(attributes: attributes) case 3: showButtonBarMessage(attributes: attributes) case 4: showAlertView(attributes: attributes) case 5: showRatingView(attributes: attributes) default: break } } private func formCellSelected(with attributes: EKAttributes, row: Int) { switch row { case 0: showSigninForm(attributes: attributes, style: .light) case 1: var attributes = attributes showSignupForm(attributes: &attributes, style: .light) case 2: var attributes = attributes showSignupForm(attributes: &attributes, style: .metallic) default: break } } private func customCellSelected(with attributes: EKAttributes, row: Int) { switch row { case 0: showNavigationController(with: attributes) case 1: showCustomNibView(attributes: attributes) case 2: showCustomViewController(attributes: attributes) default: break } } } ================================================ FILE: Example/SwiftEntryKit/Presets/Samples/ExampleNavigationController/ContactsViewController.swift ================================================ // // EmbeddedViewController.swift // SwiftEntryKitDemo // // Created by Daniel Huri on 3/15/19. // Copyright © 2019 CocoaPods. All rights reserved. // import UIKit class ContactsViewController: UIViewController { @IBOutlet private weak var tableView: UITableView! private let dataSource = ["John", "Gregory", "David", "Jack", "Tony", "Torvi", "Walter", "Dexter", "Ramsay"] init() { super.init(nibName: type(of: self).className, bundle: nil) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() navigationItem.title = "Contacts" tableView.register(UITableViewCell.self, forCellReuseIdentifier: "GenericCell") } } // MARK: UITableViewDelegate, UITableViewDataSource extension ContactsViewController: UITableViewDelegate, UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return dataSource.count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "GenericCell")! cell.textLabel?.text = dataSource[indexPath.row] return cell } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { tableView.deselectRow(at: indexPath, animated: true) let vc = DescriptionViewController(screenTitle: dataSource[indexPath.row]) navigationController!.pushViewController(vc, animated: true) } } ================================================ FILE: Example/SwiftEntryKit/Presets/Samples/ExampleNavigationController/ContactsViewController.xib ================================================ ================================================ FILE: Example/SwiftEntryKit/Presets/Samples/ExampleNavigationController/DescriptionViewController.swift ================================================ // // DescriptionViewController.swift // SwiftEntryKitDemo // // Created by Daniel Huri on 3/15/19. // Copyright © 2019 CocoaPods. All rights reserved. // import UIKit import SwiftEntryKit class DescriptionViewController: UIViewController { private let screenTitle: String @IBOutlet private var label: UILabel! init(screenTitle: String) { self.screenTitle = screenTitle super.init(nibName: type(of: self).className, bundle: nil) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() navigationItem.title = screenTitle setupInterfaceStyle() } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupInterfaceStyle() } private func setupInterfaceStyle() { view.backgroundColor = EKColor.standardBackground.color( for: traitCollection, mode: .inferred ) label.textColor = EKColor.standardContent.color( for: traitCollection, mode: .inferred ) } } ================================================ FILE: Example/SwiftEntryKit/Presets/Samples/ExampleNavigationController/DescriptionViewController.xib ================================================ ================================================ FILE: Example/SwiftEntryKit/Presets/Samples/ExampleNavigationController/ExampleNavigationViewController.swift ================================================ // // ExampleNavigationViewController.swift // SwiftEntryKitDemo // // Created by Daniel Huri on 3/15/19. // Copyright © 2019 CocoaPods. All rights reserved. // import UIKit import SwiftEntryKit class ExampleNavigationViewController: UINavigationController { override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { navigationBar.tintColor = EKColor.navigationItemColor.color(for: traitCollection, mode: .inferred) } } ================================================ FILE: Example/SwiftEntryKit/Presets/Samples/ExampleViewController/ExampleViewController.swift ================================================ // // ExampleViewController.swift // SwiftEntryKitDemo // // Created by Daniel Huri on 6/8/18. // Copyright © 2018 CocoaPods. All rights reserved. // import UIKit class ExampleViewController: UIViewController { private let injectedView: UIView init(with view: UIView) { injectedView = view super.init(nibName: nil, bundle: nil) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func loadView() { view = injectedView } } ================================================ FILE: Example/SwiftEntryKit/Presets/Samples/NibExampleView/NibExampleView.swift ================================================ // // NibExampleView.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit class NibExampleView: UIView { required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) setup() } init() { super.init(frame: .zero) setup() } private func setup() { fromNib() clipsToBounds = true layer.cornerRadius = 5 } } ================================================ FILE: Example/SwiftEntryKit/Presets/Samples/NibExampleView/NibExampleView.xib ================================================ ================================================ FILE: Example/SwiftEntryKit/SwiftEntryKit.h ================================================ // // SwiftEntryKit.h // SwiftEntryKit // // Created by Daniel Huri on 5/23/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // #import //! Project version number for SwiftEntryKit. FOUNDATION_EXPORT double SwiftEntryKitVersionNumber; //! Project version string for SwiftEntryKit. FOUNDATION_EXPORT const unsigned char SwiftEntryKitVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import ================================================ FILE: Example/SwiftEntryKit/Utils/CGRect+Utils.swift ================================================ // // CGRect.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/28/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit extension CGRect { var minEdge: CGFloat { return min(width, height) } } ================================================ FILE: Example/SwiftEntryKit/Utils/Font.swift ================================================ // // Font.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/23/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit typealias MainFont = Font.HelveticaNeue enum Font { enum HelveticaNeue: String { case ultraLightItalic = "UltraLightItalic" case medium = "Medium" case mediumItalic = "MediumItalic" case ultraLight = "UltraLight" case italic = "Italic" case light = "Light" case thinItalic = "ThinItalic" case lightItalic = "LightItalic" case bold = "Bold" case thin = "Thin" case condensedBlack = "CondensedBlack" case condensedBold = "CondensedBold" case boldItalic = "BoldItalic" func with(size: CGFloat) -> UIFont { return UIFont(name: "HelveticaNeue-\(rawValue)", size: size)! } } } ================================================ FILE: Example/SwiftEntryKit/Utils/Object+ClassName.swift ================================================ // // Object+ClassName.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import Foundation extension NSObject { var className: String { return String(describing: type(of: self)) } class var className: String { return String(describing: self) } } ================================================ FILE: Example/SwiftEntryKit/Utils/UIColor+Utils.swift ================================================ // // UIColor+Utils.swift // SwiftEntryKit // // Created by Daniel Huri on 4/20/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit import SwiftEntryKit extension UIColor { static func by(r: Int, g: Int, b: Int, a: CGFloat = 1) -> UIColor { let d = CGFloat(255) return UIColor(red: CGFloat(r) / d, green: CGFloat(g) / d, blue: CGFloat(b) / d, alpha: a) } convenience init(red: Int, green: Int, blue: Int) { assert(red >= 0 && red <= 255, "Invalid red component") assert(green >= 0 && green <= 255, "Invalid green component") assert(blue >= 0 && blue <= 255, "Invalid blue component") self.init(red: CGFloat(red) / 255.0, green: CGFloat(green) / 255.0, blue: CGFloat(blue) / 255.0, alpha: 1.0) } convenience init(rgb: Int) { self.init( red: (rgb >> 16) & 0xFF, green: (rgb >> 8) & 0xFF, blue: rgb & 0xFF ) } var ekColor: EKColor { return EKColor(self) } static let dimmedLightBackground = UIColor(white: 100.0/255.0, alpha: 0.3) static let dimmedDarkBackground = UIColor(white: 50.0/255.0, alpha: 0.3) static let dimmedDarkestBackground = UIColor(white: 0, alpha: 0.5) static let pinky = UIColor(rgb: 0xE91E63) static let amber = UIColor(rgb: 0xFFC107) static let satCyan = UIColor(rgb: 0x00BCD4) static let redish = UIColor(rgb: 0xFF5252) static let greenGrass = UIColor(rgb: 0x4CAF50) static let chatMessageLightMode = UIColor(red: 48, green: 47, blue: 48) static let chatMessageDarkMode = UIColor(red: 207, green: 208, blue: 207) static let textLightMode = UIColor(red: 33, green: 33, blue: 33) static let textDarkMode = UIColor(red: 222, green: 222, blue: 222) static let subTextLightMode = UIColor(red: 117, green: 117, blue: 117) static let subTextDarkMode = UIColor(red: 138, green: 138, blue: 138) static let musicBackgroundDark = UIColor(red: 36, green: 39, blue: 42) static let musicRedish = UIColor(red: 219, green: 58, blue: 94) static let lightNavigationBarBackground = UIColor(red: 251, green: 251, blue: 253) static let darkHeaderBackground = UIColor(red: 25, green: 26, blue: 25) static let darkSegmentedControl = UIColor(red: 55, green: 71, blue: 79) } extension EKColor { static var segmentedControlTint: EKColor { return EKColor(.gray) } static var navigationItemColor: EKColor { return EKColor(light: .gray, dark: .musicRedish) } static var navigationBackgroundColor: EKColor { return EKColor(light: .lightNavigationBarBackground, dark: .black) } static var headerBackground: EKColor { return EKColor(light: Color.BlueGray.c50.with(alpha: 0.95).light, dark: .darkHeaderBackground) } static var headerText: EKColor { return EKColor(.white).with(alpha: 0.95) } static var satCyan: EKColor { return EKColor(.satCyan) } static var amber: EKColor { return EKColor(.amber) } static var pinky: EKColor { return EKColor(.pinky) } static var greenGrass: EKColor { return EKColor(.greenGrass) } static var redish: EKColor { return EKColor(.redish) } static var ratingStar: EKColor { return EKColor(light: .amber, dark: .musicRedish) } static var musicBackground: EKColor { return EKColor(light: .white, dark: .musicBackgroundDark) } static var musicText: EKColor { return EKColor(light: .black, dark: .musicRedish) } static var selectedBackground: EKColor { return EKColor(light: UIColor(white: 0.9, alpha: 1), dark: UIColor(white: 0.1, alpha: 1)) } static var dimmedDarkBackground: EKColor { return EKColor(light: .dimmedDarkBackground, dark: .dimmedDarkestBackground) } static var dimmedLightBackground: EKColor { return EKColor(light: .dimmedLightBackground, dark: .dimmedDarkestBackground) } static var chatMessage: EKColor { return EKColor(light: .chatMessageLightMode, dark: .chatMessageLightMode) } static var text: EKColor { return EKColor(light: .textLightMode, dark: .textDarkMode) } static var subText: EKColor { return EKColor(light: .subTextLightMode, dark: .subTextDarkMode) } } struct Color { struct BlueGray { static let c50 = EKColor(rgb: 0xeceff1) static let c100 = EKColor(rgb: 0xcfd8dc) static let c300 = EKColor(rgb: 0x90a4ae) static let c400 = EKColor(rgb: 0x78909c) static let c700 = EKColor(rgb: 0x455a64) static let c800 = EKColor(rgb: 0x37474f) static let c900 = EKColor(rgb: 0x263238) } struct Netflix { static let light = EKColor(rgb: 0x485563) static let dark = EKColor(rgb: 0x29323c) } struct Gray { static let a800 = EKColor(rgb: 0x424242) static let mid = EKColor(rgb: 0x616161) static let light = EKColor(red: 230, green: 230, blue: 230) } struct Purple { static let a300 = EKColor(rgb: 0xba68c8) static let a400 = EKColor(rgb: 0xab47bc) static let a700 = EKColor(rgb: 0xaa00ff) static let deep = EKColor(rgb: 0x673ab7) } struct BlueGradient { static let light = EKColor(red: 100, green: 172, blue: 196) static let dark = EKColor(red: 27, green: 47, blue: 144) } struct Yellow { static let a700 = EKColor(rgb: 0xffd600) } struct Teal { static let a700 = EKColor(rgb: 0x00bfa5) static let a600 = EKColor(rgb: 0x00897b) } struct Orange { static let a50 = EKColor(rgb: 0xfff3e0) } struct LightBlue { static let a700 = EKColor(rgb: 0x0091ea) } struct LightPink { static let first = EKColor(rgb: 0xff9a9e) static let last = EKColor(rgb: 0xfad0c4) } } ================================================ FILE: Example/SwiftEntryKit/Utils/UIScreen+Utils.swift ================================================ // // UIScreen+Utils.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/28/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit extension UIScreen { var minEdge: CGFloat { return UIScreen.main.bounds.minEdge } } ================================================ FILE: Example/SwiftEntryKit/Utils/UIView+Nib.swift ================================================ // // UIView+Nib.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit extension UIView { @discardableResult func fromNib() -> T? { guard let contentView = Bundle(for: type(of: self)).loadNibNamed(type(of: self).className, owner: self, options: nil)?.first as? T else { return nil } addSubview(contentView) contentView.fillSuperview() return contentView } } ================================================ FILE: Example/SwiftEntryKit.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 142D493C223C1E7F00020ABF /* ExampleNavigationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142D493B223C1E7F00020ABF /* ExampleNavigationViewController.swift */; }; 142D4947223C1F5A00020ABF /* ContactsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142D4945223C1F5A00020ABF /* ContactsViewController.swift */; }; 142D4948223C1F5A00020ABF /* ContactsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 142D4946223C1F5A00020ABF /* ContactsViewController.xib */; }; 142D494B223C204700020ABF /* DescriptionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 142D4949223C204700020ABF /* DescriptionViewController.swift */; }; 142D494C223C204700020ABF /* DescriptionViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 142D494A223C204700020ABF /* DescriptionViewController.xib */; }; 14333AE3208FA09E00DCFC7B /* PresetDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14333AE2208FA09E00DCFC7B /* PresetDescription.swift */; }; 143C1573271C814E009A7D03 /* UIView+QuickLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143C156E271C814E009A7D03 /* UIView+QuickLayout.swift */; }; 143C1574271C814E009A7D03 /* UIViewArray+QuickLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143C156F271C814E009A7D03 /* UIViewArray+QuickLayout.swift */; }; 143C1575271C814E009A7D03 /* UIView+QLContentWrap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143C1570271C814E009A7D03 /* UIView+QLContentWrap.swift */; }; 143C1576271C814E009A7D03 /* QLUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143C1571271C814E009A7D03 /* QLUtils.swift */; }; 143C1577271C814E009A7D03 /* QLCompatibility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143C1572271C814E009A7D03 /* QLCompatibility.swift */; }; 143C6A2220B54E4A00F7DD89 /* SwiftEntryKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 143C6A2020B54E4A00F7DD89 /* SwiftEntryKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 143C6A2520B54E4A00F7DD89 /* SwiftEntryKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 143C6A1E20B54E4A00F7DD89 /* SwiftEntryKit.framework */; }; 143C6A2620B54E4A00F7DD89 /* SwiftEntryKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 143C6A1E20B54E4A00F7DD89 /* SwiftEntryKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 143F3AA22090A6A7009F3719 /* ShadowSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143F3AA12090A6A7009F3719 /* ShadowSelectionTableViewCell.swift */; }; 143F3AA42090A70E009F3719 /* RoundCornersSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143F3AA32090A70E009F3719 /* RoundCornersSelectionTableViewCell.swift */; }; 143F3AAA2090AFB8009F3719 /* BackgroundStyleSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143F3AA92090AFB8009F3719 /* BackgroundStyleSelectionTableViewCell.swift */; }; 143F3AAC2090B312009F3719 /* UserInteractionSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143F3AAB2090B312009F3719 /* UserInteractionSelectionTableViewCell.swift */; }; 143F3AAE2090B4E2009F3719 /* HapticFeedbackSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143F3AAD2090B4E2009F3719 /* HapticFeedbackSelectionTableViewCell.swift */; }; 143F3AB22090B7F0009F3719 /* ScrollSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 143F3AB12090B7F0009F3719 /* ScrollSelectionTableViewCell.swift */; }; 144E51BD20D56E150051FDCA /* EKAttributes+LifecycleActions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 144E51BC20D56E150051FDCA /* EKAttributes+LifecycleActions.swift */; }; 145F56B820B84ACA0027EB67 /* EKAttributes+StatusBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145F56B720B84ACA0027EB67 /* EKAttributes+StatusBar.swift */; }; 145F56BB20B863220027EB67 /* UIApplication+EKAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 145F56BA20B863220027EB67 /* UIApplication+EKAppearance.swift */; }; 1461DEFD21E0A9FC0034E08C /* EntryAppearanceDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1461DEFC21E0A9FC0034E08C /* EntryAppearanceDescriptor.swift */; }; 14665621209204A5008FB96D /* AnimationSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14665620209204A5008FB96D /* AnimationSelectionTableViewCell.swift */; }; 147A9A612092682E00A49D7A /* SelectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 147A9A602092682E00A49D7A /* SelectionHeaderView.swift */; }; 147A9A6320926A7500A49D7A /* MaxWidthSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 147A9A6220926A7500A49D7A /* MaxWidthSelectionTableViewCell.swift */; }; 147A9A6520926C5D00A49D7A /* HeightSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 147A9A6420926C5D00A49D7A /* HeightSelectionTableViewCell.swift */; }; 1496D952209CC2AF002CBB22 /* UIView+Nib.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1496D951209CC2AF002CBB22 /* UIView+Nib.swift */; }; 1496D956209CC6EF002CBB22 /* Object+ClassName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1496D955209CC6EF002CBB22 /* Object+ClassName.swift */; }; 149D0A0B20AF07EE000AA6C4 /* AttributesCreationTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14CF407820AEEA6E00C744D1 /* AttributesCreationTest.swift */; }; 149D0A1220AF1EE7000AA6C4 /* FormFieldPresetFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 149D0A1120AF1EE7000AA6C4 /* FormFieldPresetFactory.swift */; }; 14A1AB3520930120001CA5B4 /* PresetsDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A1AB3420930120001CA5B4 /* PresetsDataSource.swift */; }; 14A40C63208B7AA800B79474 /* PlaygroundViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A40C62208B7AA800B79474 /* PlaygroundViewController.swift */; }; 14A6AAC420CA7208005F3D81 /* ExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A6AAC320CA7208005F3D81 /* ExampleViewController.swift */; }; 14A7B11F22ECEDE8009A4265 /* EKAttributes+DisplayMode.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A7B11E22ECEDE8009A4265 /* EKAttributes+DisplayMode.swift */; }; 14A7B12222ECEF68009A4265 /* UIColor+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14A7B12122ECEF68009A4265 /* UIColor+Utils.swift */; }; 14B3A50720C1198A002306C4 /* EKRatingMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B3A50620C1198A002306C4 /* EKRatingMessageView.swift */; }; 14B3A51220C16B64002306C4 /* EKRatingMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B3A51120C16B64002306C4 /* EKRatingMessage.swift */; }; 14B3A51420C16BAC002306C4 /* EKAlertMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B3A51320C16BAC002306C4 /* EKAlertMessage.swift */; }; 14B3A51620C16BC3002306C4 /* EKSimpleMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B3A51520C16BC3002306C4 /* EKSimpleMessage.swift */; }; 14B3A51820C16D7A002306C4 /* EKRatingSymbolView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B3A51720C16D7A002306C4 /* EKRatingSymbolView.swift */; }; 14B3A51A20C16E44002306C4 /* EKRatingSymbolsContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B3A51920C16E44002306C4 /* EKRatingSymbolsContainerView.swift */; }; 14B48B5820B81C9700CE3EF4 /* EKRootViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B1920B81C9700CE3EF4 /* EKRootViewController.swift */; }; 14B48B5920B81C9700CE3EF4 /* EKEntryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B1A20B81C9700CE3EF4 /* EKEntryView.swift */; }; 14B48B5A20B81C9700CE3EF4 /* EKWindowProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B1B20B81C9700CE3EF4 /* EKWindowProvider.swift */; }; 14B48B5B20B81C9700CE3EF4 /* EKWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B1C20B81C9700CE3EF4 /* EKWindow.swift */; }; 14B48B5C20B81C9700CE3EF4 /* EKBackgroundView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B1D20B81C9700CE3EF4 /* EKBackgroundView.swift */; }; 14B48B5D20B81C9700CE3EF4 /* EKWrapperView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B1E20B81C9700CE3EF4 /* EKWrapperView.swift */; }; 14B48B5E20B81C9700CE3EF4 /* EKContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B1F20B81C9700CE3EF4 /* EKContentView.swift */; }; 14B48B5F20B81C9700CE3EF4 /* EKStyleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B2020B81C9700CE3EF4 /* EKStyleView.swift */; }; 14B48B6020B81C9700CE3EF4 /* UIView+Responder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B2220B81C9700CE3EF4 /* UIView+Responder.swift */; }; 14B48B6120B81C9700CE3EF4 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B2320B81C9700CE3EF4 /* GradientView.swift */; }; 14B48B6220B81C9700CE3EF4 /* HapticFeedbackGenerator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B2420B81C9700CE3EF4 /* HapticFeedbackGenerator.swift */; }; 14B48B6320B81C9700CE3EF4 /* UIView+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B2620B81C9700CE3EF4 /* UIView+Utils.swift */; }; 14B48B6420B81C9700CE3EF4 /* UIRectCorner+Short.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B2720B81C9700CE3EF4 /* UIRectCorner+Short.swift */; }; 14B48B6520B81C9700CE3EF4 /* UIEdgeInsets+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B2820B81C9700CE3EF4 /* UIEdgeInsets+Utils.swift */; }; 14B48B6620B81C9700CE3EF4 /* UIView+Shadow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B2920B81C9700CE3EF4 /* UIView+Shadow.swift */; }; 14B48B6720B81C9700CE3EF4 /* SwiftEntryKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B2A20B81C9700CE3EF4 /* SwiftEntryKit.swift */; }; 14B48B6820B81C9700CE3EF4 /* EKProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B2C20B81C9700CE3EF4 /* EKProperty.swift */; }; 14B48B6920B81C9700CE3EF4 /* EKAttributes+Shadow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B2E20B81C9700CE3EF4 /* EKAttributes+Shadow.swift */; }; 14B48B6B20B81C9700CE3EF4 /* EKAttributes+Position.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3020B81C9700CE3EF4 /* EKAttributes+Position.swift */; }; 14B48B6C20B81C9700CE3EF4 /* EKAttributes.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3120B81C9700CE3EF4 /* EKAttributes.swift */; }; 14B48B6D20B81C9700CE3EF4 /* EKAttributes+UserInteraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3220B81C9700CE3EF4 /* EKAttributes+UserInteraction.swift */; }; 14B48B6E20B81C9700CE3EF4 /* EKAttributes+Duration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3320B81C9700CE3EF4 /* EKAttributes+Duration.swift */; }; 14B48B6F20B81C9700CE3EF4 /* EKAttributes+Validations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3420B81C9700CE3EF4 /* EKAttributes+Validations.swift */; }; 14B48B7020B81C9700CE3EF4 /* EKAttributes+PopBehavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3520B81C9700CE3EF4 /* EKAttributes+PopBehavior.swift */; }; 14B48B7120B81C9700CE3EF4 /* EKAttributes+Animation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3620B81C9700CE3EF4 /* EKAttributes+Animation.swift */; }; 14B48B7220B81C9700CE3EF4 /* EKAttributes+PositionConstraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3720B81C9700CE3EF4 /* EKAttributes+PositionConstraints.swift */; }; 14B48B7320B81C9700CE3EF4 /* EKAttributes+Precedence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3820B81C9700CE3EF4 /* EKAttributes+Precedence.swift */; }; 14B48B7420B81C9700CE3EF4 /* EKAttributes+Scroll.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3920B81C9700CE3EF4 /* EKAttributes+Scroll.swift */; }; 14B48B7520B81C9700CE3EF4 /* EKAttributes+Presets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3A20B81C9700CE3EF4 /* EKAttributes+Presets.swift */; }; 14B48B7620B81C9700CE3EF4 /* EKAttributes+WindowLevel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3B20B81C9700CE3EF4 /* EKAttributes+WindowLevel.swift */; }; 14B48B7720B81C9700CE3EF4 /* EKAttributes+BackgroundStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3C20B81C9700CE3EF4 /* EKAttributes+BackgroundStyle.swift */; }; 14B48B7820B81C9700CE3EF4 /* EKAttributes+HapticFeedback.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3D20B81C9700CE3EF4 /* EKAttributes+HapticFeedback.swift */; }; 14B48B7920B81C9700CE3EF4 /* EKAttributes+FrameStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3E20B81C9700CE3EF4 /* EKAttributes+FrameStyle.swift */; }; 14B48B7A20B81C9700CE3EF4 /* EKPopUpMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B3F20B81C9700CE3EF4 /* EKPopUpMessage.swift */; }; 14B48B7B20B81C9700CE3EF4 /* EKNotificationMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4020B81C9700CE3EF4 /* EKNotificationMessage.swift */; }; 14B48B7C20B81C9700CE3EF4 /* EKNotificationMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4220B81C9700CE3EF4 /* EKNotificationMessageView.swift */; }; 14B48B7D20B81C9700CE3EF4 /* EKAlertMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4320B81C9700CE3EF4 /* EKAlertMessageView.swift */; }; 14B48B7E20B81C9700CE3EF4 /* EKSimpleMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4420B81C9700CE3EF4 /* EKSimpleMessageView.swift */; }; 14B48B7F20B81C9700CE3EF4 /* EKImageNoteMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4620B81C9700CE3EF4 /* EKImageNoteMessageView.swift */; }; 14B48B8020B81C9700CE3EF4 /* EKNoteMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4720B81C9700CE3EF4 /* EKNoteMessageView.swift */; }; 14B48B8120B81C9700CE3EF4 /* EKXStatusBarMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4820B81C9700CE3EF4 /* EKXStatusBarMessageView.swift */; }; 14B48B8220B81C9700CE3EF4 /* EKAccessoryNoteMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4920B81C9700CE3EF4 /* EKAccessoryNoteMessageView.swift */; }; 14B48B8320B81C9700CE3EF4 /* EKProcessingNoteMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4A20B81C9700CE3EF4 /* EKProcessingNoteMessageView.swift */; }; 14B48B8420B81C9700CE3EF4 /* EKFormMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4B20B81C9700CE3EF4 /* EKFormMessageView.swift */; }; 14B48B8520B81C9700CE3EF4 /* EKTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4D20B81C9700CE3EF4 /* EKTextField.swift */; }; 14B48B8620B81C9700CE3EF4 /* EKButtonBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4E20B81C9700CE3EF4 /* EKButtonBarView.swift */; }; 14B48B8720B81C9700CE3EF4 /* EKPopUpMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B4F20B81C9700CE3EF4 /* EKPopUpMessageView.swift */; }; 14B48B8820B81C9700CE3EF4 /* EKMessageContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14B48B5020B81C9700CE3EF4 /* EKMessageContentView.swift */; }; 14C729D5209476A90060D267 /* BorderSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C729D4209476A90060D267 /* BorderSelectionTableViewCell.swift */; }; 14C729D7209496180060D267 /* CGRect+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C729D6209496180060D267 /* CGRect+Utils.swift */; }; 14C729D9209496730060D267 /* UIScreen+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C729D8209496730060D267 /* UIScreen+Utils.swift */; }; 14C75E082096430D0002465E /* PrioritySelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C75E072096430D0002465E /* PrioritySelectionTableViewCell.swift */; }; 14C894F8208E70D5003D8CE3 /* SelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C894F6208E70D5003D8CE3 /* SelectionTableViewCell.swift */; }; 14C894FB208E79B8003D8CE3 /* EntryAttributeWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C894FA208E79B8003D8CE3 /* EntryAttributeWrapper.swift */; }; 14C894FE208E7DDE003D8CE3 /* Font.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C894FD208E7DDE003D8CE3 /* Font.swift */; }; 14C89500208E81BF003D8CE3 /* PositionSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C894FF208E81BF003D8CE3 /* PositionSelectionTableViewCell.swift */; }; 14C89502208E83AA003D8CE3 /* WindowLevelSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C89501208E83AA003D8CE3 /* WindowLevelSelectionTableViewCell.swift */; }; 14C89504208E870C003D8CE3 /* DisplayDurationSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14C89503208E870C003D8CE3 /* DisplayDurationSelectionTableViewCell.swift */; }; 14D18CCD2090FE970019AE7F /* SafeAreaSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14D18CCC2090FE970019AE7F /* SafeAreaSelectionTableViewCell.swift */; }; 14D18CCF209105290019AE7F /* WidthSelectionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14D18CCE209105290019AE7F /* WidthSelectionTableViewCell.swift */; }; 14D18CD2209118DA0019AE7F /* NibExampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14D18CD1209118DA0019AE7F /* NibExampleView.swift */; }; 14D18CD4209118E90019AE7F /* NibExampleView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 14D18CD3209118E90019AE7F /* NibExampleView.xib */; }; 14DF7B6A21BBCD4D0058B2BB /* EKButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14DF7B6921BBCD4D0058B2BB /* EKButtonView.swift */; }; 14E24A1D208B600E00F32B13 /* UIColor+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14E24A1C208B600E00F32B13 /* UIColor+Utils.swift */; }; 14E59DBE22E49C0D0080AB4F /* EKColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14E59DBD22E49C0D0080AB4F /* EKColor.swift */; }; 14F36800208B585E001E8F56 /* PresetsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14F367FE208B585E001E8F56 /* PresetsViewController.swift */; }; 14F36801208B585E001E8F56 /* PresetTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14F367FF208B585E001E8F56 /* PresetTableViewCell.swift */; }; 14F3FD86213A6ED900CA3010 /* EntryCachingHeuristic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14F3FD85213A6ED900CA3010 /* EntryCachingHeuristic.swift */; }; 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; C207011E12B68340B41AED68 /* Pods_SwiftEntryKitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7287A554A48DB0976C7AA96F /* Pods_SwiftEntryKitTests.framework */; }; ED3C4B61645C539D4E1B2C91 /* Pods_SwiftEntryKitDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 39B9C8169640826800BA255C /* Pods_SwiftEntryKitDemo.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ 143C6A2320B54E4A00F7DD89 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 607FACC81AFB9204008FA782 /* Project object */; proxyType = 1; remoteGlobalIDString = 143C6A1D20B54E4A00F7DD89; remoteInfo = SwiftEntryKit; }; 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 607FACC81AFB9204008FA782 /* Project object */; proxyType = 1; remoteGlobalIDString = 607FACCF1AFB9204008FA782; remoteInfo = SwiftEntryKit; }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ 143C6A2A20B54E4A00F7DD89 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( 143C6A2620B54E4A00F7DD89 /* SwiftEntryKit.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 0A7410C89E315570D823186E /* Pods-SwiftEntryKitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitTests.release.xcconfig"; path = "Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests.release.xcconfig"; sourceTree = ""; }; 12AB00853602FB01F90EB33D /* Pods-SwiftEntryKitDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitDemo.debug.xcconfig"; path = "Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo.debug.xcconfig"; sourceTree = ""; }; 142D493B223C1E7F00020ABF /* ExampleNavigationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleNavigationViewController.swift; sourceTree = ""; }; 142D4945223C1F5A00020ABF /* ContactsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsViewController.swift; sourceTree = ""; }; 142D4946223C1F5A00020ABF /* ContactsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ContactsViewController.xib; sourceTree = ""; }; 142D4949223C204700020ABF /* DescriptionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DescriptionViewController.swift; sourceTree = ""; }; 142D494A223C204700020ABF /* DescriptionViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DescriptionViewController.xib; sourceTree = ""; }; 1430769C20B5E5970069BA1B /* QuickLayout.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLayout.framework; path = ../Carthage/Build/iOS/QuickLayout.framework; sourceTree = ""; }; 14333AE2208FA09E00DCFC7B /* PresetDescription.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PresetDescription.swift; sourceTree = ""; }; 143C156E271C814E009A7D03 /* UIView+QuickLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+QuickLayout.swift"; sourceTree = ""; }; 143C156F271C814E009A7D03 /* UIViewArray+QuickLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewArray+QuickLayout.swift"; sourceTree = ""; }; 143C1570271C814E009A7D03 /* UIView+QLContentWrap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+QLContentWrap.swift"; sourceTree = ""; }; 143C1571271C814E009A7D03 /* QLUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QLUtils.swift; sourceTree = ""; }; 143C1572271C814E009A7D03 /* QLCompatibility.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QLCompatibility.swift; sourceTree = ""; }; 143C6A1E20B54E4A00F7DD89 /* SwiftEntryKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftEntryKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 143C6A2020B54E4A00F7DD89 /* SwiftEntryKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftEntryKit.h; sourceTree = ""; }; 143C6A2120B54E4A00F7DD89 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 143F3AA12090A6A7009F3719 /* ShadowSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShadowSelectionTableViewCell.swift; sourceTree = ""; }; 143F3AA32090A70E009F3719 /* RoundCornersSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RoundCornersSelectionTableViewCell.swift; sourceTree = ""; }; 143F3AA92090AFB8009F3719 /* BackgroundStyleSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BackgroundStyleSelectionTableViewCell.swift; sourceTree = ""; }; 143F3AAB2090B312009F3719 /* UserInteractionSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserInteractionSelectionTableViewCell.swift; sourceTree = ""; }; 143F3AAD2090B4E2009F3719 /* HapticFeedbackSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HapticFeedbackSelectionTableViewCell.swift; sourceTree = ""; }; 143F3AB12090B7F0009F3719 /* ScrollSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScrollSelectionTableViewCell.swift; sourceTree = ""; }; 144E51BC20D56E150051FDCA /* EKAttributes+LifecycleActions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EKAttributes+LifecycleActions.swift"; sourceTree = ""; }; 14580CCA20B7F4FB001AF703 /* DemoAppInfo.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = DemoAppInfo.plist; sourceTree = ""; }; 145F56B720B84ACA0027EB67 /* EKAttributes+StatusBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EKAttributes+StatusBar.swift"; sourceTree = ""; }; 145F56BA20B863220027EB67 /* UIApplication+EKAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIApplication+EKAppearance.swift"; sourceTree = ""; }; 1461DEFC21E0A9FC0034E08C /* EntryAppearanceDescriptor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryAppearanceDescriptor.swift; sourceTree = ""; }; 14665620209204A5008FB96D /* AnimationSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationSelectionTableViewCell.swift; sourceTree = ""; }; 147A9A602092682E00A49D7A /* SelectionHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectionHeaderView.swift; sourceTree = ""; }; 147A9A6220926A7500A49D7A /* MaxWidthSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MaxWidthSelectionTableViewCell.swift; sourceTree = ""; }; 147A9A6420926C5D00A49D7A /* HeightSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeightSelectionTableViewCell.swift; sourceTree = ""; }; 1496D951209CC2AF002CBB22 /* UIView+Nib.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Nib.swift"; sourceTree = ""; }; 1496D955209CC6EF002CBB22 /* Object+ClassName.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Object+ClassName.swift"; sourceTree = ""; }; 1496D957209CC860002CBB22 /* CREDITS.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = CREDITS.md; path = ../CREDITS.md; sourceTree = ""; }; 149D0A1120AF1EE7000AA6C4 /* FormFieldPresetFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormFieldPresetFactory.swift; sourceTree = ""; }; 14A1AB3420930120001CA5B4 /* PresetsDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PresetsDataSource.swift; sourceTree = ""; }; 14A40C62208B7AA800B79474 /* PlaygroundViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlaygroundViewController.swift; sourceTree = ""; }; 14A6AAC320CA7208005F3D81 /* ExampleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleViewController.swift; sourceTree = ""; }; 14A7B11E22ECEDE8009A4265 /* EKAttributes+DisplayMode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+DisplayMode.swift"; sourceTree = ""; }; 14A7B12122ECEF68009A4265 /* UIColor+Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Utils.swift"; sourceTree = ""; }; 14B0B95020B7E4FE00D24D8A /* QuickLayout.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLayout.framework; path = "../../../Library/Developer/Xcode/DerivedData/QuickLayout-aotxzuhsyjyfzgcifoglldyfgnnw/Build/Products/Debug-iphonesimulator/QuickLayout-iOS/QuickLayout.framework"; sourceTree = ""; }; 14B3A50620C1198A002306C4 /* EKRatingMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EKRatingMessageView.swift; sourceTree = ""; }; 14B3A51120C16B64002306C4 /* EKRatingMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EKRatingMessage.swift; sourceTree = ""; }; 14B3A51320C16BAC002306C4 /* EKAlertMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EKAlertMessage.swift; sourceTree = ""; }; 14B3A51520C16BC3002306C4 /* EKSimpleMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EKSimpleMessage.swift; sourceTree = ""; }; 14B3A51720C16D7A002306C4 /* EKRatingSymbolView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EKRatingSymbolView.swift; sourceTree = ""; }; 14B3A51920C16E44002306C4 /* EKRatingSymbolsContainerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EKRatingSymbolsContainerView.swift; sourceTree = ""; }; 14B48B1920B81C9700CE3EF4 /* EKRootViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKRootViewController.swift; sourceTree = ""; }; 14B48B1A20B81C9700CE3EF4 /* EKEntryView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKEntryView.swift; sourceTree = ""; }; 14B48B1B20B81C9700CE3EF4 /* EKWindowProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKWindowProvider.swift; sourceTree = ""; }; 14B48B1C20B81C9700CE3EF4 /* EKWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKWindow.swift; sourceTree = ""; }; 14B48B1D20B81C9700CE3EF4 /* EKBackgroundView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKBackgroundView.swift; sourceTree = ""; }; 14B48B1E20B81C9700CE3EF4 /* EKWrapperView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKWrapperView.swift; sourceTree = ""; }; 14B48B1F20B81C9700CE3EF4 /* EKContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKContentView.swift; sourceTree = ""; }; 14B48B2020B81C9700CE3EF4 /* EKStyleView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKStyleView.swift; sourceTree = ""; }; 14B48B2220B81C9700CE3EF4 /* UIView+Responder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Responder.swift"; sourceTree = ""; }; 14B48B2320B81C9700CE3EF4 /* GradientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = ""; }; 14B48B2420B81C9700CE3EF4 /* HapticFeedbackGenerator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HapticFeedbackGenerator.swift; sourceTree = ""; }; 14B48B2620B81C9700CE3EF4 /* UIView+Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Utils.swift"; sourceTree = ""; }; 14B48B2720B81C9700CE3EF4 /* UIRectCorner+Short.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIRectCorner+Short.swift"; sourceTree = ""; }; 14B48B2820B81C9700CE3EF4 /* UIEdgeInsets+Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIEdgeInsets+Utils.swift"; sourceTree = ""; }; 14B48B2920B81C9700CE3EF4 /* UIView+Shadow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Shadow.swift"; sourceTree = ""; }; 14B48B2A20B81C9700CE3EF4 /* SwiftEntryKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftEntryKit.swift; sourceTree = ""; }; 14B48B2C20B81C9700CE3EF4 /* EKProperty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKProperty.swift; sourceTree = ""; }; 14B48B2E20B81C9700CE3EF4 /* EKAttributes+Shadow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Shadow.swift"; sourceTree = ""; }; 14B48B3020B81C9700CE3EF4 /* EKAttributes+Position.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Position.swift"; sourceTree = ""; }; 14B48B3120B81C9700CE3EF4 /* EKAttributes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKAttributes.swift; sourceTree = ""; }; 14B48B3220B81C9700CE3EF4 /* EKAttributes+UserInteraction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+UserInteraction.swift"; sourceTree = ""; }; 14B48B3320B81C9700CE3EF4 /* EKAttributes+Duration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Duration.swift"; sourceTree = ""; }; 14B48B3420B81C9700CE3EF4 /* EKAttributes+Validations.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Validations.swift"; sourceTree = ""; }; 14B48B3520B81C9700CE3EF4 /* EKAttributes+PopBehavior.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+PopBehavior.swift"; sourceTree = ""; }; 14B48B3620B81C9700CE3EF4 /* EKAttributes+Animation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Animation.swift"; sourceTree = ""; }; 14B48B3720B81C9700CE3EF4 /* EKAttributes+PositionConstraints.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+PositionConstraints.swift"; sourceTree = ""; }; 14B48B3820B81C9700CE3EF4 /* EKAttributes+Precedence.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Precedence.swift"; sourceTree = ""; }; 14B48B3920B81C9700CE3EF4 /* EKAttributes+Scroll.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Scroll.swift"; sourceTree = ""; }; 14B48B3A20B81C9700CE3EF4 /* EKAttributes+Presets.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+Presets.swift"; sourceTree = ""; }; 14B48B3B20B81C9700CE3EF4 /* EKAttributes+WindowLevel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+WindowLevel.swift"; sourceTree = ""; }; 14B48B3C20B81C9700CE3EF4 /* EKAttributes+BackgroundStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+BackgroundStyle.swift"; sourceTree = ""; }; 14B48B3D20B81C9700CE3EF4 /* EKAttributes+HapticFeedback.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+HapticFeedback.swift"; sourceTree = ""; }; 14B48B3E20B81C9700CE3EF4 /* EKAttributes+FrameStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKAttributes+FrameStyle.swift"; sourceTree = ""; }; 14B48B3F20B81C9700CE3EF4 /* EKPopUpMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKPopUpMessage.swift; sourceTree = ""; }; 14B48B4020B81C9700CE3EF4 /* EKNotificationMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKNotificationMessage.swift; sourceTree = ""; }; 14B48B4220B81C9700CE3EF4 /* EKNotificationMessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKNotificationMessageView.swift; sourceTree = ""; }; 14B48B4320B81C9700CE3EF4 /* EKAlertMessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKAlertMessageView.swift; sourceTree = ""; }; 14B48B4420B81C9700CE3EF4 /* EKSimpleMessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKSimpleMessageView.swift; sourceTree = ""; }; 14B48B4620B81C9700CE3EF4 /* EKImageNoteMessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKImageNoteMessageView.swift; sourceTree = ""; }; 14B48B4720B81C9700CE3EF4 /* EKNoteMessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKNoteMessageView.swift; sourceTree = ""; }; 14B48B4820B81C9700CE3EF4 /* EKXStatusBarMessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKXStatusBarMessageView.swift; sourceTree = ""; }; 14B48B4920B81C9700CE3EF4 /* EKAccessoryNoteMessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKAccessoryNoteMessageView.swift; sourceTree = ""; }; 14B48B4A20B81C9700CE3EF4 /* EKProcessingNoteMessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKProcessingNoteMessageView.swift; sourceTree = ""; }; 14B48B4B20B81C9700CE3EF4 /* EKFormMessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKFormMessageView.swift; sourceTree = ""; }; 14B48B4D20B81C9700CE3EF4 /* EKTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKTextField.swift; sourceTree = ""; }; 14B48B4E20B81C9700CE3EF4 /* EKButtonBarView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKButtonBarView.swift; sourceTree = ""; }; 14B48B4F20B81C9700CE3EF4 /* EKPopUpMessageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKPopUpMessageView.swift; sourceTree = ""; }; 14B48B5020B81C9700CE3EF4 /* EKMessageContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKMessageContentView.swift; sourceTree = ""; }; 14C729D4209476A90060D267 /* BorderSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BorderSelectionTableViewCell.swift; sourceTree = ""; }; 14C729D6209496180060D267 /* CGRect+Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGRect+Utils.swift"; sourceTree = ""; }; 14C729D8209496730060D267 /* UIScreen+Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIScreen+Utils.swift"; sourceTree = ""; }; 14C75E072096430D0002465E /* PrioritySelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrioritySelectionTableViewCell.swift; sourceTree = ""; }; 14C894F6208E70D5003D8CE3 /* SelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectionTableViewCell.swift; sourceTree = ""; }; 14C894FA208E79B8003D8CE3 /* EntryAttributeWrapper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryAttributeWrapper.swift; sourceTree = ""; }; 14C894FD208E7DDE003D8CE3 /* Font.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Font.swift; sourceTree = ""; }; 14C894FF208E81BF003D8CE3 /* PositionSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PositionSelectionTableViewCell.swift; sourceTree = ""; }; 14C89501208E83AA003D8CE3 /* WindowLevelSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowLevelSelectionTableViewCell.swift; sourceTree = ""; }; 14C89503208E870C003D8CE3 /* DisplayDurationSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DisplayDurationSelectionTableViewCell.swift; sourceTree = ""; }; 14CF407720AEC75F00C744D1 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CHANGELOG.md; path = ../CHANGELOG.md; sourceTree = ""; }; 14CF407820AEEA6E00C744D1 /* AttributesCreationTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AttributesCreationTest.swift; sourceTree = ""; }; 14D18CCC2090FE970019AE7F /* SafeAreaSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafeAreaSelectionTableViewCell.swift; sourceTree = ""; }; 14D18CCE209105290019AE7F /* WidthSelectionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidthSelectionTableViewCell.swift; sourceTree = ""; }; 14D18CD1209118DA0019AE7F /* NibExampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NibExampleView.swift; sourceTree = ""; }; 14D18CD3209118E90019AE7F /* NibExampleView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NibExampleView.xib; sourceTree = ""; }; 14DF7B6921BBCD4D0058B2BB /* EKButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EKButtonView.swift; sourceTree = ""; }; 14E24A1C208B600E00F32B13 /* UIColor+Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Utils.swift"; sourceTree = ""; }; 14E59DBD22E49C0D0080AB4F /* EKColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EKColor.swift; sourceTree = ""; }; 14F367FE208B585E001E8F56 /* PresetsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresetsViewController.swift; sourceTree = ""; }; 14F367FF208B585E001E8F56 /* PresetTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresetTableViewCell.swift; sourceTree = ""; }; 14F3FD85213A6ED900CA3010 /* EntryCachingHeuristic.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryCachingHeuristic.swift; sourceTree = ""; }; 2953CEDC51190E5442C4A150 /* Pods-SwiftEntryKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitTests.debug.xcconfig"; path = "Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests.debug.xcconfig"; sourceTree = ""; }; 2A856CAE48665E23BC76CB3B /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 39B9C8169640826800BA255C /* Pods_SwiftEntryKitDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftEntryKitDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD01AFB9204008FA782 /* SwiftEntryKitDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftEntryKitDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 607FACE51AFB9204008FA782 /* SwiftEntryKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftEntryKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 7287A554A48DB0976C7AA96F /* Pods_SwiftEntryKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftEntryKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CAFB554B7EC0872395B9099A /* Pods-SwiftEntryKitDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitDemo.release.xcconfig"; path = "Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo.release.xcconfig"; sourceTree = ""; }; EFEC60E1244126F18ABBB375 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; F1F450C1E75BEC09B67F526C /* SwiftEntryKit.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SwiftEntryKit.podspec; path = ../SwiftEntryKit.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 143C6A1A20B54E4A00F7DD89 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 607FACCD1AFB9204008FA782 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( 143C6A2520B54E4A00F7DD89 /* SwiftEntryKit.framework in Frameworks */, ED3C4B61645C539D4E1B2C91 /* Pods_SwiftEntryKitDemo.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; 607FACE21AFB9204008FA782 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( C207011E12B68340B41AED68 /* Pods_SwiftEntryKitTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 142D4944223C1F1B00020ABF /* ExampleNavigationController */ = { isa = PBXGroup; children = ( 142D493B223C1E7F00020ABF /* ExampleNavigationViewController.swift */, 142D4945223C1F5A00020ABF /* ContactsViewController.swift */, 142D4946223C1F5A00020ABF /* ContactsViewController.xib */, 142D4949223C204700020ABF /* DescriptionViewController.swift */, 142D494A223C204700020ABF /* DescriptionViewController.xib */, ); path = ExampleNavigationController; sourceTree = ""; }; 143C156D271C814E009A7D03 /* QuickLayout */ = { isa = PBXGroup; children = ( 143C156E271C814E009A7D03 /* UIView+QuickLayout.swift */, 143C156F271C814E009A7D03 /* UIViewArray+QuickLayout.swift */, 143C1570271C814E009A7D03 /* UIView+QLContentWrap.swift */, 143C1571271C814E009A7D03 /* QLUtils.swift */, 143C1572271C814E009A7D03 /* QLCompatibility.swift */, ); path = QuickLayout; sourceTree = ""; }; 143C6A1F20B54E4A00F7DD89 /* SwiftEntryKit */ = { isa = PBXGroup; children = ( 143C6A2020B54E4A00F7DD89 /* SwiftEntryKit.h */, 143C6A2120B54E4A00F7DD89 /* Info.plist */, ); path = SwiftEntryKit; sourceTree = ""; }; 149B2B57208F0C22007C829F /* Presets */ = { isa = PBXGroup; children = ( 14C729C6209447CA0060D267 /* Samples */, 14F367FE208B585E001E8F56 /* PresetsViewController.swift */, 14F367FF208B585E001E8F56 /* PresetTableViewCell.swift */, 149D0A1120AF1EE7000AA6C4 /* FormFieldPresetFactory.swift */, 14A1AB36209371A5001CA5B4 /* PresetsData */, ); path = Presets; sourceTree = ""; }; 14A1AB36209371A5001CA5B4 /* PresetsData */ = { isa = PBXGroup; children = ( 14A1AB3420930120001CA5B4 /* PresetsDataSource.swift */, 14333AE2208FA09E00DCFC7B /* PresetDescription.swift */, ); path = PresetsData; sourceTree = ""; }; 14A6AABB20CA71D9005F3D81 /* ExampleViewController */ = { isa = PBXGroup; children = ( 14A6AAC320CA7208005F3D81 /* ExampleViewController.swift */, ); path = ExampleViewController; sourceTree = ""; }; 14B48B1720B81C9700CE3EF4 /* Source */ = { isa = PBXGroup; children = ( 14B48B1820B81C9700CE3EF4 /* Infra */, 14B48B2120B81C9700CE3EF4 /* Utils */, 14B48B2520B81C9700CE3EF4 /* Extensions */, 14B48B2A20B81C9700CE3EF4 /* SwiftEntryKit.swift */, 14B48B2B20B81C9700CE3EF4 /* Model */, 14B48B4120B81C9700CE3EF4 /* MessageViews */, ); name = Source; path = ../Source; sourceTree = ""; }; 14B48B1820B81C9700CE3EF4 /* Infra */ = { isa = PBXGroup; children = ( 14F3FD85213A6ED900CA3010 /* EntryCachingHeuristic.swift */, 14B48B1B20B81C9700CE3EF4 /* EKWindowProvider.swift */, 14B48B1C20B81C9700CE3EF4 /* EKWindow.swift */, 14B48B1920B81C9700CE3EF4 /* EKRootViewController.swift */, 14B48B1A20B81C9700CE3EF4 /* EKEntryView.swift */, 14B48B1D20B81C9700CE3EF4 /* EKBackgroundView.swift */, 14B48B1E20B81C9700CE3EF4 /* EKWrapperView.swift */, 14B48B1F20B81C9700CE3EF4 /* EKContentView.swift */, 14B48B2020B81C9700CE3EF4 /* EKStyleView.swift */, ); path = Infra; sourceTree = ""; }; 14B48B2120B81C9700CE3EF4 /* Utils */ = { isa = PBXGroup; children = ( 14B48B2220B81C9700CE3EF4 /* UIView+Responder.swift */, 14B48B2320B81C9700CE3EF4 /* GradientView.swift */, 14B48B2420B81C9700CE3EF4 /* HapticFeedbackGenerator.swift */, ); path = Utils; sourceTree = ""; }; 14B48B2520B81C9700CE3EF4 /* Extensions */ = { isa = PBXGroup; children = ( 143C156D271C814E009A7D03 /* QuickLayout */, 14B48B2620B81C9700CE3EF4 /* UIView+Utils.swift */, 14B48B2720B81C9700CE3EF4 /* UIRectCorner+Short.swift */, 14B48B2820B81C9700CE3EF4 /* UIEdgeInsets+Utils.swift */, 14B48B2920B81C9700CE3EF4 /* UIView+Shadow.swift */, 145F56BA20B863220027EB67 /* UIApplication+EKAppearance.swift */, 14A7B12122ECEF68009A4265 /* UIColor+Utils.swift */, ); path = Extensions; sourceTree = ""; }; 14B48B2B20B81C9700CE3EF4 /* Model */ = { isa = PBXGroup; children = ( 14B48B2D20B81C9700CE3EF4 /* EntryAttributes */, 14B48B2C20B81C9700CE3EF4 /* EKProperty.swift */, 14B48B3F20B81C9700CE3EF4 /* EKPopUpMessage.swift */, 14B48B4020B81C9700CE3EF4 /* EKNotificationMessage.swift */, 14B3A51320C16BAC002306C4 /* EKAlertMessage.swift */, 14B3A51520C16BC3002306C4 /* EKSimpleMessage.swift */, 14B3A51120C16B64002306C4 /* EKRatingMessage.swift */, 14E59DBD22E49C0D0080AB4F /* EKColor.swift */, ); path = Model; sourceTree = ""; }; 14B48B2D20B81C9700CE3EF4 /* EntryAttributes */ = { isa = PBXGroup; children = ( 14B48B3120B81C9700CE3EF4 /* EKAttributes.swift */, 14A7B11E22ECEDE8009A4265 /* EKAttributes+DisplayMode.swift */, 144E51BC20D56E150051FDCA /* EKAttributes+LifecycleActions.swift */, 14B48B3620B81C9700CE3EF4 /* EKAttributes+Animation.swift */, 14B48B3C20B81C9700CE3EF4 /* EKAttributes+BackgroundStyle.swift */, 14B48B3820B81C9700CE3EF4 /* EKAttributes+Precedence.swift */, 14B48B3320B81C9700CE3EF4 /* EKAttributes+Duration.swift */, 14B48B3E20B81C9700CE3EF4 /* EKAttributes+FrameStyle.swift */, 14B48B3D20B81C9700CE3EF4 /* EKAttributes+HapticFeedback.swift */, 14B48B3520B81C9700CE3EF4 /* EKAttributes+PopBehavior.swift */, 14B48B3020B81C9700CE3EF4 /* EKAttributes+Position.swift */, 14B48B3720B81C9700CE3EF4 /* EKAttributes+PositionConstraints.swift */, 14B48B3A20B81C9700CE3EF4 /* EKAttributes+Presets.swift */, 14B48B3920B81C9700CE3EF4 /* EKAttributes+Scroll.swift */, 14B48B2E20B81C9700CE3EF4 /* EKAttributes+Shadow.swift */, 145F56B720B84ACA0027EB67 /* EKAttributes+StatusBar.swift */, 14B48B3220B81C9700CE3EF4 /* EKAttributes+UserInteraction.swift */, 14B48B3420B81C9700CE3EF4 /* EKAttributes+Validations.swift */, 14B48B3B20B81C9700CE3EF4 /* EKAttributes+WindowLevel.swift */, ); path = EntryAttributes; sourceTree = ""; }; 14B48B4120B81C9700CE3EF4 /* MessageViews */ = { isa = PBXGroup; children = ( 14B48B4C20B81C9700CE3EF4 /* MessagesUtils */, 14B48B4520B81C9700CE3EF4 /* Notes */, 14B48B4220B81C9700CE3EF4 /* EKNotificationMessageView.swift */, 14B48B4320B81C9700CE3EF4 /* EKAlertMessageView.swift */, 14B48B4420B81C9700CE3EF4 /* EKSimpleMessageView.swift */, 14B48B4B20B81C9700CE3EF4 /* EKFormMessageView.swift */, 14B48B4F20B81C9700CE3EF4 /* EKPopUpMessageView.swift */, 14B48B5020B81C9700CE3EF4 /* EKMessageContentView.swift */, 14B3A50620C1198A002306C4 /* EKRatingMessageView.swift */, ); path = MessageViews; sourceTree = ""; }; 14B48B4520B81C9700CE3EF4 /* Notes */ = { isa = PBXGroup; children = ( 14B48B4620B81C9700CE3EF4 /* EKImageNoteMessageView.swift */, 14B48B4720B81C9700CE3EF4 /* EKNoteMessageView.swift */, 14B48B4820B81C9700CE3EF4 /* EKXStatusBarMessageView.swift */, 14B48B4920B81C9700CE3EF4 /* EKAccessoryNoteMessageView.swift */, 14B48B4A20B81C9700CE3EF4 /* EKProcessingNoteMessageView.swift */, ); path = Notes; sourceTree = ""; }; 14B48B4C20B81C9700CE3EF4 /* MessagesUtils */ = { isa = PBXGroup; children = ( 14B48B4D20B81C9700CE3EF4 /* EKTextField.swift */, 14DF7B6921BBCD4D0058B2BB /* EKButtonView.swift */, 14B48B4E20B81C9700CE3EF4 /* EKButtonBarView.swift */, 14B3A51720C16D7A002306C4 /* EKRatingSymbolView.swift */, 14B3A51920C16E44002306C4 /* EKRatingSymbolsContainerView.swift */, 1461DEFC21E0A9FC0034E08C /* EntryAppearanceDescriptor.swift */, ); path = MessagesUtils; sourceTree = ""; }; 14C729C6209447CA0060D267 /* Samples */ = { isa = PBXGroup; children = ( 142D4944223C1F1B00020ABF /* ExampleNavigationController */, 14A6AABB20CA71D9005F3D81 /* ExampleViewController */, 14D18CD0209118950019AE7F /* NibExampleView */, ); path = Samples; sourceTree = ""; }; 14C894F3208E70A4003D8CE3 /* Playground */ = { isa = PBXGroup; children = ( 14C894FA208E79B8003D8CE3 /* EntryAttributeWrapper.swift */, 14A40C62208B7AA800B79474 /* PlaygroundViewController.swift */, 14D18CCB2090F53D0019AE7F /* Cells */, ); path = Playground; sourceTree = ""; }; 14C894FC208E7DD0003D8CE3 /* Utils */ = { isa = PBXGroup; children = ( 14C894FD208E7DDE003D8CE3 /* Font.swift */, 1496D955209CC6EF002CBB22 /* Object+ClassName.swift */, 14C729D8209496730060D267 /* UIScreen+Utils.swift */, 14C729D6209496180060D267 /* CGRect+Utils.swift */, 14E24A1C208B600E00F32B13 /* UIColor+Utils.swift */, 1496D951209CC2AF002CBB22 /* UIView+Nib.swift */, ); path = Utils; sourceTree = ""; }; 14D18CCB2090F53D0019AE7F /* Cells */ = { isa = PBXGroup; children = ( 147A9A602092682E00A49D7A /* SelectionHeaderView.swift */, 14C894F6208E70D5003D8CE3 /* SelectionTableViewCell.swift */, 14C894FF208E81BF003D8CE3 /* PositionSelectionTableViewCell.swift */, 14C89501208E83AA003D8CE3 /* WindowLevelSelectionTableViewCell.swift */, 14C75E072096430D0002465E /* PrioritySelectionTableViewCell.swift */, 14C89503208E870C003D8CE3 /* DisplayDurationSelectionTableViewCell.swift */, 143F3AA12090A6A7009F3719 /* ShadowSelectionTableViewCell.swift */, 143F3AA32090A70E009F3719 /* RoundCornersSelectionTableViewCell.swift */, 14C729D4209476A90060D267 /* BorderSelectionTableViewCell.swift */, 143F3AA92090AFB8009F3719 /* BackgroundStyleSelectionTableViewCell.swift */, 143F3AAB2090B312009F3719 /* UserInteractionSelectionTableViewCell.swift */, 143F3AAD2090B4E2009F3719 /* HapticFeedbackSelectionTableViewCell.swift */, 143F3AB12090B7F0009F3719 /* ScrollSelectionTableViewCell.swift */, 14D18CCC2090FE970019AE7F /* SafeAreaSelectionTableViewCell.swift */, 14D18CCE209105290019AE7F /* WidthSelectionTableViewCell.swift */, 147A9A6420926C5D00A49D7A /* HeightSelectionTableViewCell.swift */, 147A9A6220926A7500A49D7A /* MaxWidthSelectionTableViewCell.swift */, 14665620209204A5008FB96D /* AnimationSelectionTableViewCell.swift */, ); path = Cells; sourceTree = ""; }; 14D18CD0209118950019AE7F /* NibExampleView */ = { isa = PBXGroup; children = ( 14D18CD1209118DA0019AE7F /* NibExampleView.swift */, 14D18CD3209118E90019AE7F /* NibExampleView.xib */, ); path = NibExampleView; sourceTree = ""; }; 607FACC71AFB9204008FA782 = { isa = PBXGroup; children = ( 607FACF51AFB993E008FA782 /* Podspec Metadata */, 607FACD21AFB9204008FA782 /* DemoApp */, 607FACE81AFB9204008FA782 /* Tests */, 14B48B1720B81C9700CE3EF4 /* Source */, 143C6A1F20B54E4A00F7DD89 /* SwiftEntryKit */, 607FACD11AFB9204008FA782 /* Products */, 89834CCE498EB0030FCF4F08 /* Frameworks */, EA8D55529124D081F838F6C2 /* Pods */, ); sourceTree = ""; }; 607FACD11AFB9204008FA782 /* Products */ = { isa = PBXGroup; children = ( 607FACD01AFB9204008FA782 /* SwiftEntryKitDemo.app */, 607FACE51AFB9204008FA782 /* SwiftEntryKitTests.xctest */, 143C6A1E20B54E4A00F7DD89 /* SwiftEntryKit.framework */, ); name = Products; sourceTree = ""; }; 607FACD21AFB9204008FA782 /* DemoApp */ = { isa = PBXGroup; children = ( 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 149B2B57208F0C22007C829F /* Presets */, 14C894F3208E70A4003D8CE3 /* Playground */, 14C894FC208E7DD0003D8CE3 /* Utils */, 607FACD91AFB9204008FA782 /* Main.storyboard */, 607FACDC1AFB9204008FA782 /* Images.xcassets */, 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 607FACD31AFB9204008FA782 /* Supporting Files */, ); name = DemoApp; path = SwiftEntryKit; sourceTree = ""; }; 607FACD31AFB9204008FA782 /* Supporting Files */ = { isa = PBXGroup; children = ( 14580CCA20B7F4FB001AF703 /* DemoAppInfo.plist */, ); name = "Supporting Files"; sourceTree = ""; }; 607FACE81AFB9204008FA782 /* Tests */ = { isa = PBXGroup; children = ( 14CF407820AEEA6E00C744D1 /* AttributesCreationTest.swift */, 607FACE91AFB9204008FA782 /* Supporting Files */, ); path = Tests; sourceTree = ""; }; 607FACE91AFB9204008FA782 /* Supporting Files */ = { isa = PBXGroup; children = ( 607FACEA1AFB9204008FA782 /* Info.plist */, ); name = "Supporting Files"; sourceTree = ""; }; 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { isa = PBXGroup; children = ( F1F450C1E75BEC09B67F526C /* SwiftEntryKit.podspec */, EFEC60E1244126F18ABBB375 /* README.md */, 14CF407720AEC75F00C744D1 /* CHANGELOG.md */, 1496D957209CC860002CBB22 /* CREDITS.md */, 2A856CAE48665E23BC76CB3B /* LICENSE */, ); name = "Podspec Metadata"; sourceTree = ""; }; 89834CCE498EB0030FCF4F08 /* Frameworks */ = { isa = PBXGroup; children = ( 1430769C20B5E5970069BA1B /* QuickLayout.framework */, 14B0B95020B7E4FE00D24D8A /* QuickLayout.framework */, 39B9C8169640826800BA255C /* Pods_SwiftEntryKitDemo.framework */, 7287A554A48DB0976C7AA96F /* Pods_SwiftEntryKitTests.framework */, ); name = Frameworks; sourceTree = ""; }; EA8D55529124D081F838F6C2 /* Pods */ = { isa = PBXGroup; children = ( 12AB00853602FB01F90EB33D /* Pods-SwiftEntryKitDemo.debug.xcconfig */, CAFB554B7EC0872395B9099A /* Pods-SwiftEntryKitDemo.release.xcconfig */, 2953CEDC51190E5442C4A150 /* Pods-SwiftEntryKitTests.debug.xcconfig */, 0A7410C89E315570D823186E /* Pods-SwiftEntryKitTests.release.xcconfig */, ); path = Pods; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ 143C6A1B20B54E4A00F7DD89 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( 143C6A2220B54E4A00F7DD89 /* SwiftEntryKit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ 143C6A1D20B54E4A00F7DD89 /* SwiftEntryKit */ = { isa = PBXNativeTarget; buildConfigurationList = 143C6A2920B54E4A00F7DD89 /* Build configuration list for PBXNativeTarget "SwiftEntryKit" */; buildPhases = ( 143C6A1920B54E4A00F7DD89 /* Sources */, 143C6A1A20B54E4A00F7DD89 /* Frameworks */, 143C6A1B20B54E4A00F7DD89 /* Headers */, 143C6A1C20B54E4A00F7DD89 /* Resources */, ); buildRules = ( ); dependencies = ( ); name = SwiftEntryKit; productName = SwiftEntryKit; productReference = 143C6A1E20B54E4A00F7DD89 /* SwiftEntryKit.framework */; productType = "com.apple.product-type.framework"; }; 607FACCF1AFB9204008FA782 /* SwiftEntryKitDemo */ = { isa = PBXNativeTarget; buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SwiftEntryKitDemo" */; buildPhases = ( C3E3CEC7DFE6251C762E5986 /* [CP] Check Pods Manifest.lock */, 607FACCC1AFB9204008FA782 /* Sources */, 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, 143C6A2A20B54E4A00F7DD89 /* Embed Frameworks */, 7AEBD4A94FB4F3507967F562 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( 143C6A2420B54E4A00F7DD89 /* PBXTargetDependency */, ); name = SwiftEntryKitDemo; productName = SwiftEntryKit; productReference = 607FACD01AFB9204008FA782 /* SwiftEntryKitDemo.app */; productType = "com.apple.product-type.application"; }; 607FACE41AFB9204008FA782 /* SwiftEntryKitTests */ = { isa = PBXNativeTarget; buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SwiftEntryKitTests" */; buildPhases = ( 42BA4D0F12EC6E75EA1B321D /* [CP] Check Pods Manifest.lock */, 607FACE11AFB9204008FA782 /* Sources */, 607FACE21AFB9204008FA782 /* Frameworks */, 607FACE31AFB9204008FA782 /* Resources */, 40FB9744AA238E60A78C9944 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); dependencies = ( 607FACE71AFB9204008FA782 /* PBXTargetDependency */, ); name = SwiftEntryKitTests; productName = Tests; productReference = 607FACE51AFB9204008FA782 /* SwiftEntryKitTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 607FACC81AFB9204008FA782 /* Project object */ = { isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0830; LastUpgradeCheck = 0830; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 143C6A1D20B54E4A00F7DD89 = { CreatedOnToolsVersion = 9.3; ProvisioningStyle = Automatic; }; 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; LastSwiftMigration = 0900; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; LastSwiftMigration = 0900; ProvisioningStyle = Automatic; TestTargetID = 607FACCF1AFB9204008FA782; }; }; }; buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "SwiftEntryKit" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 607FACC71AFB9204008FA782; productRefGroup = 607FACD11AFB9204008FA782 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 607FACCF1AFB9204008FA782 /* SwiftEntryKitDemo */, 143C6A1D20B54E4A00F7DD89 /* SwiftEntryKit */, 607FACE41AFB9204008FA782 /* SwiftEntryKitTests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 143C6A1C20B54E4A00F7DD89 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; 607FACCE1AFB9204008FA782 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 142D4948223C1F5A00020ABF /* ContactsViewController.xib in Resources */, 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 142D494C223C204700020ABF /* DescriptionViewController.xib in Resources */, 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 14D18CD4209118E90019AE7F /* NibExampleView.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; 607FACE31AFB9204008FA782 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ 40FB9744AA238E60A78C9944 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 12; files = ( ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests-frameworks.sh", "${BUILT_PRODUCTS_DIR}/SwiftEntryKit/SwiftEntryKit.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftEntryKit.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 42BA4D0F12EC6E75EA1B321D /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-SwiftEntryKitTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 7AEBD4A94FB4F3507967F562 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 8; files = ( ); inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo-frameworks.sh", "${BUILT_PRODUCTS_DIR}/SwiftEntryKit/SwiftEntryKit.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftEntryKit.framework", ); runOnlyForDeploymentPostprocessing = 1; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; C3E3CEC7DFE6251C762E5986 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( "${PODS_PODFILE_DIR_PATH}/Podfile.lock", "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( "$(DERIVED_FILE_DIR)/Pods-SwiftEntryKitDemo-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 143C6A1920B54E4A00F7DD89 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 14A7B11F22ECEDE8009A4265 /* EKAttributes+DisplayMode.swift in Sources */, 14B48B5F20B81C9700CE3EF4 /* EKStyleView.swift in Sources */, 14B48B7120B81C9700CE3EF4 /* EKAttributes+Animation.swift in Sources */, 14B3A51A20C16E44002306C4 /* EKRatingSymbolsContainerView.swift in Sources */, 143C1576271C814E009A7D03 /* QLUtils.swift in Sources */, 14B48B8820B81C9700CE3EF4 /* EKMessageContentView.swift in Sources */, 144E51BD20D56E150051FDCA /* EKAttributes+LifecycleActions.swift in Sources */, 14B48B6F20B81C9700CE3EF4 /* EKAttributes+Validations.swift in Sources */, 14F3FD86213A6ED900CA3010 /* EntryCachingHeuristic.swift in Sources */, 14B48B6620B81C9700CE3EF4 /* UIView+Shadow.swift in Sources */, 14B48B7A20B81C9700CE3EF4 /* EKPopUpMessage.swift in Sources */, 14B48B6920B81C9700CE3EF4 /* EKAttributes+Shadow.swift in Sources */, 14B48B8220B81C9700CE3EF4 /* EKAccessoryNoteMessageView.swift in Sources */, 14B48B8720B81C9700CE3EF4 /* EKPopUpMessageView.swift in Sources */, 14B48B5A20B81C9700CE3EF4 /* EKWindowProvider.swift in Sources */, 14B48B7920B81C9700CE3EF4 /* EKAttributes+FrameStyle.swift in Sources */, 14B48B8520B81C9700CE3EF4 /* EKTextField.swift in Sources */, 14B48B7C20B81C9700CE3EF4 /* EKNotificationMessageView.swift in Sources */, 14B48B7820B81C9700CE3EF4 /* EKAttributes+HapticFeedback.swift in Sources */, 143C1573271C814E009A7D03 /* UIView+QuickLayout.swift in Sources */, 145F56B820B84ACA0027EB67 /* EKAttributes+StatusBar.swift in Sources */, 14B48B6220B81C9700CE3EF4 /* HapticFeedbackGenerator.swift in Sources */, 14B48B8420B81C9700CE3EF4 /* EKFormMessageView.swift in Sources */, 14B48B7D20B81C9700CE3EF4 /* EKAlertMessageView.swift in Sources */, 14B48B6B20B81C9700CE3EF4 /* EKAttributes+Position.swift in Sources */, 14B48B7E20B81C9700CE3EF4 /* EKSimpleMessageView.swift in Sources */, 14B48B6120B81C9700CE3EF4 /* GradientView.swift in Sources */, 14B48B6720B81C9700CE3EF4 /* SwiftEntryKit.swift in Sources */, 14B48B5B20B81C9700CE3EF4 /* EKWindow.swift in Sources */, 14A7B12222ECEF68009A4265 /* UIColor+Utils.swift in Sources */, 14B48B7420B81C9700CE3EF4 /* EKAttributes+Scroll.swift in Sources */, 14B48B6C20B81C9700CE3EF4 /* EKAttributes.swift in Sources */, 14B48B7020B81C9700CE3EF4 /* EKAttributes+PopBehavior.swift in Sources */, 14B48B6020B81C9700CE3EF4 /* UIView+Responder.swift in Sources */, 14B48B8120B81C9700CE3EF4 /* EKXStatusBarMessageView.swift in Sources */, 14B48B7220B81C9700CE3EF4 /* EKAttributes+PositionConstraints.swift in Sources */, 145F56BB20B863220027EB67 /* UIApplication+EKAppearance.swift in Sources */, 14B48B7720B81C9700CE3EF4 /* EKAttributes+BackgroundStyle.swift in Sources */, 14B48B6E20B81C9700CE3EF4 /* EKAttributes+Duration.swift in Sources */, 1461DEFD21E0A9FC0034E08C /* EntryAppearanceDescriptor.swift in Sources */, 14B48B6420B81C9700CE3EF4 /* UIRectCorner+Short.swift in Sources */, 14B48B5C20B81C9700CE3EF4 /* EKBackgroundView.swift in Sources */, 14B3A51420C16BAC002306C4 /* EKAlertMessage.swift in Sources */, 14B48B5820B81C9700CE3EF4 /* EKRootViewController.swift in Sources */, 14B3A50720C1198A002306C4 /* EKRatingMessageView.swift in Sources */, 14DF7B6A21BBCD4D0058B2BB /* EKButtonView.swift in Sources */, 143C1574271C814E009A7D03 /* UIViewArray+QuickLayout.swift in Sources */, 14B48B7520B81C9700CE3EF4 /* EKAttributes+Presets.swift in Sources */, 14B48B7B20B81C9700CE3EF4 /* EKNotificationMessage.swift in Sources */, 14B48B8620B81C9700CE3EF4 /* EKButtonBarView.swift in Sources */, 143C1575271C814E009A7D03 /* UIView+QLContentWrap.swift in Sources */, 14B48B5E20B81C9700CE3EF4 /* EKContentView.swift in Sources */, 14B48B6D20B81C9700CE3EF4 /* EKAttributes+UserInteraction.swift in Sources */, 14B48B7F20B81C9700CE3EF4 /* EKImageNoteMessageView.swift in Sources */, 14E59DBE22E49C0D0080AB4F /* EKColor.swift in Sources */, 14B48B6820B81C9700CE3EF4 /* EKProperty.swift in Sources */, 14B48B6520B81C9700CE3EF4 /* UIEdgeInsets+Utils.swift in Sources */, 14B3A51620C16BC3002306C4 /* EKSimpleMessage.swift in Sources */, 14B48B5D20B81C9700CE3EF4 /* EKWrapperView.swift in Sources */, 14B48B6320B81C9700CE3EF4 /* UIView+Utils.swift in Sources */, 14B3A51820C16D7A002306C4 /* EKRatingSymbolView.swift in Sources */, 14B3A51220C16B64002306C4 /* EKRatingMessage.swift in Sources */, 14B48B7620B81C9700CE3EF4 /* EKAttributes+WindowLevel.swift in Sources */, 14B48B5920B81C9700CE3EF4 /* EKEntryView.swift in Sources */, 14B48B8320B81C9700CE3EF4 /* EKProcessingNoteMessageView.swift in Sources */, 14B48B8020B81C9700CE3EF4 /* EKNoteMessageView.swift in Sources */, 14B48B7320B81C9700CE3EF4 /* EKAttributes+Precedence.swift in Sources */, 143C1577271C814E009A7D03 /* QLCompatibility.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 607FACCC1AFB9204008FA782 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 143F3AAC2090B312009F3719 /* UserInteractionSelectionTableViewCell.swift in Sources */, 14D18CCF209105290019AE7F /* WidthSelectionTableViewCell.swift in Sources */, 14C75E082096430D0002465E /* PrioritySelectionTableViewCell.swift in Sources */, 147A9A6320926A7500A49D7A /* MaxWidthSelectionTableViewCell.swift in Sources */, 142D494B223C204700020ABF /* DescriptionViewController.swift in Sources */, 14E24A1D208B600E00F32B13 /* UIColor+Utils.swift in Sources */, 14C89500208E81BF003D8CE3 /* PositionSelectionTableViewCell.swift in Sources */, 14F36800208B585E001E8F56 /* PresetsViewController.swift in Sources */, 142D493C223C1E7F00020ABF /* ExampleNavigationViewController.swift in Sources */, 142D4947223C1F5A00020ABF /* ContactsViewController.swift in Sources */, 14D18CD2209118DA0019AE7F /* NibExampleView.swift in Sources */, 1496D952209CC2AF002CBB22 /* UIView+Nib.swift in Sources */, 14A40C63208B7AA800B79474 /* PlaygroundViewController.swift in Sources */, 1496D956209CC6EF002CBB22 /* Object+ClassName.swift in Sources */, 143F3AAE2090B4E2009F3719 /* HapticFeedbackSelectionTableViewCell.swift in Sources */, 14C729D5209476A90060D267 /* BorderSelectionTableViewCell.swift in Sources */, 14A6AAC420CA7208005F3D81 /* ExampleViewController.swift in Sources */, 143F3AA42090A70E009F3719 /* RoundCornersSelectionTableViewCell.swift in Sources */, 14C894F8208E70D5003D8CE3 /* SelectionTableViewCell.swift in Sources */, 14665621209204A5008FB96D /* AnimationSelectionTableViewCell.swift in Sources */, 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 14D18CCD2090FE970019AE7F /* SafeAreaSelectionTableViewCell.swift in Sources */, 14C894FE208E7DDE003D8CE3 /* Font.swift in Sources */, 14C894FB208E79B8003D8CE3 /* EntryAttributeWrapper.swift in Sources */, 143F3AB22090B7F0009F3719 /* ScrollSelectionTableViewCell.swift in Sources */, 143F3AA22090A6A7009F3719 /* ShadowSelectionTableViewCell.swift in Sources */, 147A9A6520926C5D00A49D7A /* HeightSelectionTableViewCell.swift in Sources */, 149D0A1220AF1EE7000AA6C4 /* FormFieldPresetFactory.swift in Sources */, 14333AE3208FA09E00DCFC7B /* PresetDescription.swift in Sources */, 147A9A612092682E00A49D7A /* SelectionHeaderView.swift in Sources */, 14C729D9209496730060D267 /* UIScreen+Utils.swift in Sources */, 14A1AB3520930120001CA5B4 /* PresetsDataSource.swift in Sources */, 14C89504208E870C003D8CE3 /* DisplayDurationSelectionTableViewCell.swift in Sources */, 14F36801208B585E001E8F56 /* PresetTableViewCell.swift in Sources */, 14C89502208E83AA003D8CE3 /* WindowLevelSelectionTableViewCell.swift in Sources */, 143F3AAA2090AFB8009F3719 /* BackgroundStyleSelectionTableViewCell.swift in Sources */, 14C729D7209496180060D267 /* CGRect+Utils.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; 607FACE11AFB9204008FA782 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 149D0A0B20AF07EE000AA6C4 /* AttributesCreationTest.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ 143C6A2420B54E4A00F7DD89 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 143C6A1D20B54E4A00F7DD89 /* SwiftEntryKit */; targetProxy = 143C6A2320B54E4A00F7DD89 /* PBXContainerItemProxy */; }; 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 607FACCF1AFB9204008FA782 /* SwiftEntryKitDemo */; targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ 607FACD91AFB9204008FA782 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 607FACDA1AFB9204008FA782 /* Base */, ); name = Main.storyboard; sourceTree = ""; }; 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { isa = PBXVariantGroup; children = ( 607FACDF1AFB9204008FA782 /* Base */, ); name = LaunchScreen.xib; sourceTree = ""; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 143C6A2720B54E4A00F7DD89 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ""; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = SwiftEntryKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.huri.SwiftEntryKit; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_WORKSPACE = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; 143C6A2820B54E4A00F7DD89 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; FRAMEWORK_SEARCH_PATHS = ""; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = SwiftEntryKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.huri.SwiftEntryKit; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; SKIP_INSTALL = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_WORKSPACE = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; 607FACED1AFB9204008FA782 /* 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_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 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 = 9.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.2; }; name = Debug; }; 607FACEE1AFB9204008FA782 /* 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_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; 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; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 4.2; VALIDATE_PRODUCT = YES; }; name = Release; }; 607FACF01AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 12AB00853602FB01F90EB33D /* Pods-SwiftEntryKitDemo.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)", "\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit\"", ); INFOPLIST_FILE = SwiftEntryKit/DemoAppInfo.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = com.huri.SwiftEntryKitDemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_WORKSPACE = YES; }; name = Debug; }; 607FACF11AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = CAFB554B7EC0872395B9099A /* Pods-SwiftEntryKitDemo.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_IDENTITY = "iPhone Developer"; DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(SRCROOT)", "\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit\"", ); INFOPLIST_FILE = SwiftEntryKit/DemoAppInfo.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = com.huri.SwiftEntryKitDemo; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_WORKSPACE = YES; }; name = Release; }; 607FACF31AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 2953CEDC51190E5442C4A150 /* Pods-SwiftEntryKitTests.debug.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PLATFORM_DIR)/Developer/Library/Frameworks", "\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit\"", ); GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 5.0; }; name = Debug; }; 607FACF41AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = 0A7410C89E315570D823186E /* Pods-SwiftEntryKitTests.release.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PLATFORM_DIR)/Developer/Library/Frameworks", "\"${PODS_CONFIGURATION_BUILD_DIR}/SwiftEntryKit\"", ); INFOPLIST_FILE = Tests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_VERSION = 5.0; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 143C6A2920B54E4A00F7DD89 /* Build configuration list for PBXNativeTarget "SwiftEntryKit" */ = { isa = XCConfigurationList; buildConfigurations = ( 143C6A2720B54E4A00F7DD89 /* Debug */, 143C6A2820B54E4A00F7DD89 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "SwiftEntryKit" */ = { isa = XCConfigurationList; buildConfigurations = ( 607FACED1AFB9204008FA782 /* Debug */, 607FACEE1AFB9204008FA782 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SwiftEntryKitDemo" */ = { isa = XCConfigurationList; buildConfigurations = ( 607FACF01AFB9204008FA782 /* Debug */, 607FACF11AFB9204008FA782 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SwiftEntryKitTests" */ = { isa = XCConfigurationList; buildConfigurations = ( 607FACF31AFB9204008FA782 /* Debug */, 607FACF41AFB9204008FA782 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 607FACC81AFB9204008FA782 /* Project object */; } ================================================ FILE: Example/SwiftEntryKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: Example/SwiftEntryKit.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: Example/SwiftEntryKit.xcodeproj/xcshareddata/xcschemes/SwiftEntryKit.xcscheme ================================================ ================================================ FILE: Example/SwiftEntryKit.xcodeproj/xcshareddata/xcschemes/SwiftEntryKitDemo.xcscheme ================================================ ================================================ FILE: Example/SwiftEntryKit.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: Example/SwiftEntryKit.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist ================================================ IDEDidComputeMac32BitWarning ================================================ FILE: Example/SwiftEntryKit.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings ================================================ PreviewsEnabled ================================================ FILE: Example/Tests/AttributesCreationTest.swift ================================================ // // AttributesCreation.swift // SwiftEntryKitDemo // // Created by Daniel Huri on 5/18/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import XCTest @testable import SwiftEntryKit class AttributesCreationTest: XCTestSuite { func testDisplayPriorityInitMax() { var attributes = EKAttributes() attributes.precedence.priority = .max XCTAssertEqual(attributes.precedence.priority, .max) XCTAssertEqual(attributes.precedence.priority.rawValue, EKAttributes.Precedence.Priority.maxRawValue) } func testDisplayPriorityInitHigh() { var attributes = EKAttributes() attributes.precedence.priority = .high XCTAssertEqual(attributes.precedence.priority, .high) XCTAssertEqual(attributes.precedence.priority.rawValue, EKAttributes.Precedence.Priority.maxRawValue) } func testDisplayPriorityInitCustom() { var attributes = EKAttributes() let custom1 = EKAttributes.Precedence.override(priority: .init(999), dropEnqueuedEntries: true) attributes.precedence.priority = custom1.priority XCTAssertEqual(attributes.precedence.priority, custom1.priority) XCTAssertEqual(attributes.precedence.priority.rawValue, 999) let custom2 = EKAttributes.Precedence.override(priority: .init(1), dropEnqueuedEntries: true) attributes.precedence.priority = custom2.priority XCTAssertEqual(attributes.precedence.priority, custom2.priority) XCTAssertEqual(attributes.precedence.priority.rawValue, 1) XCTAssertLessThan(custom2.priority, custom1.priority) } func testPositionTop() { var attributes = EKAttributes() attributes.position = .top XCTAssertEqual(attributes.position, .top) XCTAssertTrue(attributes.position.isTop) } func testPositionCenter() { var attributes = EKAttributes() attributes.position = .center XCTAssertEqual(attributes.position, .center) XCTAssertTrue(attributes.position.isCenter) } func testPositionBottom() { var attributes = EKAttributes() attributes.position = .bottom XCTAssertEqual(attributes.position, .bottom) XCTAssertTrue(attributes.position.isBottom) } func testDisplayDurationInfinite() { var attributes = EKAttributes() attributes.displayDuration = .infinity XCTAssertTrue(attributes.validateDisplayDuration) XCTAssertTrue(attributes.isValid) } func testDisplayDurationConstant() { var attributes = EKAttributes() attributes.displayDuration = 1 XCTAssertTrue(attributes.validateDisplayDuration) XCTAssertTrue(attributes.isValid) } func testWindowLevelNormal() { var attributes = EKAttributes() attributes.windowLevel = .normal XCTAssertEqual(attributes.windowLevel.value, .normal) XCTAssertTrue(attributes.validateWindowLevel) XCTAssertTrue(attributes.isValid) } func testWindowLevelStatus() { var attributes = EKAttributes() attributes.windowLevel = .statusBar XCTAssertEqual(attributes.windowLevel.value, .statusBar) XCTAssertTrue(attributes.validateWindowLevel) XCTAssertTrue(attributes.isValid) } func testWindowLevelAlert() { var attributes = EKAttributes() attributes.windowLevel = .alerts XCTAssertEqual(attributes.windowLevel.value, .alert) XCTAssertTrue(attributes.validateWindowLevel) XCTAssertTrue(attributes.isValid) } func testWindowLevelCustom() { var attributes = EKAttributes() let level = UIWindow.Level(rawValue: 1) attributes.windowLevel = .custom(level: level) XCTAssertEqual(attributes.windowLevel.value, level) XCTAssertTrue(attributes.validateWindowLevel) XCTAssertTrue(attributes.isValid) } func testWindowLevelNegative() { var attributes = EKAttributes() let level = UIWindow.Level(rawValue: -1) attributes.windowLevel = .custom(level: level) XCTAssertEqual(attributes.windowLevel.value, level) XCTAssertFalse(attributes.validateWindowLevel) XCTAssertFalse(attributes.isValid) } } ================================================ FILE: Example/Tests/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1 ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2018 Daniel Huri, huri000@gmail.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. ================================================ FILE: PULL_REQUEST_TEMPLATE.md ================================================ ### Issue Link 🔗 *A link to the issue & short explanation* ### Goals 🥅 *What have I tried to achieve / improve + use case example* ### Implementation Details ✏️ *How did I implement* ### Testing Details 🔍 *How did I test my implementation* ### Screenshot Links 📷 *Since this a visual project, focusing maily on UI and UX, please attach screenshots in case of UI related change* ================================================ FILE: Package.swift ================================================ // swift-tools-version:5.0 // The swift-tools-version declares the minimum version of Swift required to build this package. import PackageDescription let package = Package( name: "SwiftEntryKit", platforms: [ .iOS(.v9) ], products: [ .library(name: "SwiftEntryKit", targets: ["SwiftEntryKit"]) ], targets: [ .target( name: "SwiftEntryKit", path: "Source" ) ], swiftLanguageVersions: [ .v5 ] ) ================================================ FILE: README.md ================================================ # SwiftEntryKit [![Platform](http://img.shields.io/badge/platform-iOS-blue.svg?style=flat)](https://developer.apple.com/iphone/index.action) [![Language](http://img.shields.io/badge/language-Swift-brightgreen.svg?style=flat)](https://developer.apple.com/swift) [![Version](https://img.shields.io/cocoapods/v/SwiftEntryKit.svg?style=flat-square)](http://cocoapods.org/pods/SwiftEntryKit) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Accio: Supported](https://img.shields.io/badge/Accio-supported-0A7CF5.svg?style=flat)](https://github.com/JamitLabs/Accio) [![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat)](http://mit-license.org) ![](https://travis-ci.com/huri000/SwiftEntryKit.svg?branch=master) 🤗 Donations can be made [here](#donations). ## Table of Contents * [Overview](#overview) * [Features](#features) * [Example Project](#example-project) * [Example Project Installation](#example-project-installation) * [Presets](#presets) * [Playground](#playground) * [Requirements](#requirements) * [Installation](#installation) * [Usage](#usage) * [Quick Usage](#quick-usage) * [Entry Attributes](#entry-attributes) * [Entry Name](#entry-name) * [Window Level](#window-level) * [Display Position](#display-position) * [Precedence](#precedence) * [Override](#override) * [Enqueue](#enqueue) * [Heuristics](#heuristics) * [Display Priority](#display-priority) * [Display Duration](#display-duration) * [Position Constraints](#position-constraints) * [User Interaction](#user-interaction) * [Scroll Behavior](#scroll-behavior) * [Haptic Feedback](#haptic-feedback) * [Lifecycle Events](#lifecycle-events) * [Display Mode](#display-mode) * [Background Style](#background-style) * [Shadow](#shadow) * [Round Corners](#round-corners) * [Border](#border) * [Animations](#animations) * [Pop Behavior](#pop-behavior) * [Status Bar](#status-bar) * [Presets Usage Example](#presets-usage-example) * [Custom View Usage Example](#custom-view-usage-example) * [Displaying a View Controller](#displaying-a-view-controller) * [Alternative Rollback Window](#alternative-rollback-window) * [Dismissing an Entry](#dismissing-an-entry) * [Swiping and Rubber Banding](#swiping-and-rubber-banding) * [Dealing With Safe Area](#dealing-with-safe-area) * [Dealing With Orientation Change](#dealing-with-orientation-change) * [Swift and Objective-C Interoperability](#swift-and-objective-c-interoperability) * [Author](#author) * [Donations](#donations) * [License](#license) ## Overview SwiftEntryKit is a simple yet versatile content presenter written in Swift. ### Features Banners or pop-ups are called *Entries*. - Entries are displayed inside a separate UIWindow (of type EKWindow), so users are able to navigate the app freely while entries are being displayed in a non intrusive manner. - The kit offers beautiful [presets](#presets) that can be themed with your own colors and fonts. - **Customization**: Entries are highly customizable - [x] Can be [positioned](#display-position) either at the top, center, or the bottom of the screen. - [x] Can be displayed within or outside the screen safe area. - [x] Can be stylized: have a [border](#border), [drop-shadow](#shadow) and [round corners](#round-corners). - [x] Their content and the surrounding background can be blurred, dimmed, colored or have a gradient [style](#background-style). - [x] Transition [animations](#animations) are customizable - entrance, exit and pop (by another entry). - [x] The [user interaction](#user-interaction) with the entry or the screen can be intercepted. - [x] Entries can be enqueued or override previous entries using the [precedence](#precedence) attribute. - [x] Each entry has a [display priority](#display-priority) attribute. That means that it can be dismissed only by other entry with an equal or higher priority. - [x] Presets support accessibility. - [x] Entries have an optional rubber banding effect while panning. - [x] Entries can be optionally dismissed using a simple [swipe gesture](#swiping-and-rubber-banding). - [x] Entries can be optionally injected with [lifecycle events](#lifecycle-events): *will* and *did* appear/disappear. - [x] The [status bar style](#status-bar) is settable for the display duration of the entry. - [x] Supports [navigation controllers](#presets) & [custom views](#custom-view-usage-example) as well! ## Example Project The example project contains various presets and examples you can use and modify as your like. ### Example Project Installation You can either use the terminal or git client such as Source Tree. #### Terminal Users ```bash $ git clone https://github.com/huri000/SwiftEntryKit.git ``` #### Git Client (Source Tree) Clone https://github.com/huri000/SwiftEntryKit.git ### Presets | Toasts | Notes | Floats | Popups | | --- | --- | --- | --- | | ![toasts_example](https://github.com/huri000/assets/blob/master/swift-entrykit/toasts.gif) | ![notes_example](https://github.com/huri000/assets/blob/master/swift-entrykit/notes.gif) | ![floats_example](https://github.com/huri000/assets/blob/master/swift-entrykit/floats.gif) | ![popup_example](https://github.com/huri000/assets/blob/master/swift-entrykit/popups.gif) | | Alerts | Forms | Rating | More... | | --- | --- | --- | --- | | ![alert_example](https://github.com/huri000/assets/blob/master/swift-entrykit/alerts.gif) | ![form_example](https://github.com/huri000/assets/blob/master/swift-entrykit/forms.gif) | ![rating_example](https://github.com/huri000/assets/blob/master/swift-entrykit/rating.gif) | ![custom_example](https://github.com/huri000/assets/blob/master/swift-entrykit/custom.gif) | ### Playground **noun: a place where people can play 🏈** The example app contains a playground screen, an interface that allows you to customize your preferable entries. The playground screen has some limitations (allows to select constant values) but you can easily modify the code to suit your needs. Check it out! The Playground Screen | Top Toast Sample --- | --- ![playground_example](https://github.com/huri000/assets/blob/master/swift-entrykit/playground.gif) | ![playground-sample-1](https://github.com/huri000/assets/blob/master/swift-entrykit/playground-sample-1.jpeg) ## Requirements - iOS 9 or any higher version. - Xcode 9 or any higher version. - Swift 4.0 or any higher version. - The library has not been tested with iOS 8.x.y or a lower version. ## Installation - SwiftEntryKit is compatible with Swift 5 as of release *1.0.0*. - SwiftEntryKit is compatible with Swift 4.2 as of release *0.8.1*. - Developers who use lower Swift version should install release *0.7.2*. ### CocoaPods [CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: ```bash $ gem install cocoapods ``` To integrate SwiftEntryKit into your Xcode project using CocoaPods, specify it in your `Podfile`: ```ruby source 'https://github.com/cocoapods/specs.git' platform :ios, '9.0' use_frameworks! pod 'SwiftEntryKit', '2.0.0' ``` Then, run the following command: ```bash $ pod install ``` ### Carthage [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. You can install Carthage with [Homebrew](http://brew.sh/) using the following command: ```bash $ brew update $ brew install carthage ``` To integrate SwiftEntryKit into your Xcode project using Carthage, specify the following in your `Cartfile`: ```ogdl github "huri000/SwiftEntryKit" == 2.0.0 ``` ### Accio [Accio](https://github.com/JamitLabs/Accio) is a decentralized dependency manager driven by SwiftPM that works for iOS/tvOS/watchOS/macOS projects. You can install Accio with [Homebrew](http://brew.sh/) using the following command: ```bash $ brew tap JamitLabs/Accio https://github.com/JamitLabs/Accio.git $ brew install accio ``` To integrate SwiftEntryKit into your Xcode project using Accio, specify the following in your `Package.swift` manifest: ```swift .package(url: "https://github.com/huri000/SwiftEntryKit", .exact("2.0.0")) ``` After specifying `"SwiftEntryKit"` as a dependency of the target in which you want to use it, run `accio install`. ## Usage ### Quick Usage No setup is needed! Each time you wish to display an entry, just create your view and initialize an EKAttributes struct. See also the [preset usage example](#presets-usage-example), and the example project. likewise: ```Swift // Customized view let customView = SomeCustomView() /* Do some customization on customView */ // Attributes struct that describes the display, style, user interaction and animations of customView. var attributes = EKAttributes() /* Adjust preferable attributes */ ``` And then, just call: ```Swift SwiftEntryKit.display(entry: customView, using: attributes) ``` The kit will replace the application main window with the EKWindow instance and display the entry. ### Entry Attributes *EKAttributes* is the entry's descriptor. Each time an entry is displayed, an EKAttributes struct is necessary to describe the entry's presentation, position inside the screen, the display duration, its frame constraints (if needed), its styling (corners, border and shadow), the user interaction events, the animations (in / out) and more. Create a mutable EKAttributes structure likewise: ```Swift var attributes = EKAttributes() ``` Below are the properties that can be modified in the *EKAttributes*: #### Entry Name Entries can have names. When an EKAttributes struct is instantiated, it is nameless, meaning, the `name` property is `nil`. It is recommended to set a meaningful name for an entry. ```Swift attributes.name = "Top Note" ``` Entries with names can be specifically referred to later, for example, you can inquire whether a **specific** entry is currently displayed: ```Swift if SwiftEntryKit.isCurrentlyDisplaying(entryNamed: "Top Note") { /* Do your things */ } ``` #### Window Level Entries can be displayed above the application main window, above the status bar, above the alerts window or even have a custom level (UIWindowLevel). For example, set the window level to *normal*, likewise: ```Swift attributes.windowLevel = .normal ``` This causes the entry to appear above the application key window and below the status bar. The default value of `windowLevel` is `.statusBar`. #### Display Position The entry can be displayed either at the *top*, *center*, or the *bottom* of the screen. For example, set the display position to *bottom*, likewise: ```Swift attributes.position = .bottom ``` The default value of `position` is `.top`. #### Precedence The precedence attribute of an entry describes the manner in which entries are pushed in. It offers 2 approaches for managing the presentation priority of multiple simultaneous entries. ##### Override If the [display priority](#display-priority) is equal or higher than the currently displayed entry, override it. Example for setting `.override` precedence with `.max` display priority while ignoring entries that are already enqueued (leaving them to display after the new entry is dismissed). ```Swift attributes.precedence = .override(priority: .max, dropEnqueuedEntries: false) ``` You can optionally flush the entries that are inside the queue. In case `dropEnqueuedEntries` is `false`, enqueued entries remain in the queue. The first enqueued entry will show right after the new entry pops out. In case `dropEnqueuedEntries` is `true`, the entry-queue is flushed as the new entry is being displayed. ##### Enqueue If the queue is empty, display the entry immediately, otherwise, insert the entry into the queue until its turn to show arrives. Example for setting `.enqueue` precedence with `.normal` display priority: ```Swift attributes.precedence = .enqueue(priority: .normal) ``` ###### Heuristics There are 2 possible heuristics for entries prioritization in the queue: - Display Priority Queue: The entries are sorted by their [display priority](#display-priority), then by chronological order. - Chronological Queue: The entries are sorted only by their chronological order (standard queue). Select the heuristic that suits you best by doing the following, only once, before using `SwiftEntryKit` to display entries. ```Swift EKAttributes.Precedence.QueueingHeuristic.value = .priority ``` Or: ```Swift EKAttributes.Precedence.QueueingHeuristic.value = .chronological ``` The default value of `EKAttributes.Precedence.QueueingHeuristic.value` is `.priority`. The default value of precedence is `.override(priority: .normal, dropEnqueuedEntries: false)`. ##### Display Priority The display priority of the entry determines whether it dismisses other entries or is dismissed by them. An entry can be dismissed only by an entry with an equal or a higher display priority. ```Swift let highPriorityAttributes = EKAttributes() highPriorityAttributes.precedence.priority = .high let normalPriorityAttributes = EKAttributes() normalPriorityAttributes.precedence.priority = .normal // Display high priority entry SwiftEntryKit.display(entry: view1, using: highPriorityAttributes) // Display normal priority entry (ignored!) SwiftEntryKit.display(entry: view2, using: normalPriorityAttributes) ``` *view2* won't be displayed! #### Display Duration The display duration of the entry (Counted from the moment the entry has finished its entrance animation and until the exit animation begins). Display for 4 seconds: ```Swift attributes.displayDuration = 4 ``` Display for an infinite duration ```Swift attributes.displayDuration = .infinity ``` The default value of `displayDuration` is `2`. #### Position Constraints Constraints that tie the entry tightly to the screen context, for example: Height, Width, Max Width, Max Height, Additional Vertical Offset & Safe Area related info. - Entries that support Auto Layout - Their height is inferred from the constraints that applied to them. - Entries that don't support Auto Layout - Their exact size must be explicitly set using `positionConstraints`'s `size` property. For example: Ratio edge - signifies that the ratio of the width edge has a ratio of 0.9 of the screen's width. ```Swift let widthConstraint = EKAttributes.PositionConstraints.Edge.ratio(value: 0.9) ``` Intrinsic edge - signifies that the wanted height value is the content height - Decided by the entries vertical constraints ```Swift let heightConstraint = EKAttributes.PositionConstraints.Edge.intrinsic ``` Create the entry size constraints likewise: ```Swift attributes.positionConstraints.size = .init(width: widthConstraint, height: heightConstraint) ``` You can also set *attributes.positionConstraints.maxSize* in order to make sure the entry does not exceeds predefined limitations. This is useful on [device orientation change](#how-to-deal-with-orientation-change). Safe Area - can be used to override the safe area or to color it (More examples are in the example project) That snippet implies that the safe area insets should be kept and not be a part of the entry. ```Swift attributes.positionConstraints.safeArea = .empty(fillSafeArea: false) ``` Vertical Offset - an additional offset that can be applied to the entry (Other than the safe area). ```Swift attributes.positionConstraints.verticalOffset = 10 ``` Autorotation - whether the entry autorotates along with the orientation of the device. Defaults to `true`. ```Swift attributes.positionConstraints.rotation.isEnabled = false ``` Keyboard Releation - used to bind an entry to the keyboard once the keyboard is displayed. ```Swift let offset = EKAttributes.PositionConstraints.KeyboardRelation.Offset(bottom: 10, screenEdgeResistance: 20) let keyboardRelation = EKAttributes.PositionConstraints.KeyboardRelation.bind(offset: offset) attributes.positionConstraints.keyboardRelation = keyboardRelation ``` In the example above the entry's bottom is tuned to have a 10pts offset from the top of the keyboard (while it shows) Because the entry's frame might exceed the screen bounds, the user might not see all the entry - we wouldn't want that. Therefore, an additional associated value has been added - `screenEdgeResistance` with value of 20pts. That is, to make sure that the entry remains within the bounds of the screen, and always visible to the user. The extreme situation might occur as the device orientation is landscape and the keyboard shows up (See example project form presets for more information). #### User Interaction The entry and the screen can be interacted by the user. User interaction be can intercepted in various ways: An interaction (Any touch whatsoever) with the entry delays its exit by 3s: ```Swift attributes.entryInteraction = .delayExit(by: 3) ``` A tap on the entry / screen dismisses it immediately: ```Swift attributes.entryInteraction = .dismiss attributes.screenInteraction = .dismiss ``` A tap on the entry is swallowed (ignored): ```Swift attributes.entryInteraction = .absorbTouches ``` A tap on the screen is forwarded to the lower level window, in most cases the receiver will be the application window. This is very useful when you want to display an unintrusive content like banners and push notification entries. ```Swift attributes.screenInteraction = .forward ``` Pass additional actions that are invoked when the user taps the entry: ```Swift let action = { // Do something useful } attributes.entryInteraction.customTapActions.append(action) ``` The default value of `screenInteraction` is `.forward`. The default value of `entryInteraction` is `.dismiss`. #### Scroll Behavior Describes the entry behavior when it's being scrolled, that is, dismissal by a swipe gesture and a rubber band effect much similar to a UIScrollView. Disable the pan and swipe gestures on the entry: ```Swift attributes.scroll = .disabled ``` Enable swipe and stretch and pullback with jolt effect: ```Swift attributes.scroll = .enabled(swipeable: true, pullbackAnimation: .jolt) ``` Enable swipe and stretch and pullback with an ease-out effect: ```Swift attributes.scroll = .enabled(swipeable: true, pullbackAnimation: .easeOut) ``` Enable swipe but disable stretch: ```Swift attributes.scroll = .edgeCrossingDisabled(swipeable: true) ``` The default value of `scroll` is `.enabled(swipeable: true, pullbackAnimation: .jolt)`. #### [Haptic Feedback](https://developer.apple.com/ios/human-interface-guidelines/user-interaction/feedback/) The device can produce a haptic feedback, thus adding an additional sensory depth to each entry. The default value of `hapticFeedbackType` is `.none`. #### Lifecycle Events Events can be injected to the entry so that they are to be called during its lifecycle. ```Swift attributes.lifecycleEvents.willAppear = { // Executed before the entry animates inside } attributes.lifecycleEvents.didAppear = { // Executed after the entry animates inside } attributes.lifecycleEvents.willDisappear = { // Executed before the entry animates outside } attributes.lifecycleEvents.didDisappear = { // Executed after the entry animates outside } ``` #### Display Mode To allow you to fully support any user interface style, `SwiftEntryKit` introduces two specialized types: - `EKColor` describes a color under light and dark modes. - `EKAttributes.BackgroundStyle.BlurStyle` describes a blur effect under light and dark modes. The following forces `SwiftEntryKit` to display the entry on dark mode. ```Swift attributes.displayMode = .dark ``` The possible values are: `.light`, `.dark`, `.inferred`. The default value is `.inferred`, which means that the entry will be displayed with the current user interface style. #### Background Style The entry and the screen can have various background styles, such as blur, color, gradient and even an image. The following example implies clear background for both the entry and the screen: ```Swift attributes.entryBackground = .clear attributes.screenBackground = .clear ``` Colored entry background and dimmed screen background: ```Swift attributes.entryBackground = .color(color: .standardContent) attributes.screenBackground = .color(color: EKColor(UIColor(white: 0.5, alpha: 0.5))) ``` Gradient entry background (diagonal vector): ```Swift let colors: [EKColor] = ... attributes.entryBackground = .gradient(gradient: .init(colors: colors, startPoint: .zero, endPoint: CGPoint(x: 1, y: 1))) ``` Visual Effect entry background: ```Swift attributes.entryBackground = .visualEffect(style: .dark) ``` The default value of `entryBackground` and `screenBackground` is `.clear`. #### Shadow The shadow that surrounds the entry. Enable shadow around the entry: ```Swift attributes.shadow = .active(with: .init(color: .black, opacity: 0.3, radius: 10, offset: .zero)) ``` Disable shadow around the entry: ```Swift attributes.shadow = .none ``` The default value of `shadow` is `.none`. #### Round Corners Round corners around the entry. Only top left and right corners with radius of 10: ```Swift attributes.roundCorners = .top(radius: 10) ``` Only bottom left and right corners with radius of 10: ```Swift attributes.roundCorners = .bottom(radius: 10) ``` All corners with radius of 10: ```Swift attributes.roundCorners = .all(radius: 10) ``` No round corners: ```Swift attributes.roundCorners = .none ``` The default value of `roundCorners` is `.none`. #### Border The border around the entry. Add a black border with thickness of 0.5pts: ```Swift attributes.border = .value(color: .black, width: 0.5) ``` No border: ```Swift attributes.border = .none ``` The default value of `border` is `.none`. #### Animations Describes how the entry animates into and out of the screen. * Each animation descriptor can have up to 3 types of animations at the same time. Those can be combined to a single complex one! * Translation animation anchor can be explicitly set but it receives a default value according to position of the entry. Example for _translation_ from top with spring, _scale_ in and even _fade in_ as a single entrance animation: ```Swift attributes.entranceAnimation = .init( translate: .init(duration: 0.7, anchorPosition: .top, spring: .init(damping: 1, initialVelocity: 0)), scale: .init(from: 0.6, to: 1, duration: 0.7), fade: .init(from: 0.8, to: 1, duration: 0.3)) ``` The default value of `entranceAnimation` and `exitAnimation` is `.translation` - The entry translates in or out, respectively, with duration of 0.3 seconds. #### Pop Behavior Describes the entry behavior when it's being popped (dismissed by an entry with equal / higher display-priority. The entry is being popped animatedly: ```Swift attributes.popBehavior = .animated(animation: .init(translate: .init(duration: 0.2))) ``` The entry is being overridden (Disappears promptly): ```Swift attributes.popBehavior = .overridden ``` The default value of `popBehavior` is `.animated(animation: .translation)` - It translates out with duration of 0.3 seconds. #### Status Bar The status bar appearance can be modified during the display of the entry. SwiftEntryKit supports both *View controller-based status bar appearance* and manual setting. Setting the status bar style is fairly simple - Status bar becomes visible and gets a light style: ```Swift attributes.statusBar = .light ``` The status bar becomes hidden: ```Swift attributes.statusBar = .hidden ``` The status bar appearance is inferred from the previous context (won't be changed): ```Swift attributes.statusBar = .inferred ``` In case there is an already presenting entry with lower/equal display priority, the status bar will change its style. When the entry is removed, the status bar gets its initial style back. The default value of `statusBar` is `.inferred`. #### EKAttributes' interface is as follows: ```Swift public struct EKAttributes // Identification public var name: String? // Display public var windowLevel: WindowLevel public var position: Position public var precedence: Precedence public var displayDuration: DisplayDuration public var positionConstraints: PositionConstraints // User Interaction public var screenInteraction: UserInteraction public var entryInteraction: UserInteraction public var scroll: Scroll public var hapticFeedbackType: NotificationHapticFeedback public var lifecycleEvents: LifecycleEvents // Theme & Style public var displayMode = DisplayMode.inferred public var entryBackground: BackgroundStyle public var screenBackground: BackgroundStyle public var shadow: Shadow public var roundCorners: RoundCorners public var border: Border public var statusBar: StatusBar // Animations public var entranceAnimation: Animation public var exitAnimation: Animation public var popBehavior: PopBehavior } ``` ### Presets Usage Example: You can use one of the presets that come with SwiftEntryKit, doing these 4 simple steps: 1. Create your *EKAttributes* struct and set your preferable properties. 2. Create *EKNotificationMessage* struct (The Content) and set the content. 3. Create *EKNotificationMessageView* (The View) and inject *EKNotificationMessage* struct to it. 4. Display the entry using *SwiftEntryKit* class method. #### EKNotificationMessageView preset example: ```Swift // Generate top floating entry and set some properties var attributes = EKAttributes.topFloat attributes.entryBackground = .gradient(gradient: .init(colors: [EKColor(.red), EKColor(.green)], startPoint: .zero, endPoint: CGPoint(x: 1, y: 1))) attributes.popBehavior = .animated(animation: .init(translate: .init(duration: 0.3), scale: .init(from: 1, to: 0.7, duration: 0.7))) attributes.shadow = .active(with: .init(color: .black, opacity: 0.5, radius: 10, offset: .zero)) attributes.statusBar = .dark attributes.scroll = .enabled(swipeable: true, pullbackAnimation: .jolt) attributes.positionConstraints.maxSize = .init(width: .constant(value: UIScreen.main.minEdge), height: .intrinsic) let title = EKProperty.LabelContent(text: titleText, style: .init(font: titleFont, color: textColor)) let description = EKProperty.LabelContent(text: descText, style: .init(font: descFont, color: textColor)) let image = EKProperty.ImageContent(image: UIImage(named: imageName)!, size: CGSize(width: 35, height: 35)) let simpleMessage = EKSimpleMessage(image: image, title: title, description: description) let notificationMessage = EKNotificationMessage(simpleMessage: simpleMessage) let contentView = EKNotificationMessageView(with: notificationMessage) SwiftEntryKit.display(entry: contentView, using: attributes) ``` ### Custom View Usage Example: ```Swift // Create a basic toast that appears at the top var attributes = EKAttributes.topToast // Set its background to white attributes.entryBackground = .color(color: .white) // Animate in and out using default translation attributes.entranceAnimation = .translation attributes.exitAnimation = .translation let customView = UIView() /* ... Customize the view as you like ... */ // Display the view with the configuration SwiftEntryKit.display(entry: customView, using: attributes) ``` ### Displaying a View Controller As from version 0.4.0, view controllers are supported as well. ```Swift SwiftEntryKit.display(entry: customViewController, using: attributes) ``` ### Alternative Rollback Window By default, the window held by the application delegate becomes the key again right after SwiftEntryKit has finished displaying the entry. This behavior can be changed using `rollbackWindow` parameter. ```Swift SwiftEntryKit.display(entry: view, using: attributes, rollbackWindow: .custom(window: alternativeWindow)) ``` After the entry has been dismissed, the given window `alternativeWindow` would become the key instead of the window that is held by the application delegate. ### Dismissing an Entry You can dismiss the currently displayed entry by simply invoke *dismiss* in the SwiftEntryKit class, likewise: ```Swift SwiftEntryKit.dismiss() ``` Or: ```Swift SwiftEntryKit.dismiss(.displayed) ``` This dismisses the entry animatedly using its *exitAnimation* attribute and on completion, the window would be removed as well. You can dismiss the currently displayed entry and flush the queue as well, likewise: ```Swift SwiftEntryKit.dismiss(.all) ``` Only flush the queue, leaving any currently displayed entry to its natural lifecycle: ```Swift SwiftEntryKit.dismiss(.queue) ``` Dismiss a specific entry by name - either currently displayed or enqueued. All the entries with the given name are dismissed. ```Swift SwiftEntryKit.dismiss(.specific(entryName: "Entry Name")) ``` Dismiss any entry with a lower or equal display priority of `.normal`. ```Swift SwiftEntryKit.dismiss(.prioritizedLowerOrEqualTo(priority: .normal)) ``` #### Using a completion handler Inject a trailing closure to be executed after the entry dismissal. ```Swift SwiftEntryKit.dismiss { // Executed right after the entry has been dismissed } ``` ### Is Currently Displaying Inquire whether an entry is currently displayed: ```Swift if SwiftEntryKit.isCurrentlyDisplaying { /* Do your things */ } ``` Inquire whether a **specific** entry is currently displayed using the `name` property inside `EKAttributes`. ```Swift if SwiftEntryKit.isCurrentlyDisplaying(entryNamed: "Top Note") { /* Do your things */ } ``` ### Queue Contains Inquire whether the queue of entries is not empty: ```Swift if SwiftEntryKit.isQueueEmpty { /* Do your things */ } ``` Inquire whether the queue of entries contains an entry with name: ```Swift if SwiftEntryKit.queueContains(entryNamed: "Custom-Name") { /* Do your things */ } ``` ### Swiping and Rubber Banding Entries can be panned vertically (This ability can be enabled using the *scroll* attributes). Thefore it's only natural that an entry can be dismissed using a swipe-like gesture. Enable swipe gesture. When the swipe gesture fails (doesn't pass the velocity threshold) ease it back. ```Swift attributes.scroll = .enabled(swipeable: true, pullbackAnimation: .easeOut) ``` Enable swipe gesture. When the swipe gesture fails throw it back out with a jolt. ```Swift attributes.scroll = .enabled(swipeable: true, pullbackAnimation: .jolt) ``` The *PullbackAnimation* values (duration, damping & initialSpringVelocity) can be customized as well. Swipe | Jolt | --- | --- | ![swipe_example](https://github.com/huri000/assets/blob/master/swift-entrykit/swipe.gif) | ![band_example](https://github.com/huri000/assets/blob/master/swift-entrykit/rubber_band.gif) | ### Dealing with safe area: *EKAttributes.PositionConstraints.SafeArea* may be used to override the safe area with the entry's content, or to fill the safe area with a background color (like [Toasts](https://github.com/huri000/assets/blob/master/swift-entrykit/toasts.gif) do), or even leave the safe area empty (Like [Floats](https://github.com/huri000/assets/blob/master/swift-entrykit/floats.gif) do). SwiftEntryKit supports iOS 11.x.y and is backward compatible to iOS 9.x.y, so the status bar area is treated as same as the safe area in earlier iOS versions. ### Dealing with orientation change: SwiftEntryKit identifies orientation changes and adjust the entry's layout to those changes. Therefore, if you wish to limit the entries's width, you are able to do so by giving it a maximum value, likewise: ```Swift var attributes = EKAttributes.topFloat // Give the entry the width of the screen minus 20pts from each side, the height is decided by the content's contraint's attributes.positionConstraints.size = .init(width: .offset(value: 20), height: .intrinsic) // Give the entry maximum width of the screen minimum edge - thus the entry won't grow much when the device orientation changes from portrait to landscape mode. let edgeWidth = min(UIScreen.main.bounds.width, UIScreen.main.bounds.height) attributes.positionConstraints.maxSize = .init(width: .constant(value: edgeWidth), height: .intrinsic) let customView = UIView() /* ... Customize the view as you like ... */ // Use class method of SwiftEntryKit to display the view using the desired attributes SwiftEntryKit.display(entry: customView, using: attributes) ``` Orientation Change Demonstration | --- | ![orientation_change](https://github.com/huri000/assets/blob/master/swift-entrykit/orientation.gif) ### Dark Mode in the Example Project You can tinker with the display mode using a segmented control on presets screen, forcing light and dark modes. All the presets are dark mode ready, but only some in the example project demonstrate dark mode capabilities. ![light_dark](https://github.com/huri000/assets/blob/master/swift-entrykit/dark-light.gif) ### Swift and Objective-C Interoperability SwiftEntryKit's APIs use the Swift language exclusive syntax (enums, associated values, and more). Therefore, `SwiftEntryKit` cannot be referenced directly from an Objective-C file (*.m*, *.h* or *.mm*). Yet, it is pretty easy to integrate SwiftEntryKit into an Objective-C project using a simple *.swift* class that is a sort of adapter between `SwiftEntryKit` and your Objective-C code. [This project](https://github.com/huri000/ObjcEntryKitExample) demonstrates that using Carthage and CocoaPods. ## Author Daniel Huri, huri000@gmail.com ## Donations Donations can be made by sending either Bitcoin or Ether to the following addresses. | BTC | ETH | | :---: | :---: | | 134TiBiUvVNt7Na5KXEFBSChLdgVDw1Hnr | 0xAe6616181FCdde4793AE749Ce21Cd5Af9333A3E2 | | ![btc_address](https://github.com/huri000/assets/blob/master/donate/btc-address.png) | ![eth_address](https://github.com/huri000/assets/blob/master/donate/eth-address.png) | ## Thank You Thanks Lily Azar, lilushkaa@gmail.com for those awesome preset icons. ## Credits [**Icons Credits**](/CREDITS.md) ## License SwiftEntryKit is available under the MIT license. See the [LICENSE](/LICENSE) file for more info. ### Exceptions Please be aware that any use of the icons inside the project requires attribution to the creator. See [credits](/CREDITS.md) for the creators list. ================================================ FILE: Source/Extensions/QuickLayout/QLCompatibility.swift ================================================ // // QLCompatibility.swift // Pods // // Created by Daniel Huri on 5/12/18. // import Foundation import UIKit public typealias QLAttribute = NSLayoutConstraint.Attribute public typealias QLRelation = NSLayoutConstraint.Relation public typealias QLView = UIView public typealias QLPriority = UILayoutPriority ================================================ FILE: Source/Extensions/QuickLayout/QLUtils.swift ================================================ // // QLUtils.swift // QuickLayout // // Created by Daniel Huri on 11/21/17. // import Foundation import UIKit /** Typealias for dictionary that contains multiple constraints */ public typealias QLMultipleConstraints = [QLAttribute: NSLayoutConstraint] /** Extends layout priority to other readable types */ public extension QLPriority { static let must = QLPriority(rawValue: 999) static let zero = QLPriority(rawValue: 0) } /** Represents pair of attributes */ public struct QLAttributePair { public let first: QLAttribute public let second: QLAttribute } /** Represents size constraints */ public struct QLSizeConstraints { public let width: NSLayoutConstraint public let height: NSLayoutConstraint } /** Represents center constraints */ public struct QLCenterConstraints { public let x: NSLayoutConstraint public let y: NSLayoutConstraint } /** Represents axis constraints (might be .top and .bottom, .left and .right, .leading and .trailing) */ public struct QLAxisConstraints { public let first: NSLayoutConstraint public let second: NSLayoutConstraint } /** Represents center and size constraints */ public struct QLFillConstraints { public let center: QLCenterConstraints public let size: QLSizeConstraints } /** Represents pair of priorities */ public struct QLPriorityPair { public let horizontal: QLPriority public let vertical: QLPriority public static var required: QLPriorityPair { return QLPriorityPair(.required, .required) } public static var must: QLPriorityPair { return QLPriorityPair(.must, .must) } public init(_ horizontal: QLPriority, _ vertical: QLPriority) { self.horizontal = horizontal self.vertical = vertical } } /** Represents axis description */ public enum QLAxis { case horizontally case vertically public var attributes: QLAttributePair { let first: QLAttribute let second: QLAttribute switch self { case .horizontally: first = .left second = .right case .vertically: first = .top second = .bottom } return QLAttributePair(first: first, second: second) } } ================================================ FILE: Source/Extensions/QuickLayout/UIView+QLContentWrap.swift ================================================ // // QLView+QLContentWrap.swift // QuickLayout // // Created by Daniel Huri on 11/21/17. // import Foundation import UIKit // MARK: Content Compression Resistance & Content Hugging Priority public extension QLView { /** Force hugging and compression resistance for the given axes, using variadic parameter. - parameter axes: The axes */ func forceContentWrap(_ axes: QLAxis...) { if axes.contains(.vertically) { verticalHuggingPriority = .required verticalCompressionResistancePriority = .required } if axes.contains(.horizontally) { horizontalHuggingPriority = .required horizontalCompressionResistancePriority = .required } } /** Force hugging and compression resistance vertically and horizontally. */ func forceContentWrap() { contentHuggingPriority = .required contentCompressionResistancePriority = .required } /** Vertical hugging priority */ var verticalHuggingPriority: QLPriority { set { setContentHuggingPriority(newValue, for: .vertical) } get { return contentHuggingPriority(for: .vertical) } } /** Horizontal hugging priority */ var horizontalHuggingPriority: QLPriority { set { setContentHuggingPriority(newValue, for: .horizontal) } get { return contentHuggingPriority(for: .horizontal) } } /** Content hugging priority (Vertical & Horizontal) */ var contentHuggingPriority: QLPriorityPair { set { horizontalHuggingPriority = newValue.horizontal verticalHuggingPriority = newValue.vertical } get { return QLPriorityPair(horizontalHuggingPriority, verticalHuggingPriority) } } /** Vertical content compression resistance priority */ var verticalCompressionResistancePriority: QLPriority { set { setContentCompressionResistancePriority(newValue, for: .vertical) } get { return contentCompressionResistancePriority(for: .vertical) } } /** Horizontal content compression resistance priority */ var horizontalCompressionResistancePriority: QLPriority { set { setContentCompressionResistancePriority(newValue, for: .horizontal) } get { return contentCompressionResistancePriority(for: .horizontal) } } /** Content compression resistance priority (Vertical & Horizontal) */ var contentCompressionResistancePriority: QLPriorityPair { set { horizontalCompressionResistancePriority = newValue.horizontal verticalCompressionResistancePriority = newValue.vertical } get { return QLPriorityPair(horizontalCompressionResistancePriority, verticalCompressionResistancePriority) } } } ================================================ FILE: Source/Extensions/QuickLayout/UIView+QuickLayout.swift ================================================ // // QLView+QuickLayout.swift // QuickLayout // // Created by Daniel Huri on 11/19/17. // import Foundation import UIKit public extension QLView { /** Set constant value of an edge. Should be used with *width* or *height* - parameter edge: Edge type. - parameter value: Edge size. - parameter relation: Relation to the given constant value (default is *.equal*). - parameter ratio: Ratio of the cconstant constraint to actual given value (default is *1*) - parameter priority: Constraint's priority (default is *.required*). - returns: The applied constraint (discardable). */ @discardableResult func set(_ edge: QLAttribute, of value: CGFloat, relation: QLRelation = .equal, ratio: CGFloat = 1.0, priority: QLPriority = .required) -> NSLayoutConstraint { if translatesAutoresizingMaskIntoConstraints { translatesAutoresizingMaskIntoConstraints = false } let constraint = NSLayoutConstraint(item: self, attribute: edge, relatedBy: relation, toItem: nil, attribute: .notAnAttribute, multiplier: ratio, constant: value) constraint.priority = priority addConstraint(constraint) return constraint } /** Set constant value for multiple edges simultaniously, using variadic parameter. Should be used with *width* or *height* - parameter edges: Edge types. - parameter value: Edges size. - parameter priority: Constraint's priority (default is *.required*). - returns: The applied constraints in QLMultipleConstraints - see definition (discardable). */ @discardableResult func set(_ edges: QLAttribute..., of value: CGFloat, relation: QLRelation = .equal, ratio: CGFloat = 1.0, priority: QLPriority = .required) -> QLMultipleConstraints { return set(edges, to: value, relation: relation, ratio: ratio, priority: priority) } /** **PRIVATELY USED** AS A REPLACEMENT for the variadic version for the method*/ @discardableResult func set(_ edges: [QLAttribute], to value: CGFloat, relation: QLRelation = .equal, ratio: CGFloat = 1.0, priority: QLPriority = .required) -> QLMultipleConstraints { var constraints: QLMultipleConstraints = [:] let uniqueEdges = Set(edges) for edge in uniqueEdges { let constraint = set(edge, of: value, priority: priority) constraints[edge] = constraint } return constraints } /** Layout edge to another view's edge. - You can optionally define relation, ratio, constant and priority (each gets a default value) - For example - Can be used to align self *left* edge to the *right* of another view. - *self* and *view* must be directly connected (siblings / child-parent) in the view hierarchy. - *superview* must not be *nil*. - parameter edge: The edge of the first view. If not sent or *nil* - The function automatically assumes *edge* to be *otherEdge* - parameter otherEdge: The edge of the second view. - parameter view: The second view that self must be aligned with. - parameter relation: The relation of the first edge to the second edge (default is .equal) - parameter ratio: The ratio of the edge in relative to the superview edge (default is 1). - parameter offset: Additional offset which is applied to the constraint (default is 0). - parameter priority: Constraint's priority (default is *.required*). - returns: The instance of the constraint that was applied (discardable). nil if method failed to apply the constraint. */ @discardableResult func layout(_ edge: QLAttribute? = nil, to otherEdge: QLAttribute, of view: QLView, relation: QLRelation = .equal, ratio: CGFloat = 1.0, offset: CGFloat = 0, priority: QLPriority = .required) -> NSLayoutConstraint? { guard isValidForQuickLayout else { print("\(String(describing: self)) Error in func: \(#function)") return nil } let constraint = NSLayoutConstraint(item: self, attribute: edge ?? otherEdge, relatedBy: relation, toItem: view, attribute: otherEdge, multiplier: ratio, constant: offset) constraint.priority = priority superview!.addConstraint(constraint) return constraint } /** Layout multiple edges of the view to the corresonding edges of another given view. - You can optionally define relation, ratio, constant and priority (each gets a default value) - For example - Can be used to align self *left* and *right* edges the same edge of another given view. - *self* and *view* must be directly connected (siblings / child-parent) in the view hierarchy. - *superview* must not be *nil*. - parameter edges: The view edges - parameter view: Another view that self must be aligned with. - parameter relation: The relation of the edges. Can be applied to *.width* or *height* for example. (default is *.equal*). - parameter ratio: The ratio of the edges to the other view edges (default is 1). - parameter offset: Additional offset which is applied to each of the constraints (default is 0). - parameter priority: Constraints' priority (default is *.required*). - returns: The instance of the constraint that was applied (discardable). *nil* if the method failed to apply the constraint. */ @discardableResult func layout(_ edges: QLAttribute..., to view: QLView, relation: QLRelation = .equal, ratio: CGFloat = 1.0, offset: CGFloat = 0, priority: QLPriority = .required) -> QLMultipleConstraints { var constraints: QLMultipleConstraints = [:] guard isValidForQuickLayout else { print("\(String(describing: self)) Error in func: \(#function)") return constraints } let uniqueEdges = Set(edges) for edge in uniqueEdges { let constraint = NSLayoutConstraint(item: self, attribute: edge, relatedBy: relation, toItem: view, attribute: edge, multiplier: ratio, constant: offset) constraint.priority = priority superview!.addConstraint(constraint) constraints[edge] = constraint } return constraints } /** Layout edge to the same edge of superview. - Example of usage: *view.layoutToSuperview(.top)* makes *view* cling to the *top* of it's *superview*. - You can optionally define ratio, constant and priority (each gets a default value) - *superview* must not be *nil*. - parameter edge: The edge (.width, .height, .left, .right, .leading, .trailing, etc...) - parameter relation: The relation of the edge to the superview's corresponding edge (default is *.equal*) - parameter ratio: The ratio of the edge in relative to the superview edge (default is 1). - parameter offset: Additional offset from that can be applied to the constraint (default is 0). - parameter priority: Constraint's priority (default is *.required*). - returns: The instance of the constraint that was applied (discardable). Nil if method failed to apply constraint. */ @discardableResult func layoutToSuperview(_ edge: QLAttribute, relation: QLRelation = .equal, ratio: CGFloat = 1, offset: CGFloat = 0, priority: QLPriority = .required) -> NSLayoutConstraint? { guard isValidForQuickLayout else { print("\(String(describing: self)) Error in func: \(#function)") return nil } let constraint = NSLayoutConstraint(item: self, attribute: edge, relatedBy: relation, toItem: superview, attribute: edge, multiplier: ratio, constant: offset) constraint.priority = priority superview!.addConstraint(constraint) return constraint } /** Layout multiple edges to the same edges as superview, using variadic parameter. Example for edges value: - You can optionally define ratio, constant and priority (each gets a default value) - *superview* must not be *nil*. - parameter edges: The edges (.width, .height, .left, .right, .leading, .trailing, etc...) - parameter relation: The relation of the edges to the superview's corresponding edges (default is *.equal*) - parameter ratio: The ratio of the edges in relative to the superview edge (default is 1). - parameter offset: Additional offset from that can be applied to the constraints (default is 0). - parameter priority: Constraints' priority (default is *.required*). - returns: The instance of QLMultipleConstraints - see type definition (discardable). */ @discardableResult func layoutToSuperview(_ edges: QLAttribute..., relation: QLRelation = .equal, ratio: CGFloat = 1, offset: CGFloat = 0, priority: QLPriority = .required) -> QLMultipleConstraints { var constraints: QLMultipleConstraints = [:] guard !edges.isEmpty && isValidForQuickLayout else { return constraints } let uniqueEdges = Set(edges) for edge in uniqueEdges { let constraint = NSLayoutConstraint(item: self, attribute: edge, relatedBy: relation, toItem: superview, attribute: edge, multiplier: ratio, constant: offset) constraint.priority = priority superview!.addConstraint(constraint) constraints[edge] = constraint } return constraints } /** Layout to one of the superview's axes. - You can optionally define ratio, constant and priority (each gets a default value) - *superview* must not be *nil*. - parameter axis: The axis to which the view must be stretched (horizontally or vertically) - parameter offset: Represents an additional edge offset from that can be applied to the constraints (default is 0) - parameter priority: Represents constraint's priority (default is *.required*) - returns: The instance of the constraint that was applied (discardable). */ @discardableResult func layoutToSuperview(axis: QLAxis, offset: CGFloat = 0, priority: QLPriority = .required) -> QLAxisConstraints? { let attributes = axis.attributes guard let first = layoutToSuperview(attributes.first, offset: offset, priority: priority) else { return nil } guard let second = layoutToSuperview(attributes.second, offset: -offset, priority: priority) else { return nil } return QLAxisConstraints(first: first, second: second) } /** Size to superview with a given ratio and constant - *superview* must not be *nil*. - parameter ratio: The ratio of view to the size of superview. - parameter offset: Represents an additional edge offset from that can be applied to the size (default is 0) - parameter priority: Represents constraint's priority (default is *.required*) - returns: The instance of QLSizeConstraints - see definition (discardable). */ @discardableResult func sizeToSuperview(withRatio ratio: CGFloat = 1, offset: CGFloat = 0, priority: QLPriority = .required) -> QLSizeConstraints? { let size = layoutToSuperview(.width, .height, ratio: ratio, offset: offset, priority: priority) guard !size.isEmpty else { return nil } return QLSizeConstraints(width: size[.width]!, height: size[.height]!) } /** Center in superview with an optional offset - *superview* must not be *nil*. - parameter offset: Represents an additional offset from the center (default is 0) - parameter priority: Represents constraint's priority (default is *.required*) - returns: The instance of QLCenterConstraints - see definition (discardable). */ @discardableResult func centerInSuperview(offset: CGFloat = 0, priority: QLPriority = .required) -> QLCenterConstraints? { let center = layoutToSuperview(.centerX, .centerY, offset: offset) guard !center.isEmpty else { return nil } return QLCenterConstraints(x: center[.centerX]!, y: center[.centerY]!) } /** Fill superview totally (center and size to superview) - *superview* must not be *nil*. - parameter ratio: Ratio to the superview's size (default is 1) - parameter offset: Offset from center (default is 0) - parameter priority: Represents constraint's priority (default is *.required*) - returns: The instance of QLFillConstraints - see definition (discardable). */ @discardableResult func fillSuperview(withSizeRatio ratio: CGFloat = 1, offset: CGFloat = 0, priority: QLPriority = .required) -> QLFillConstraints? { guard let center = centerInSuperview(priority: priority) else { return nil } guard let size = sizeToSuperview(withRatio: ratio, offset: offset, priority: priority) else { return nil } return QLFillConstraints(center: center, size: size) } /** **PRIVATELY USED** to test for validation*/ var isValidForQuickLayout: Bool { guard superview != nil else { print("\(String(describing: self)):\(#function) - superview is unexpectedly nullified") return false } if translatesAutoresizingMaskIntoConstraints { translatesAutoresizingMaskIntoConstraints = false } return true } } ================================================ FILE: Source/Extensions/QuickLayout/UIViewArray+QuickLayout.swift ================================================ // // QLViewArray+QuickLayout.swift // QuickLayout // // Created by Daniel Huri on 11/20/17. // import Foundation import UIKit // MARK: Multiple Views in Array public extension Array where Element: QLView { /** All elements in the collection recieve constant value for the given edge. - parameter edge: Should be used with *.width* or *.height*. - parameter value: The size of the edge. - parameter priority: Constraint's priority (default is *.required*). - returns: The instance of the constraint that was applied (discardable). */ @discardableResult func set(_ edge: QLAttribute, of value: CGFloat, priority: QLPriority = .required) -> [NSLayoutConstraint] { var constraints: [NSLayoutConstraint] = [] for view in self { let constraint = view.set(edge, of: value) constraints.append(constraint) } return constraints } /** All elements in the collection recieve constant value for the given edges, using variadic parameter. - parameter edges: Should be used with *.width* or *.height*. - parameter value: The size of the edge. - parameter priority: Constraint's priority (default is *.required*). - returns: The instance of the constraint that was applied (discardable). */ @discardableResult func set(_ edges: QLAttribute..., of value: CGFloat, priority: QLPriority = .required) -> [QLMultipleConstraints] { var constraintsArray: [QLMultipleConstraints] = [] for view in self { let constraints = view.set(edges, to: value, priority: priority) constraintsArray.append(constraints) } return constraintsArray } /** Spread elements consecutively according to the given axis. - parameter axis: The axis: *.vertically*, *horizontally* - parameter stretchEdgesToSuperview: Decides whether the first and last items in the array must be clipped to their parent edges. - parameter priority: Constraint's priority (default is *.required*). - returns: Array of constraints that were applied (discardable) */ @discardableResult func spread(_ axis: QLAxis, stretchEdgesToSuperview: Bool = false, offset: CGFloat = 0, priority: QLPriority = .required) -> [NSLayoutConstraint] { guard isValidForQuickLayout else { return [] } let attributes = axis.attributes var constraints: [NSLayoutConstraint] = [] if stretchEdgesToSuperview { let constraint = first!.layoutToSuperview(attributes.first, offset: offset)! constraints.append(constraint) } for (index, view) in enumerated() { guard index > 0 else { continue } let previousView = self[index - 1] let constraint = view.layout(attributes.first, to: attributes.second, of: previousView, offset: offset, priority: priority)! constraints.append(constraint) } if stretchEdgesToSuperview { let constraint = last!.layoutToSuperview(attributes.second, offset: -offset)! constraints.append(constraint) } return constraints } /** Layout elements to superview's axis - parameter axis: The axis: *.vertically*, *horizontally* - parameter offset: Additional side offset that must be applied (identical spacing from each side) - parameter priority: Constraint's priority (default is *.required*). - returns: Array of QLAxisConstraints - see definition (discardable) */ @discardableResult func layoutToSuperview(axis: QLAxis, offset: CGFloat = 0, priority: QLPriority = .required) -> [QLAxisConstraints] { let attributes = axis.attributes let firstConstraints = layoutToSuperview(attributes.first, offset: offset, priority: priority) guard !firstConstraints.isEmpty else { return [] } let secondConstraints = layoutToSuperview(attributes.second, offset: -offset, priority: priority) guard !secondConstraints.isEmpty else { return [] } var constraints: [QLAxisConstraints] = [] for (first, second) in zip(firstConstraints, secondConstraints) { constraints.append(QLAxisConstraints(first: first, second: second)) } return constraints } /** Layout elements' edges to superview's edge (The same edge - top to top, bottom to bottom, etc...) - parameter edge: The edge of the view / superview - parameter ratio: The ratio of the edge in relation to the superview's (default is 1). - parameter offset: Additional offset from that must be applied to the constraint (default is 0). - parameter priority: Constraint's priority (default is *.required*). - returns: Array of applied constraints - see definition (discardable) */ @discardableResult func layoutToSuperview(_ edge: QLAttribute, ratio: CGFloat = 1, offset: CGFloat = 0, priority: QLPriority = .required) -> [NSLayoutConstraint] { guard isValidForQuickLayout else { return [] } return layout(to: edge, of: first!.superview!, ratio: ratio, offset: offset, priority: priority) } /** Layout elements' edges to to anchorView edge - parameter firstEdge: The edge of the elements in the array - parameter anchorEdge: The edge of the anchor view - parameter anchorView: The anchor view - parameter ratio: The ratio of the edge in relative to the superview edge (default is 1). - parameter offset: Additional offset from that can be applied to the constraints (default is 0). - parameter priority: Constraints' priority (default is *.required*). - returns: Array of applied constraints - see definition (discardable) */ @discardableResult func layout(_ firstEdge: QLAttribute? = nil, to anchorEdge: QLAttribute, of anchorView: QLView, ratio: CGFloat = 1, offset: CGFloat = 0, priority: QLPriority = .required) -> [NSLayoutConstraint] { guard isValidForQuickLayout else { return [] } let edge: QLAttribute if let firstEdge = firstEdge { edge = firstEdge } else { edge = anchorEdge } var result: [NSLayoutConstraint] = [] for view in self { let constraint = view.layout(edge, to: anchorEdge, of: anchorView, ratio: ratio, offset: offset, priority: priority)! result.append(constraint) } return result } /** Layout elements' multiple edges to to anchorView's same edges (top to top, bottom to bottom, etc...) - parameter edges: The edges of the view - variadic parameter - parameter anchorView: The anchor view - parameter ratio: The ratio of the edge in relative to the superview edge (default is 1). - parameter offset: Additional offset from that can be applied to the constraints (default is 0). - parameter priority: Constraints' priority (default is *.required*). - returns: Array of applied constraints, each element is of type QLMultipleConstraints - see definition (discardable) */ @discardableResult func layout(_ edges: QLAttribute..., to anchorView: QLView, ratio: CGFloat = 1, offset: CGFloat = 0, priority: QLPriority = .required) -> [QLMultipleConstraints] { guard !edges.isEmpty && isValidForQuickLayout else { return [] } // Avoid duplicities let uniqueEdges = Set(edges) var result: [QLMultipleConstraints] = [] for view in self { var multipleConstraints: QLMultipleConstraints = [:] for edge in uniqueEdges { let constraint = view.layout(to: edge, of: anchorView, ratio: ratio, offset: offset, priority: priority)! multipleConstraints[edge] = constraint } result.append(multipleConstraints) } return result } /** **PRIVATELY USED** to test for validation*/ var isValidForQuickLayout: Bool { guard !isEmpty else { print("\(String(describing: self)) Error in func: \(#function), Views collection is empty!") return false } for view in self { guard view.isValidForQuickLayout else { print("\(String(describing: self)) Error in func: \(#function)") return false } } return true } } ================================================ FILE: Source/Extensions/UIApplication+EKAppearance.swift ================================================ // // UIApplication+EKAppearance.swift // SwiftEntryKit // // Created by Daniel Huri on 5/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit extension UIApplication { func set(statusBarStyle: EKAttributes.StatusBar) { let appearance = statusBarStyle.appearance UIApplication.shared.isStatusBarHidden = !appearance.visible UIApplication.shared.statusBarStyle = appearance.style } } ================================================ FILE: Source/Extensions/UIColor+Utils.swift ================================================ // // UIColor+Utils.swift // SwiftEntryKit // // Created by Daniel on 21/07/2019. // Copyright © 2019 CocoaPods. All rights reserved. // import Foundation import UIKit extension UIColor { convenience init(red: Int, green: Int, blue: Int) { assert(red >= 0 && red <= 255, "Invalid red component") assert(green >= 0 && green <= 255, "Invalid green component") assert(blue >= 0 && blue <= 255, "Invalid blue component") self.init(red: CGFloat(red) / 255.0, green: CGFloat(green) / 255.0, blue: CGFloat(blue) / 255.0, alpha: 1.0) } convenience init(rgb: Int) { self.init( red: (rgb >> 16) & 0xFF, green: (rgb >> 8) & 0xFF, blue: rgb & 0xFF ) } } ================================================ FILE: Source/Extensions/UIEdgeInsets+Utils.swift ================================================ // // UIEdgeInsets.swift // FBSnapshotTestCase // // Created by Daniel Huri on 4/21/18. // import UIKit extension UIEdgeInsets { var hasVerticalInsets: Bool { return top > 0 || bottom > 0 } } ================================================ FILE: Source/Extensions/UIRectCorner+Short.swift ================================================ // // UIView+FrameStyle.swift // SwiftEntryKit // // Created by Daniel Huri on 4/24/18. // import Foundation import UIKit extension UIRectCorner { static let top: UIRectCorner = [.topLeft, .topRight] static let bottom: UIRectCorner = [.bottomLeft, .bottomRight] static let none: UIRectCorner = [] } ================================================ FILE: Source/Extensions/UIView+Shadow.swift ================================================ // // UIView+Shadow.swift // SwiftEntryKit // // Created by Daniel Huri on 4/25/18. // import UIKit extension UIView { func applyDropShadow(withOffset offset: CGSize, opacity: Float, radius: CGFloat, color: UIColor) { layer.applyDropShadow(withOffset: offset, opacity: opacity, radius: radius, color: color) } func removeDropShadow() { layer.removeDropShadow() } } extension CALayer { func applyDropShadow(withOffset offset: CGSize, opacity: Float, radius: CGFloat, color: UIColor) { shadowOffset = offset shadowOpacity = opacity shadowRadius = radius shadowColor = color.cgColor shouldRasterize = true rasterizationScale = UIScreen.main.scale } func removeDropShadow() { shadowOffset = .zero shadowOpacity = 0 shadowRadius = 0 shadowColor = UIColor.clear.cgColor shouldRasterize = false } } ================================================ FILE: Source/Extensions/UIView+Utils.swift ================================================ // // UILabel+Message.swift // SwiftEntryKit // // Created by Daniel Huri on 04/14/2018. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit extension UILabel { var style: EKProperty.LabelStyle { set { font = newValue.font textColor = newValue.color(for: traitCollection) textAlignment = newValue.alignment numberOfLines = newValue.numberOfLines } get { return EKProperty.LabelStyle(font: font, color: EKColor(textColor), alignment: textAlignment, numberOfLines: numberOfLines) } } var content: EKProperty.LabelContent { set { text = newValue.text accessibilityIdentifier = newValue.accessibilityIdentifier style = newValue.style } get { return EKProperty.LabelContent(text: text ?? "", style: style) } } } extension UIButton { var buttonContent: EKProperty.ButtonContent { set { setTitle(newValue.label.text, for: .normal) setTitleColor(newValue.label.style.color(for: traitCollection), for: .normal) titleLabel?.font = newValue.label.style.font accessibilityIdentifier = newValue.accessibilityIdentifier backgroundColor = newValue.backgroundColor.color( for: traitCollection, mode: newValue.displayMode ) } get { fatalError("buttonContent doesn't have a getter") } } } extension UIImageView { var imageContent: EKProperty.ImageContent { set { stopAnimating() if newValue.images.count == 1 { image = newValue.images.first } else { animationImages = newValue.images.map { $0.withRenderingMode(.alwaysTemplate) } animationDuration = newValue.imageSequenceAnimationDuration } contentMode = newValue.contentMode tintColor = newValue.tint?.color(for: traitCollection, mode: newValue.displayMode) accessibilityIdentifier = newValue.accessibilityIdentifier if let size = newValue.size { set(.width, of: size.width) set(.height, of: size.height) } else { forceContentWrap() } if newValue.makesRound { clipsToBounds = true if let size = newValue.size { layer.cornerRadius = min(size.width, size.height) * 0.5 } else { layoutIfNeeded() layer.cornerRadius = min(bounds.width, bounds.height) * 0.5 } } startAnimating() if case .animate(duration: let duration, options: let options, transform: let transform) = newValue.animation { let options: UIView.AnimationOptions = [.repeat, .autoreverse, options] // A hack that forces the animation to run on the main thread, // on one of the next run loops DispatchQueue.main.async { UIView.animate(withDuration: duration, delay: 0, options: options, animations: { self.transform = transform }, completion: nil) } } } get { fatalError("imageContent doesn't have a getter") } } } extension UITextField { var placeholder: EKProperty.LabelContent { set { attributedPlaceholder = NSAttributedString( string: newValue.text, attributes: [ .font: newValue.style.font, .foregroundColor: newValue.style.color(for: traitCollection) ] ) } get { fatalError("placeholder doesn't have a getter") } } var textFieldContent: EKProperty.TextFieldContent { set { placeholder = newValue.placeholder keyboardType = newValue.keyboardType textColor = newValue.textStyle.color(for: traitCollection) font = newValue.textStyle.font textAlignment = newValue.textStyle.alignment isSecureTextEntry = newValue.isSecure text = newValue.textContent tintColor = newValue.tintColor(for: traitCollection) accessibilityIdentifier = newValue.accessibilityIdentifier } get { fatalError("textFieldContent doesn't have a getter") } } } ================================================ FILE: Source/Infra/EKBackgroundView.swift ================================================ // // EKBackgroundView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/20/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final class EKBackgroundView: EKStyleView { struct Style { let background: EKAttributes.BackgroundStyle let displayMode: EKAttributes.DisplayMode } // MARK: Props private let visualEffectView: UIVisualEffectView private let imageView: UIImageView private let gradientView: GradientView // MARK: Setup init() { imageView = UIImageView() visualEffectView = UIVisualEffectView(effect: nil) gradientView = GradientView() super.init(frame: UIScreen.main.bounds) addSubview(imageView) imageView.contentMode = .scaleAspectFill imageView.fillSuperview() addSubview(visualEffectView) visualEffectView.fillSuperview() addSubview(gradientView) gradientView.fillSuperview() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } // Background setter var style: Style! { didSet { guard let style = style else { return } var gradient: EKAttributes.BackgroundStyle.Gradient? var backgroundEffect: UIBlurEffect? var backgroundColor: UIColor = .clear var backgroundImage: UIImage? switch style.background { case .color(color: let color): backgroundColor = color.color(for: traitCollection, mode: style.displayMode) case .gradient(gradient: let value): gradient = value case .image(image: let image): backgroundImage = image case .visualEffect(style: let value): backgroundEffect = value.blurEffect(for: traitCollection, mode: style.displayMode) case .clear: break } gradientView.style = GradientView.Style(gradient: gradient, displayMode: style.displayMode) visualEffectView.effect = backgroundEffect layer.backgroundColor = backgroundColor.cgColor imageView.image = backgroundImage } } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { guard let style = style else { return } switch style.background { case .color(color: let color): layer.backgroundColor = color.color(for: traitCollection, mode: style.displayMode).cgColor case .visualEffect(style: let value): visualEffectView.effect = value.blurEffect(for: traitCollection, mode: style.displayMode) default: break } } } ================================================ FILE: Source/Infra/EKContentView.swift ================================================ // // EKScrollView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/19/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit protocol EntryContentViewDelegate: AnyObject { func changeToActive(withAttributes attributes: EKAttributes) func changeToInactive(withAttributes attributes: EKAttributes, pushOut: Bool) func didFinishDisplaying(entry: EKEntryView, keepWindowActive: Bool, dismissCompletionHandler: SwiftEntryKit.DismissCompletionHandler?) } class EKContentView: UIView { enum OutTranslation { case exit case pop case swipeDown case swipeUp } struct OutTranslationAnchor { var messageOut: QLAttribute var screenOut: QLAttribute init(_ messageOut: QLAttribute, to screenOut: QLAttribute) { self.messageOut = messageOut self.screenOut = screenOut } } // MARK: Props // Entry delegate private weak var entryDelegate: EntryContentViewDelegate! // Constraints and Offsets private var entranceOutConstraint: NSLayoutConstraint! private var exitOutConstraint: NSLayoutConstraint! private var swipeDownOutConstraint: NSLayoutConstraint! private var swipeUpOutConstraint: NSLayoutConstraint! private var popOutConstraint: NSLayoutConstraint! private var inConstraint: NSLayoutConstraint! private var resistanceConstraint: NSLayoutConstraint! private var inKeyboardConstraint: NSLayoutConstraint! private var inOffset: CGFloat = 0 private var totalTranslation: CGFloat = 0 private var verticalLimit: CGFloat = 0 private let swipeMinVelocity: CGFloat = 60 private var outDispatchWorkItem: DispatchWorkItem! private var keyboardState = KeyboardState.hidden // Dismissal handler var dismissHandler: SwiftEntryKit.DismissCompletionHandler? // Data source private var attributes: EKAttributes { return contentView.attributes } // Content private var contentView: EKEntryView! // MARK: Setup required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } init(withEntryDelegate entryDelegate: EntryContentViewDelegate) { self.entryDelegate = entryDelegate super.init(frame: .zero) } // Called from outer scope with a presentable view and attributes func setup(with contentView: EKEntryView) { self.contentView = contentView // Execute willAppear lifecycle action if needed contentView.attributes.lifecycleEvents.willAppear?() // Setup attributes setupAttributes() // Setup initial position setupInitialPosition() // Setup width, height and maximum width setupLayoutConstraints() // Animate in animateIn() // Setup tap gesture setupTapGestureRecognizer() // Generate haptic feedback generateHapticFeedback() setupKeyboardChangeIfNeeded() } // Setup the scrollView initial position private func setupInitialPosition() { // Determine the layout entrance type according to the entry type let messageInAnchor: NSLayoutConstraint.Attribute inOffset = 0 var totalEntryHeight: CGFloat = 0 // Define a spacer to catch top / bottom offsets var spacerView: UIView! let safeAreaInsets = EKWindowProvider.safeAreaInsets let overrideSafeArea = attributes.positionConstraints.safeArea.isOverridden if !overrideSafeArea && safeAreaInsets.hasVerticalInsets && !attributes.position.isCenter { spacerView = UIView() addSubview(spacerView) spacerView.set(.height, of: safeAreaInsets.top) spacerView.layoutToSuperview(.width, .centerX) totalEntryHeight += safeAreaInsets.top } switch attributes.position { case .top: messageInAnchor = .top inOffset = overrideSafeArea ? 0 : safeAreaInsets.top inOffset += attributes.positionConstraints.verticalOffset spacerView?.layout(.bottom, to: .top, of: self) case .bottom: messageInAnchor = .bottom inOffset = overrideSafeArea ? 0 : -safeAreaInsets.bottom inOffset -= attributes.positionConstraints.verticalOffset spacerView?.layout(.top, to: .bottom, of: self) case .center: messageInAnchor = .centerY } // Layout the content view inside the scroll view addSubview(contentView) contentView.layoutToSuperview(.left, .right, .top, .bottom) contentView.layoutToSuperview(.width, .height) inConstraint = layout(to: messageInAnchor, of: superview!, offset: inOffset, priority: .defaultLow) // Set position constraints setupOutConstraints(messageInAnchor: messageInAnchor) totalTranslation = inOffset switch attributes.position { case .top: verticalLimit = inOffset case .bottom, .center: verticalLimit = UIScreen.main.bounds.height + inOffset } // Setup keyboard constraints switch attributes.positionConstraints.keyboardRelation { case .bind(offset: let offset): if let screenEdgeResistance = offset.screenEdgeResistance { resistanceConstraint = layoutToSuperview(.top, relation: .greaterThanOrEqual, offset: screenEdgeResistance, priority: .defaultLow) } inKeyboardConstraint = layoutToSuperview(.bottom, priority: .defaultLow) default: break } } private func setupOutConstraint(animation: EKAttributes.Animation?, messageInAnchor: QLAttribute, priority: QLPriority) -> NSLayoutConstraint { let constraint: NSLayoutConstraint if let translation = animation?.translate { var anchor: OutTranslationAnchor switch translation.anchorPosition { case .top: anchor = OutTranslationAnchor(.bottom, to: .top) case .bottom: anchor = OutTranslationAnchor(.top, to: .bottom) case .automatic where attributes.position.isTop: anchor = OutTranslationAnchor(.bottom, to: .top) case .automatic: // attributes.position.isBottom: anchor = OutTranslationAnchor(.top, to: .bottom) } constraint = layout(anchor.messageOut, to: anchor.screenOut, of: superview!, priority: priority)! } else { constraint = layout(to: messageInAnchor, of: superview!, offset: inOffset, priority: priority)! } return constraint } // Setup out constraints - taking into account the full picture and all the possible use-cases private func setupOutConstraints(messageInAnchor: QLAttribute) { // Setup entrance and exit out constraints entranceOutConstraint = setupOutConstraint(animation: attributes.entranceAnimation, messageInAnchor: messageInAnchor, priority: .must) exitOutConstraint = setupOutConstraint(animation: attributes.exitAnimation, messageInAnchor: messageInAnchor, priority: .defaultLow) swipeDownOutConstraint = layout(.top, to: .bottom, of: superview!, priority: .defaultLow)! swipeUpOutConstraint = layout(.bottom, to: .top, of: superview!, priority: .defaultLow)! // Setup pop out constraint var popAnimation: EKAttributes.Animation? if case .animated(animation: let animation) = attributes.popBehavior { popAnimation = animation } popOutConstraint = setupOutConstraint(animation: popAnimation, messageInAnchor: messageInAnchor, priority: .defaultLow) } private func setupSize() { // Layout the scroll view horizontally inside the screen switch attributes.positionConstraints.size.width { case .offset(value: let offset): layoutToSuperview(axis: .horizontally, offset: offset, priority: .must) case .ratio(value: let ratio): layoutToSuperview(.width, ratio: ratio, priority: .must) case .constant(value: let constant): set(.width, of: constant, priority: .must) case .intrinsic: break } // Layout the scroll view vertically inside the screen switch attributes.positionConstraints.size.height { case .offset(value: let offset): layoutToSuperview(.height, offset: -offset * 2, priority: .must) case .ratio(value: let ratio): layoutToSuperview(.height, ratio: ratio, priority: .must) case .constant(value: let constant): set(.height, of: constant, priority: .must) case .intrinsic: break } } private func setupMaxSize() { // Layout the scroll view according to the maximum width (if given any) switch attributes.positionConstraints.maxSize.width { case .offset(value: let offset): layout(to: .left, of: superview!, relation: .greaterThanOrEqual, offset: offset) layout(to: .right, of: superview!, relation: .lessThanOrEqual, offset: -offset) case .ratio(value: let ratio): layoutToSuperview(.centerX) layout(to: .width, of: superview!, relation: .lessThanOrEqual, ratio: ratio) case .constant(value: let constant): set(.width, of: constant, relation: .lessThanOrEqual) break case .intrinsic: break } // Layout the scroll view according to the maximum width (if given any) switch attributes.positionConstraints.maxSize.height { case .offset(value: let offset): layout(to: .height, of: superview!, relation: .lessThanOrEqual, offset: -offset * 2) case .ratio(value: let ratio): layout(to: .height, of: superview!, relation: .lessThanOrEqual, ratio: ratio) case .constant(value: let constant): set(.height, of: constant, relation: .lessThanOrEqual) break case .intrinsic: break } } // Setup layout constraints according to EKAttributes.PositionConstraints private func setupLayoutConstraints() { layoutToSuperview(.centerX) setupSize() setupMaxSize() } // Setup general attributes private func setupAttributes() { clipsToBounds = false let panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(panGestureRecognized(gr:))) panGestureRecognizer.isEnabled = attributes.scroll.isEnabled addGestureRecognizer(panGestureRecognizer) } // Setup tap gesture private func setupTapGestureRecognizer() { switch attributes.entryInteraction.defaultAction { case .forward: return default: let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(tapGestureRecognized)) tapGestureRecognizer.numberOfTapsRequired = 1 tapGestureRecognizer.cancelsTouchesInView = false addGestureRecognizer(tapGestureRecognizer) } } // Generate a haptic feedback if needed private func generateHapticFeedback() { guard #available(iOS 10.0, *) else { return } HapticFeedbackGenerator.notification(type: attributes.hapticFeedbackType) } // MARK: Animations // Schedule out animation private func scheduleAnimateOut(withDelay delay: TimeInterval? = nil) { outDispatchWorkItem?.cancel() outDispatchWorkItem = DispatchWorkItem { [weak self] in self?.animateOut(pushOut: false) } let delay = attributes.entranceAnimation.totalDuration + (delay ?? attributes.displayDuration) DispatchQueue.main.asyncAfter(deadline: .now() + delay, execute: outDispatchWorkItem) } // Animate out func animateOut(pushOut: Bool) { // Execute willDisappear action if needed contentView.attributes.lifecycleEvents.willDisappear?() if attributes.positionConstraints.keyboardRelation.isBound { endEditing(true) } outDispatchWorkItem?.cancel() entryDelegate?.changeToInactive(withAttributes: attributes, pushOut: pushOut) if case .animated(animation: let animation) = attributes.popBehavior, pushOut { animateOut(with: animation, outTranslationType: .pop) } else { animateOut(with: attributes.exitAnimation, outTranslationType: .exit) } } // Animate out private func animateOut(with animation: EKAttributes.Animation, outTranslationType: OutTranslation) { superview?.layoutIfNeeded() if let translation = animation.translate { performAnimation(out: true, with: translation) { [weak self] in self?.translateOut(withType: outTranslationType) } } if let fade = animation.fade { performAnimation(out: true, with: fade, preAction: { self.alpha = fade.start }) { self.alpha = fade.end } } if let scale = animation.scale { performAnimation(out: true, with: scale, preAction: { self.transform = CGAffineTransform(scaleX: scale.start, y: scale.start) }) { self.transform = CGAffineTransform(scaleX: scale.end, y: scale.end) } } if animation.containsAnimation { DispatchQueue.main.asyncAfter(deadline: .now() + animation.maxDuration) { self.removeFromSuperview(keepWindow: false) } } else { translateOut(withType: outTranslationType) removeFromSuperview(keepWindow: false) } } // Animate in private func animateIn() { let animation = attributes.entranceAnimation superview?.layoutIfNeeded() if let translation = animation.translate { performAnimation(out: false, with: translation, action: translateIn) } else { translateIn() } if let fade = animation.fade { performAnimation(out: false, with: fade, preAction: { self.alpha = fade.start }) { self.alpha = fade.end } } if let scale = animation.scale { performAnimation(out: false, with: scale, preAction: { self.transform = CGAffineTransform(scaleX: scale.start, y: scale.start) }) { self.transform = CGAffineTransform(scaleX: scale.end, y: scale.end) } } entryDelegate?.changeToActive(withAttributes: attributes) // Execute didAppear action if needed if animation.containsAnimation { DispatchQueue.main.asyncAfter(deadline: .now() + animation.maxDuration) { self.contentView.attributes.lifecycleEvents.didAppear?() } } else { contentView.attributes.lifecycleEvents.didAppear?() } scheduleAnimateOut() } // Translate in private func translateIn() { entranceOutConstraint.priority = .defaultLow exitOutConstraint.priority = .defaultLow popOutConstraint.priority = .defaultLow inConstraint.priority = .must superview?.layoutIfNeeded() } // Translate out private func translateOut(withType type: OutTranslation) { inConstraint.priority = .defaultLow entranceOutConstraint.priority = .defaultLow switch type { case .exit: exitOutConstraint.priority = .must case .pop: popOutConstraint.priority = .must case .swipeUp: swipeUpOutConstraint.priority = .must case .swipeDown: swipeDownOutConstraint.priority = .must } superview?.layoutIfNeeded() } // Perform animation - translate / scale / fade private func performAnimation(out: Bool, with animation: EKAnimation, preAction: @escaping () -> () = {}, action: @escaping () -> ()) { let curve: UIView.AnimationOptions = out ? .curveEaseIn : .curveEaseOut let options: UIView.AnimationOptions = [curve, .beginFromCurrentState] preAction() if let spring = animation.spring { UIView.animate(withDuration: animation.duration, delay: animation.delay, usingSpringWithDamping: spring.damping, initialSpringVelocity: spring.initialVelocity, options: options, animations: { action() }, completion: nil) } else { UIView.animate(withDuration: animation.duration, delay: animation.delay, options: options, animations: { action() }, completion: nil) } } // MARK: Remvoe entry // Removes the view promptly - DOES NOT animate out func removePromptly(keepWindow: Bool = true) { outDispatchWorkItem?.cancel() entryDelegate?.changeToInactive(withAttributes: attributes, pushOut: false) contentView.content.attributes.lifecycleEvents.willDisappear?() removeFromSuperview(keepWindow: keepWindow) } // Remove self from superview func removeFromSuperview(keepWindow: Bool) { guard superview != nil else { return } // Execute didDisappear action if needed let didDisappear = contentView.content.attributes.lifecycleEvents.didDisappear // Remove the view from its superview and in a case of a view controller, from its parent controller. super.removeFromSuperview() contentView.content.viewController?.removeFromParent() entryDelegate.didFinishDisplaying(entry: contentView, keepWindowActive: keepWindow, dismissCompletionHandler: dismissHandler) // Lastly, perform the Dismiss Completion Handler as the entry is no longer displayed didDisappear?() } deinit { NotificationCenter.default.removeObserver(self) } } // MARK: Keyboard Logic extension EKContentView { private enum KeyboardState { case visible case hidden var isVisible: Bool { return self == .visible } var isHidden: Bool { return self == .hidden } } private struct KeyboardAttributes { let duration: TimeInterval let curve: UIView.AnimationOptions let begin: CGRect let end: CGRect init?(withRawValue rawValue: [AnyHashable: Any]?) { guard let rawValue = rawValue else { return nil } duration = rawValue[UIResponder.keyboardAnimationDurationUserInfoKey] as! TimeInterval curve = .init(rawValue: rawValue[UIResponder.keyboardAnimationCurveUserInfoKey] as! UInt) begin = (rawValue[UIResponder.keyboardFrameBeginUserInfoKey] as! NSValue).cgRectValue end = (rawValue[UIResponder.keyboardFrameEndUserInfoKey] as! NSValue).cgRectValue } var height: CGFloat { return end.maxY - end.minY } } private func setupKeyboardChangeIfNeeded() { guard attributes.positionConstraints.keyboardRelation.isBound else { return } let notificationCenter = NotificationCenter.default notificationCenter.addObserver(self, selector: #selector(keyboardWillShow(_:)), name: UIResponder.keyboardWillShowNotification, object: nil) notificationCenter.addObserver(self, selector: #selector(keyboardWillHide(_:)), name: UIResponder.keyboardWillHideNotification, object: nil) notificationCenter.addObserver(self, selector: #selector(keyboardDidHide(_:)), name: UIResponder.keyboardDidHideNotification, object: nil) notificationCenter.addObserver(self, selector: #selector(keyboardWillChangeFrame(_:)), name: UIResponder.keyboardWillChangeFrameNotification, object: nil) } private func animate(by userInfo: [AnyHashable: Any]?, entrance: Bool) { // Guard that the entry is bound to the keyboard guard case .bind(offset: let offset) = attributes.positionConstraints.keyboardRelation else { return } // Convert the user info into keyboard attributes guard let keyboardAtts = KeyboardAttributes(withRawValue: userInfo) else { return } if entrance { inKeyboardConstraint.constant = -(keyboardAtts.height + offset.bottom) inKeyboardConstraint.priority = .must resistanceConstraint?.priority = .must inConstraint.priority = .defaultLow } else { inKeyboardConstraint.priority = .defaultLow resistanceConstraint?.priority = .defaultLow inConstraint.priority = .must } UIView.animate(withDuration: keyboardAtts.duration, delay: 0, options: keyboardAtts.curve, animations: { self.superview?.layoutIfNeeded() }, completion: nil) } @objc func keyboardWillShow(_ notification: Notification) { guard containsFirstResponder else { return } keyboardState = .visible animate(by: notification.userInfo, entrance: true) } @objc func keyboardWillHide(_ notification: Notification) { animate(by: notification.userInfo, entrance: false) } @objc func keyboardDidHide(_ notification: Notification) { keyboardState = .hidden } @objc func keyboardWillChangeFrame(_ notification: Notification) { guard containsFirstResponder else { return } animate(by: notification.userInfo, entrance: true) } } // MARK: Responds to user interactions (tap / pan / swipe / touches) extension EKContentView { // Tap gesture handler @objc func tapGestureRecognized() { switch attributes.entryInteraction.defaultAction { case .delayExit(by: _) where attributes.displayDuration.isFinite: scheduleAnimateOut() case .dismissEntry: animateOut(pushOut: false) default: break } attributes.entryInteraction.customTapActions.forEach { $0() } } // Pan gesture handler @objc func panGestureRecognized(gr: UIPanGestureRecognizer) { guard keyboardState.isHidden else { return } // Delay the exit of the entry if needed handleExitDelayIfNeeded(byPanState: gr.state) let translation = gr.translation(in: superview!).y if shouldStretch(with: translation) { if attributes.scroll.isEdgeCrossingEnabled { totalTranslation += translation calculateLogarithmicOffset(forOffset: totalTranslation, currentTranslation: translation) switch gr.state { case .ended, .failed, .cancelled: animateRubberBandPullback() default: break } } } else { switch gr.state { case .ended, .failed, .cancelled: let velocity = gr.velocity(in: superview!).y swipeEnded(withVelocity: velocity) case .changed: inConstraint.constant += translation default: break } } gr.setTranslation(.zero, in: superview!) } private func swipeEnded(withVelocity velocity: CGFloat) { let distance = Swift.abs(inOffset - inConstraint.constant) var duration = max(0.3, TimeInterval(distance / Swift.abs(velocity))) duration = min(0.7, duration) if attributes.scroll.isSwipeable && testSwipeVelocity(with: velocity) && testSwipeInConstraint() { stretchOut(usingSwipe: velocity > 0 ? .swipeDown : .swipeUp, duration: duration) } else { animateRubberBandPullback() } } private func stretchOut(usingSwipe type: OutTranslation, duration: TimeInterval) { outDispatchWorkItem?.cancel() entryDelegate?.changeToInactive(withAttributes: attributes, pushOut: false) contentView.content.attributes.lifecycleEvents.willDisappear?() UIView.animate(withDuration: duration, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 4, options: [.allowUserInteraction, .beginFromCurrentState], animations: { self.translateOut(withType: type) }, completion: { finished in self.removeFromSuperview(keepWindow: false) }) } private func calculateLogarithmicOffset(forOffset offset: CGFloat, currentTranslation: CGFloat) { guard verticalLimit != 0 else { return } if attributes.position.isTop { inConstraint.constant = verticalLimit * (1 + log10(offset / verticalLimit)) } else { let offset = Swift.abs(offset) + verticalLimit let addition: CGFloat = abs(currentTranslation) < 2 ? 0 : 1 inConstraint.constant -= (addition + log10(offset / verticalLimit)) } } private func shouldStretch(with translation: CGFloat) -> Bool { if attributes.position.isTop { return translation > 0 && inConstraint.constant >= inOffset } else { return translation < 0 && inConstraint.constant <= inOffset } } private func animateRubberBandPullback() { totalTranslation = verticalLimit let animation: EKAttributes.Scroll.PullbackAnimation if case .enabled(swipeable: _, pullbackAnimation: let pullbackAnimation) = attributes.scroll { animation = pullbackAnimation } else { animation = .easeOut } UIView.animate(withDuration: animation.duration, delay: 0, usingSpringWithDamping: animation.damping, initialSpringVelocity: animation.initialSpringVelocity, options: [.allowUserInteraction, .beginFromCurrentState], animations: { self.inConstraint?.constant = self.inOffset self.superview?.layoutIfNeeded() }, completion: nil) } private func testSwipeInConstraint() -> Bool { if attributes.position.isTop { return inConstraint.constant < inOffset } else { return inConstraint.constant > inOffset } } private func testSwipeVelocity(with velocity: CGFloat) -> Bool { if attributes.position.isTop { return velocity < -swipeMinVelocity } else { return velocity > swipeMinVelocity } } private func handleExitDelayIfNeeded(byPanState state: UIGestureRecognizer.State) { guard attributes.entryInteraction.isDelayExit && attributes.displayDuration.isFinite else { return } switch state { case .began: outDispatchWorkItem?.cancel() case .ended, .failed, .cancelled: scheduleAnimateOut() default: break } } // MARK: UIResponder override func touchesBegan(_ touches: Set, with event: UIEvent?) { if attributes.entryInteraction.isDelayExit && attributes.displayDuration.isFinite { outDispatchWorkItem?.cancel() } } override func touchesEnded(_ touches: Set, with event: UIEvent?) { if attributes.entryInteraction.isDelayExit && attributes.displayDuration.isFinite { scheduleAnimateOut() } } override func touchesCancelled(_ touches: Set, with event: UIEvent?) { touchesEnded(touches, with: event) } } ================================================ FILE: Source/Infra/EKEntryView.swift ================================================ // // EKEntryView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/15/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit class EKEntryView: EKStyleView { struct Content { var viewController: UIViewController! var view: UIView! var attributes: EKAttributes init(viewController: UIViewController, attributes: EKAttributes) { self.viewController = viewController self.view = viewController.view self.attributes = attributes } init(view: UIView, attributes: EKAttributes) { self.view = view self.attributes = attributes } } // MARK: Props /** Background view */ private var backgroundView: EKBackgroundView! /** The content - contains the view, view controller, attributes */ var content: Content private lazy var contentView: UIView = { return UIView() }() var attributes: EKAttributes { return content.attributes } private lazy var contentContainerView: EKStyleView = { let contentContainerView = EKStyleView() self.addSubview(contentContainerView) contentContainerView.layoutToSuperview(axis: .vertically) contentContainerView.layoutToSuperview(axis: .horizontally) contentContainerView.clipsToBounds = true return contentContainerView }() // MARK: Setup init(newEntry content: Content) { self.content = content super.init(frame: UIScreen.main.bounds) setupContentView() applyDropShadow() applyBackgroundToContentView() applyFrameStyle() adjustInnerContentAppearanceIfNeeded() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func layoutSubviews() { super.layoutSubviews() applyFrameStyle() } func transform(to view: UIView) { let previousView = content.view content.view = view view.layoutIfNeeded() let previousHeight = set(.height, of: frame.height, priority: .must) let nextHeight = set(.height, of: view.frame.height, priority: .defaultLow) SwiftEntryKit.layoutIfNeeded() UIView.animate(withDuration: 0.4, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0, options: [.beginFromCurrentState, .layoutSubviews], animations: { previousHeight.priority = .defaultLow nextHeight.priority = .must previousView!.alpha = 0 SwiftEntryKit.layoutIfNeeded() }, completion: { (finished) in view.alpha = 0 previousView!.removeFromSuperview() self.removeConstraints([previousHeight, nextHeight]) self.setupContentView() UIView.animate(withDuration: 0.4, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0, options: [.curveEaseOut], animations: { view.alpha = 1 }, completion: nil) }) } private func setupContentView() { contentView.addSubview(content.view) content.view.layoutToSuperview(axis: .horizontally) content.view.layoutToSuperview(axis: .vertically) contentContainerView.addSubview(contentView) contentView.fillSuperview() contentView.layoutToSuperview(axis: .vertically) contentView.layoutToSuperview(axis: .horizontally) } // Complementary logic for issue #117 private func adjustInnerContentAppearanceIfNeeded() { guard let view = content.view as? EntryAppearanceDescriptor else { return } view.bottomCornerRadius = attributes.roundCorners.cornerValues?.radius ?? 0 } // Apply round corners private func applyFrameStyle() { backgroundView.applyFrameStyle(roundCorners: attributes.roundCorners, border: attributes.border) } // Apply drop shadow private func applyDropShadow() { switch attributes.shadow { case .active(with: let value): applyDropShadow(withOffset: value.offset, opacity: value.opacity, radius: value.radius, color: value.color.color(for: traitCollection, mode: attributes.displayMode)) case .none: removeDropShadow() } } // Apply background private func applyBackgroundToContentView() { let attributes = content.attributes let backgroundView = EKBackgroundView() backgroundView.style = .init(background: attributes.entryBackground, displayMode: attributes.displayMode) switch attributes.positionConstraints.safeArea { case .empty(fillSafeArea: let fillSafeArea) where fillSafeArea: // Safe area filled with color insertSubview(backgroundView, at: 0) backgroundView.layoutToSuperview(axis: .horizontally) var topInset: CGFloat = 0 var bottomInset: CGFloat = 0 switch attributes.position { case .top: topInset = -EKWindowProvider.safeAreaInsets.top case .bottom, .center: bottomInset = EKWindowProvider.safeAreaInsets.bottom } backgroundView.layoutToSuperview(.top, offset: topInset) backgroundView.layoutToSuperview(.bottom, offset: bottomInset) default: // Float case or a Toast with unfilled safe area contentView.insertSubview(backgroundView, at: 0) backgroundView.fillSuperview() } self.backgroundView = backgroundView } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { applyDropShadow() } } ================================================ FILE: Source/Infra/EKRootViewController.swift ================================================ // // EntryViewController.swift // SwiftEntryKit // // Created by Daniel Huri on 4/19/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit protocol EntryPresenterDelegate: AnyObject { var isResponsiveToTouches: Bool { set get } func displayPendingEntryOrRollbackWindow(dismissCompletionHandler: SwiftEntryKit.DismissCompletionHandler?) } class EKRootViewController: UIViewController { // MARK: - Props private unowned let delegate: EntryPresenterDelegate private var lastAttributes: EKAttributes! private let backgroundView = EKBackgroundView() private lazy var wrapperView: EKWrapperView = { return EKWrapperView() }() /* Count the total amount of currently displaying entries, meaning, total subviews less one - the backgorund of the entry */ fileprivate var displayingEntryCount: Int { return view.subviews.count - 1 } fileprivate var isDisplaying: Bool { return lastEntry != nil } private var lastEntry: EKContentView? { return view.subviews.last as? EKContentView } private var isResponsive = false { didSet { wrapperView.isAbleToReceiveTouches = isResponsive delegate.isResponsiveToTouches = isResponsive } } override var shouldAutorotate: Bool { if lastAttributes == nil { return true } return lastAttributes.positionConstraints.rotation.isEnabled } override var supportedInterfaceOrientations: UIInterfaceOrientationMask { guard let lastAttributes = lastAttributes else { return super.supportedInterfaceOrientations } switch lastAttributes.positionConstraints.rotation.supportedInterfaceOrientations { case .standard: return super.supportedInterfaceOrientations case .all: return .all } } // Previous status bar style private let previousStatusBar: EKAttributes.StatusBar private var statusBar: EKAttributes.StatusBar? = nil { didSet { if let statusBar = statusBar, ![statusBar, oldValue].contains(.ignored) { UIApplication.shared.set(statusBarStyle: statusBar) } } } override var preferredStatusBarStyle: UIStatusBarStyle { if [previousStatusBar, statusBar].contains(.ignored) { return super.preferredStatusBarStyle } return statusBar?.appearance.style ?? previousStatusBar.appearance.style } override var prefersStatusBarHidden: Bool { if [previousStatusBar, statusBar].contains(.ignored) { return super.prefersStatusBarHidden } return !(statusBar?.appearance.visible ?? previousStatusBar.appearance.visible) } // MARK: - Lifecycle required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } public init(with delegate: EntryPresenterDelegate) { self.delegate = delegate previousStatusBar = .currentStatusBar super.init(nibName: nil, bundle: nil) } override public func loadView() { view = wrapperView view.insertSubview(backgroundView, at: 0) backgroundView.isUserInteractionEnabled = false backgroundView.fillSuperview() } override public func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) statusBar = previousStatusBar } // Set status bar func setStatusBarStyle(for attributes: EKAttributes) { statusBar = attributes.statusBar } // MARK: - Setup func configure(entryView: EKEntryView) { // In case the entry is a view controller, add the entry as child of root if let viewController = entryView.content.viewController { addChild(viewController) } // Extract the attributes struct let attributes = entryView.attributes // Assign attributes let previousAttributes = lastAttributes // Remove the last entry removeLastEntry(lastAttributes: previousAttributes, keepWindow: true) lastAttributes = attributes let entryContentView = EKContentView(withEntryDelegate: self) view.addSubview(entryContentView) entryContentView.setup(with: entryView) switch attributes.screenInteraction.defaultAction { case .forward: isResponsive = false default: isResponsive = true } if previousAttributes?.statusBar != attributes.statusBar { setNeedsStatusBarAppearanceUpdate() } if shouldAutorotate { UIViewController.attemptRotationToDeviceOrientation() } } // Check priority precedence for a given entry func canDisplay(attributes: EKAttributes) -> Bool { guard let lastAttributes = lastAttributes else { return true } return attributes.precedence.priority >= lastAttributes.precedence.priority } // Removes last entry - can keep the window 'ON' if necessary private func removeLastEntry(lastAttributes: EKAttributes?, keepWindow: Bool) { guard let attributes = lastAttributes else { return } if attributes.popBehavior.isOverriden { lastEntry?.removePromptly() } else { popLastEntry() } } // Make last entry exit using exitAnimation - animatedly func animateOutLastEntry(completionHandler: SwiftEntryKit.DismissCompletionHandler? = nil) { lastEntry?.dismissHandler = completionHandler lastEntry?.animateOut(pushOut: false) } // Pops last entry (using pop animation) - animatedly func popLastEntry() { lastEntry?.animateOut(pushOut: true) } } // MARK: - UIResponder extension EKRootViewController { override func touchesEnded(_ touches: Set, with event: UIEvent?) { switch lastAttributes.screenInteraction.defaultAction { case .dismissEntry: lastEntry?.animateOut(pushOut: false) fallthrough default: lastAttributes.screenInteraction.customTapActions.forEach { $0() } } } } // MARK: - EntryScrollViewDelegate extension EKRootViewController: EntryContentViewDelegate { func didFinishDisplaying(entry: EKEntryView, keepWindowActive: Bool, dismissCompletionHandler: SwiftEntryKit.DismissCompletionHandler?) { guard !isDisplaying else { return } guard !keepWindowActive else { return } delegate.displayPendingEntryOrRollbackWindow(dismissCompletionHandler: dismissCompletionHandler) } func changeToInactive(withAttributes attributes: EKAttributes, pushOut: Bool) { guard displayingEntryCount <= 1 else { return } let clear = { let style = EKBackgroundView.Style(background: .clear, displayMode: attributes.displayMode) self.changeBackground(to: style, duration: attributes.exitAnimation.totalDuration) } guard pushOut else { clear() return } guard let lastBackroundStyle = lastAttributes?.screenBackground else { clear() return } if lastBackroundStyle != attributes.screenBackground { clear() } } func changeToActive(withAttributes attributes: EKAttributes) { let style = EKBackgroundView.Style(background: attributes.screenBackground, displayMode: attributes.displayMode) changeBackground(to: style, duration: attributes.entranceAnimation.totalDuration) } private func changeBackground(to style: EKBackgroundView.Style, duration: TimeInterval) { DispatchQueue.main.async { UIView.animate(withDuration: duration, delay: 0, options: [], animations: { self.backgroundView.style = style }, completion: nil) } } } ================================================ FILE: Source/Infra/EKStyleView.swift ================================================ // // EKStyleView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/28/18. // import UIKit class EKStyleView: UIView { private lazy var borderLayer: CAShapeLayer = { return CAShapeLayer() }() private var roundCorners: EKAttributes.RoundCorners! private var border: EKAttributes.Border! var appliedStyle = false func applyFrameStyle(roundCorners: EKAttributes.RoundCorners, border: EKAttributes.Border) { self.roundCorners = roundCorners self.border = border var cornerRadius: CGFloat = 0 var corners: UIRectCorner = [] (corners, cornerRadius) = roundCorners.cornerValues ?? ([], 0) let size = CGSize(width: cornerRadius, height: cornerRadius) let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: corners, cornerRadii: size) if !corners.isEmpty && cornerRadius > 0 { let maskLayer = CAShapeLayer() maskLayer.path = path.cgPath layer.mask = maskLayer } if let borderValues = border.borderValues { borderLayer.path = path.cgPath borderLayer.fillColor = UIColor.clear.cgColor borderLayer.strokeColor = borderValues.color.cgColor borderLayer.lineWidth = borderValues.width borderLayer.frame = bounds layer.addSublayer(borderLayer) } appliedStyle = true } override func layoutSubviews() { super.layoutSubviews() guard let roundCorners = roundCorners, let border = border else { return } applyFrameStyle(roundCorners: roundCorners, border: border) } } ================================================ FILE: Source/Infra/EKWindow.swift ================================================ // // EKWindow.swift // SwiftEntryKit // // Created by Daniel Huri on 4/19/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit class EKWindow: UIWindow { var isAbleToReceiveTouches = false init(with rootVC: UIViewController) { if #available(iOS 13.0, *) { // TODO: Patched to support SwiftUI out of the box but should require attendance if let scene = UIApplication.shared.connectedScenes.filter({$0.activationState == .foregroundActive}).first as? UIWindowScene { super.init(windowScene: scene) } else { super.init(frame: UIScreen.main.bounds) } } else { super.init(frame: UIScreen.main.bounds) } backgroundColor = .clear rootViewController = rootVC accessibilityViewIsModal = true } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { if isAbleToReceiveTouches { return super.hitTest(point, with: event) } guard let rootVC = EKWindowProvider.shared.rootVC else { return nil } if let view = rootVC.view.hitTest(point, with: event) { return view } return nil } } ================================================ FILE: Source/Infra/EKWindowProvider.swift ================================================ // // EKWindowProvider.swift // SwiftEntryKit // // Created by Daniel Huri on 4/19/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final class EKWindowProvider: EntryPresenterDelegate { /** The artificial safe area insets */ static var safeAreaInsets: UIEdgeInsets { if #available(iOS 11.0, *) { return EKWindowProvider.shared.entryWindow?.rootViewController?.view?.safeAreaInsets ?? UIApplication.shared.keyWindow?.rootViewController?.view.safeAreaInsets ?? .zero } else { let statusBarMaxY = UIApplication.shared.statusBarFrame.maxY return UIEdgeInsets(top: statusBarMaxY, left: 0, bottom: 10, right: 0) } } /** Single access point */ static let shared = EKWindowProvider() /** Current entry window */ var entryWindow: EKWindow! /** Returns the root view controller if it is instantiated */ var rootVC: EKRootViewController? { return entryWindow?.rootViewController as? EKRootViewController } /** A window to go back to when the last entry has been dismissed */ private var rollbackWindow: SwiftEntryKit.RollbackWindow! /** The main rollback window to be used internally in case `rollbackWindow`'s value is `.main` */ private weak var mainRollbackWindow: UIWindow? /** Entry queueing heuristic */ private let entryQueue = EKAttributes.Precedence.QueueingHeuristic.value.heuristic private weak var entryView: EKEntryView! /** Cannot be instantiated, customized, inherited */ private init() {} var isResponsiveToTouches: Bool { set { entryWindow.isAbleToReceiveTouches = newValue } get { return entryWindow.isAbleToReceiveTouches } } // MARK: - Setup and Teardown methods // Prepare the window and the host view controller private func prepare(for attributes: EKAttributes, presentInsideKeyWindow: Bool) -> EKRootViewController? { let entryVC = setupWindowAndRootVC() guard entryVC.canDisplay(attributes: attributes) || attributes.precedence.isEnqueue else { return nil } entryVC.setStatusBarStyle(for: attributes) entryWindow.windowLevel = attributes.windowLevel.value if presentInsideKeyWindow { entryWindow.makeKeyAndVisible() } else { entryWindow.isHidden = false } return entryVC } /** Boilerplate generic setup for entry-window and root-view-controller */ private func setupWindowAndRootVC() -> EKRootViewController { let entryVC: EKRootViewController if entryWindow == nil { entryVC = EKRootViewController(with: self) entryWindow = EKWindow(with: entryVC) mainRollbackWindow = UIApplication.shared.keyWindow } else { entryVC = rootVC! } return entryVC } /** Privately used to display an entry */ private func display(entryView: EKEntryView, using attributes: EKAttributes, presentInsideKeyWindow: Bool, rollbackWindow: SwiftEntryKit.RollbackWindow) { switch entryView.attributes.precedence { case .override(priority: _, dropEnqueuedEntries: let dropEnqueuedEntries): if dropEnqueuedEntries { entryQueue.removeAll() } show(entryView: entryView, presentInsideKeyWindow: presentInsideKeyWindow, rollbackWindow: rollbackWindow) case .enqueue where isCurrentlyDisplaying(): entryQueue.enqueue(entry: .init(view: entryView, presentInsideKeyWindow: presentInsideKeyWindow, rollbackWindow: rollbackWindow)) case .enqueue: show(entryView: entryView, presentInsideKeyWindow: presentInsideKeyWindow, rollbackWindow: rollbackWindow) } } // MARK: - Exposed Actions func queueContains(entryNamed name: String? = nil) -> Bool { if name == nil && !entryQueue.isEmpty { return true } if let name = name { return entryQueue.contains(entryNamed: name) } else { return false } } /** Returns *true* if the currently displayed entry has the given name. In case *name* has the value of *nil*, the result is *true* if any entry is currently displayed. */ func isCurrentlyDisplaying(entryNamed name: String? = nil) -> Bool { guard let entryView = entryView else { return false } if let name = name { // Test for names equality return entryView.content.attributes.name == name } else { // Return true by default if the name is *nil* return true } } /** Transform current entry to view */ func transform(to view: UIView) { entryView?.transform(to: view) } /** Display a view using attributes */ func display(view: UIView, using attributes: EKAttributes, presentInsideKeyWindow: Bool, rollbackWindow: SwiftEntryKit.RollbackWindow) { let entryView = EKEntryView(newEntry: .init(view: view, attributes: attributes)) display(entryView: entryView, using: attributes, presentInsideKeyWindow: presentInsideKeyWindow, rollbackWindow: rollbackWindow) } /** Display a view controller using attributes */ func display(viewController: UIViewController, using attributes: EKAttributes, presentInsideKeyWindow: Bool, rollbackWindow: SwiftEntryKit.RollbackWindow) { let entryView = EKEntryView(newEntry: .init(viewController: viewController, attributes: attributes)) display(entryView: entryView, using: attributes, presentInsideKeyWindow: presentInsideKeyWindow, rollbackWindow: rollbackWindow) } /** Clear all entries immediately and display to the rollback window */ func displayRollbackWindow() { if #available(iOS 13.0, *) { entryWindow.windowScene = nil } entryWindow = nil entryView = nil switch rollbackWindow! { case .main: if let mainRollbackWindow = mainRollbackWindow { mainRollbackWindow.makeKeyAndVisible() } else { UIApplication.shared.keyWindow?.makeKeyAndVisible() } case .custom(window: let window): window.makeKeyAndVisible() } } /** Display a pending entry if there is any inside the queue */ func displayPendingEntryOrRollbackWindow(dismissCompletionHandler: SwiftEntryKit.DismissCompletionHandler?) { if let next = entryQueue.dequeue() { // Execute dismiss handler if needed before dequeuing (potentially) another entry dismissCompletionHandler?() // Show the next entry in queue show(entryView: next.view, presentInsideKeyWindow: next.presentInsideKeyWindow, rollbackWindow: next.rollbackWindow) } else { // Display the rollback window displayRollbackWindow() // As a last step, invoke the dismissal method dismissCompletionHandler?() } } /** Dismiss entries according to a given descriptor */ func dismiss(_ descriptor: SwiftEntryKit.EntryDismissalDescriptor, with completion: SwiftEntryKit.DismissCompletionHandler? = nil) { guard let rootVC = rootVC else { return } switch descriptor { case .displayed: rootVC.animateOutLastEntry(completionHandler: completion) case .specific(entryName: let name): entryQueue.removeEntries(by: name) if entryView?.attributes.name == name { rootVC.animateOutLastEntry(completionHandler: completion) } case .prioritizedLowerOrEqualTo(priority: let priorityThreshold): entryQueue.removeEntries(withPriorityLowerOrEqualTo: priorityThreshold) if let currentPriority = entryView?.attributes.precedence.priority, currentPriority <= priorityThreshold { rootVC.animateOutLastEntry(completionHandler: completion) } case .enqueued: entryQueue.removeAll() case .all: entryQueue.removeAll() rootVC.animateOutLastEntry(completionHandler: completion) } } /** Layout the view-hierarchy rooted in the window */ func layoutIfNeeded() { entryWindow?.layoutIfNeeded() } /** Privately used to prepare the root view controller and show the entry immediately */ private func show(entryView: EKEntryView, presentInsideKeyWindow: Bool, rollbackWindow: SwiftEntryKit.RollbackWindow) { guard let entryVC = prepare(for: entryView.attributes, presentInsideKeyWindow: presentInsideKeyWindow) else { return } entryVC.configure(entryView: entryView) self.entryView = entryView self.rollbackWindow = rollbackWindow } } ================================================ FILE: Source/Infra/EKWrapperView.swift ================================================ // // EKWrapperView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/19/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit class EKWrapperView: UIView { var isAbleToReceiveTouches = false override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? { if isAbleToReceiveTouches { return super.hitTest(point, with: event) } if let view = super.hitTest(point, with: event), view != self { return view } return nil } } ================================================ FILE: Source/Infra/EntryCachingHeuristic.swift ================================================ // // EKEntryCacher.swift // SwiftEntryKit // // Created by Daniel Huri on 9/1/18. // Copyright © 2018 CocoaPods. All rights reserved. // import Foundation struct CachedEntry { let view: EKEntryView let presentInsideKeyWindow: Bool let rollbackWindow: SwiftEntryKit.RollbackWindow } protocol EntryCachingHeuristic: AnyObject { var entries: [CachedEntry] { set get } var isEmpty: Bool { get } func dequeue() -> CachedEntry? func enqueue(entry: CachedEntry) func removeEntries(by name: String) func removeEntries(withPriorityLowerOrEqualTo priority: EKAttributes.Precedence.Priority) func remove(entry: CachedEntry) func removeAll() func contains(entryNamed name: String) -> Bool } extension EntryCachingHeuristic { var isEmpty: Bool { return entries.isEmpty } func contains(entryNamed name: String) -> Bool { return entries.contains { $0.view.attributes.name == name } } func dequeue() -> CachedEntry? { guard let first = entries.first else { return nil } entries.removeFirst() return first } func removeEntries(withPriorityLowerOrEqualTo priority: EKAttributes.Precedence.Priority) { while let index = (entries.firstIndex { $0.view.attributes.precedence.priority <= priority }) { entries.remove(at: index) } } func removeEntries(by name: String) { while let index = (entries.firstIndex { $0.view.attributes.name == name }) { entries.remove(at: index) } } func remove(entry: CachedEntry) { guard let index = (entries.firstIndex { $0.view == entry.view }) else { return } entries.remove(at: index) } func removeAll() { entries.removeAll() } } class EKEntryChronologicalQueue: EntryCachingHeuristic { var entries: [CachedEntry] = [] func enqueue(entry: CachedEntry) { entries.append(entry) } } class EKEntryPriorityQueue: EntryCachingHeuristic { var entries: [CachedEntry] = [] func enqueue(entry: CachedEntry) { let entryPriority = entry.view.attributes.precedence.priority let index = entries.firstIndex { return entryPriority > $0.view.attributes.precedence.priority } if let index = index { entries.insert(entry, at: index) } else { entries.append(entry) } } } ================================================ FILE: Source/MessageViews/EKAlertMessageView.swift ================================================ // // EKAlertMessageView.swift // SwiftEntryKit // // Created by Daniel Huri on 5/5/18. // import UIKit final public class EKAlertMessageView: EKSimpleMessageView, EntryAppearanceDescriptor { // MARK: Props var buttonBarView: EKButtonBarView! private var buttonsBarCompressedConstraint: NSLayoutConstraint! private var buttonsBarExpandedConstraint: NSLayoutConstraint! // MARK: EntryAppearenceDescriptor var bottomCornerRadius: CGFloat = 0 { didSet { buttonBarView.bottomCornerRadius = bottomCornerRadius } } // MARK: Setup public init(with message: EKAlertMessage) { super.init(with: message.simpleMessage) setupButtonBarView(with: message.buttonBarContent) layoutContent(with: message) } public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupButtonBarView(with content: EKProperty.ButtonBarContent) { buttonBarView = EKButtonBarView(with: content) buttonBarView.clipsToBounds = true addSubview(buttonBarView) } func layoutContent(with message: EKAlertMessage) { switch message.imagePosition { case .top: messageContentView.verticalMargins = 16 messageContentView.horizontalMargins = 16 messageContentView.labelsOffset = 5 if let thumbImageView = thumbImageView { thumbImageView.layoutToSuperview(.top, offset: 20) thumbImageView.layoutToSuperview(.centerX) messageContentView.layout(.top, to: .bottom, of: thumbImageView) } else { messageContentView.layoutToSuperview(.top) } messageContentView.layoutToSuperview(axis: .horizontally) buttonBarView.layout(.top, to: .bottom, of: messageContentView) case .left: messageContentView.verticalMargins = 0 messageContentView.horizontalMargins = 0 messageContentView.labelsOffset = 5 if let thumbImageView = thumbImageView { thumbImageView.layoutToSuperview(.top, .left, offset: 16) messageContentView.layout(.left, to: .right, of: thumbImageView, offset: 12) messageContentView.layout(to: .top, of: thumbImageView, offset: 2) } else { messageContentView.layoutToSuperview(.left, .top, offset: 16) } messageContentView.layoutToSuperview(.right, offset: -16) buttonBarView.layout(.top, to: .bottom, of: messageContentView, offset: 10) } buttonBarView.layoutToSuperview(axis: .horizontally) buttonBarView.layoutToSuperview(.bottom) buttonBarView.alpha = 0 if !message.buttonBarContent.content.isEmpty { if message.buttonBarContent.expandAnimatedly { DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { self.buttonBarView.expand() } } else { buttonBarView.expand() } } } } ================================================ FILE: Source/MessageViews/EKFormMessageView.swift ================================================ // // EKFormMessageView.swift // SwiftEntryKit // // Created by Daniel Huri on 5/15/18. // import UIKit final public class EKFormMessageView: UIView { private let scrollViewVerticalOffset: CGFloat = 20 // MARK: Props private let titleLabel = UILabel() private let scrollView = UIScrollView() private let textFieldsContent: [EKProperty.TextFieldContent] private var textFieldViews: [EKTextField] = [] private var buttonBarView: EKButtonBarView! private let titleContent: EKProperty.LabelContent // MARK: Setup public init(with title: EKProperty.LabelContent, textFieldsContent: [EKProperty.TextFieldContent], buttonContent: EKProperty.ButtonContent) { self.titleContent = title self.textFieldsContent = textFieldsContent super.init(frame: UIScreen.main.bounds) setupScrollView() setupTitleLabel() setupTextFields(with: textFieldsContent) setupButton(with: buttonContent) setupTapGestureRecognizer() scrollView.layoutIfNeeded() set(.height, of: scrollView.contentSize.height + scrollViewVerticalOffset * 2, priority: .defaultHigh) } required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupTextFields(with textFieldsContent: [EKProperty.TextFieldContent]) { var textFieldIndex = 0 textFieldViews = textFieldsContent.map { content -> EKTextField in let textField = EKTextField(with: content) scrollView.addSubview(textField) textField.tag = textFieldIndex textFieldIndex += 1 return textField } textFieldViews.first!.layout(.top, to: .bottom, of: titleLabel, offset: 20) textFieldViews.spread(.vertically, offset: 5) textFieldViews.layoutToSuperview(axis: .horizontally) } // Setup tap gesture private func setupTapGestureRecognizer() { let tapGestureRecognizer = UITapGestureRecognizer( target: self, action: #selector(tapGestureRecognized) ) tapGestureRecognizer.numberOfTapsRequired = 1 addGestureRecognizer(tapGestureRecognizer) } private func setupScrollView() { addSubview(scrollView) scrollView.layoutToSuperview(axis: .horizontally, offset: 20) scrollView.layoutToSuperview(axis: .vertically, offset: scrollViewVerticalOffset) scrollView.layoutToSuperview(.width, .height, offset: -scrollViewVerticalOffset * 2) } private func setupTitleLabel() { scrollView.addSubview(titleLabel) titleLabel.layoutToSuperview(.top, .width) titleLabel.layoutToSuperview(axis: .horizontally) titleLabel.forceContentWrap(.vertically) titleLabel.content = titleContent } private func setupButton(with buttonContent: EKProperty.ButtonContent) { var buttonContent = buttonContent let action = buttonContent.action buttonContent.action = { [weak self] in self?.extractTextFieldsContent() action?() } let buttonsBarContent = EKProperty.ButtonBarContent( with: buttonContent, separatorColor: .clear, expandAnimatedly: true ) buttonBarView = EKButtonBarView(with: buttonsBarContent) buttonBarView.clipsToBounds = true scrollView.addSubview(buttonBarView) buttonBarView.expand() buttonBarView.layout(.top, to: .bottom, of: textFieldViews.last!, offset: 20) buttonBarView.layoutToSuperview(.centerX) buttonBarView.layoutToSuperview(.width, offset: -40) buttonBarView.layoutToSuperview(.bottom) buttonBarView.layer.cornerRadius = 5 } private func extractTextFieldsContent() { for (content, textField) in zip(textFieldsContent, textFieldViews) { content.contentWrapper.text = textField.text } } /** Makes a specific text field the first responder */ public func becomeFirstResponder(with textFieldIndex: Int) { textFieldViews[textFieldIndex].makeFirstResponder() } public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { titleLabel.textColor = titleContent.style.color(for: traitCollection) } // MARK: User Intractions // Tap Gesture @objc func tapGestureRecognized() { endEditing(true) } } ================================================ FILE: Source/MessageViews/EKMessageContentView.swift ================================================ // // EKMessageContentView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/19/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit public class EKMessageContentView: UIView { // MARK: Properties private let titleLabel = UILabel() private let subtitleLabel = UILabel() private var horizontalConstraints: QLAxisConstraints! private var topConstraint: NSLayoutConstraint! private var bottomConstraint: NSLayoutConstraint! private var labelsOffsetConstraint: NSLayoutConstraint! public var titleContent: EKProperty.LabelContent! { didSet { titleLabel.content = titleContent } } public var subtitleContent: EKProperty.LabelContent! { didSet { subtitleLabel.content = subtitleContent } } public var titleAttributes: EKProperty.LabelStyle! { didSet { titleLabel.style = titleAttributes } } public var subtitleAttributes: EKProperty.LabelStyle! { didSet { subtitleLabel.style = subtitleAttributes } } public var title: String! { didSet { titleLabel.text = title } } public var subtitle: String! { didSet { subtitleLabel.text = subtitle } } public var verticalMargins: CGFloat = 20 { didSet { topConstraint.constant = verticalMargins bottomConstraint.constant = -verticalMargins layoutIfNeeded() } } public var horizontalMargins: CGFloat = 20 { didSet { horizontalConstraints.first.constant = horizontalMargins horizontalConstraints.second.constant = -horizontalMargins layoutIfNeeded() } } public var labelsOffset: CGFloat = 8 { didSet { labelsOffsetConstraint.constant = labelsOffset layoutIfNeeded() } } // MARK: Setup public init() { super.init(frame: UIScreen.main.bounds) clipsToBounds = true setupTitleLabel() setupSubtitleLabel() } public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupTitleLabel() { addSubview(titleLabel) topConstraint = titleLabel.layoutToSuperview(.top, offset: verticalMargins) horizontalConstraints = titleLabel.layoutToSuperview(axis: .horizontally, offset: horizontalMargins) titleLabel.forceContentWrap(.vertically) } private func setupSubtitleLabel() { addSubview(subtitleLabel) labelsOffsetConstraint = subtitleLabel.layout(.top, to: .bottom, of: titleLabel, offset: labelsOffset) subtitleLabel.layout(to: .left, of: titleLabel) subtitleLabel.layout(to: .right, of: titleLabel) bottomConstraint = subtitleLabel.layoutToSuperview(.bottom, offset: -verticalMargins, priority: .must) subtitleLabel.forceContentWrap(.vertically) } private func setupInterfaceStyle() { titleLabel.textColor = titleContent?.style.color(for: traitCollection) subtitleLabel.textColor = subtitleContent?.style.color(for: traitCollection) } public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupInterfaceStyle() } } ================================================ FILE: Source/MessageViews/EKNotificationMessageView.swift ================================================ // // EKNotificationMessageView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/19/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final public class EKNotificationMessageView: EKSimpleMessageView { // MARK: Props private var auxLabel: UILabel! private var auxiliaryContent: EKProperty.LabelContent! private let message: EKNotificationMessage // MARK: Setup public init(with message: EKNotificationMessage) { self.message = message super.init(with: message.simpleMessage) setupAuxLabel(with: message.auxiliary) layoutContent(with: message.insets) } public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupAuxLabel(with content: EKProperty.LabelContent?) { auxiliaryContent = content guard let content = content else { return } auxLabel = UILabel() auxLabel.content = content addSubview(auxLabel) } private func layoutContent(with insets: EKNotificationMessage.Insets) { messageContentView.verticalMargins = 0 messageContentView.horizontalMargins = 0 messageContentView.labelsOffset = insets.titleToDescription if let thumbImageView = thumbImageView { thumbImageView.layoutToSuperview(.left, offset: insets.contentInsets.left) thumbImageView.layoutToSuperview(.top, offset: insets.contentInsets.top) messageContentView.layout(.left, to: .right, of: thumbImageView, offset: 12) messageContentView.layout(to: .top, of: thumbImageView, offset: 4) } else { messageContentView.layoutToSuperview(.left, offset: insets.contentInsets.left) messageContentView.layoutToSuperview(.top, offset: insets.contentInsets.top) } if let auxLabel = auxLabel { auxLabel.layoutToSuperview(.right, offset: -insets.contentInsets.right) auxLabel.layoutToSuperview(.top, offset: insets.contentInsets.top + 2) auxLabel.forceContentWrap() messageContentView.layout(.right, to: .left, of: auxLabel) } else { messageContentView.layoutToSuperview(.right, offset: -insets.contentInsets.right) } messageContentView.layoutToSuperview(.bottom, offset: -insets.contentInsets.bottom) } public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) auxLabel?.textColor = auxiliaryContent?.style.color(for: traitCollection) } } ================================================ FILE: Source/MessageViews/EKPopUpMessageView.swift ================================================ // // EKPopUpMessageView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/20/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final public class EKPopUpMessageView: UIView { // MARK: - Properties private var imageView: UIImageView! private let titleLabel = UILabel() private let descriptionLabel = UILabel() private let actionButton = UIButton() private let message: EKPopUpMessage // MARK: - Setup public init(with message: EKPopUpMessage) { self.message = message super.init(frame: UIScreen.main.bounds) setupImageView() setupTitleLabel() setupDescriptionLabel() setupActionButton() setupInterfaceStyle() } public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupImageView() { guard let themeImage = message.themeImage else { return } imageView = UIImageView() addSubview(imageView) imageView.layoutToSuperview(.centerX) switch themeImage.position { case .centerToTop(offset: let value): imageView.layout(.centerY, to: .top, of: self, offset: value) case .topToTop(offset: let value): imageView.layoutToSuperview(.top, offset: value) } imageView.imageContent = themeImage.image } private func setupTitleLabel() { addSubview(titleLabel) titleLabel.content = message.title titleLabel.layoutToSuperview(axis: .horizontally, offset: 30) if let imageView = imageView { titleLabel.layout(.top, to: .bottom, of: imageView, offset: 20) } else { titleLabel.layoutToSuperview(.top, offset: 20) } titleLabel.forceContentWrap(.vertically) } private func setupDescriptionLabel() { addSubview(descriptionLabel) descriptionLabel.content = message.description descriptionLabel.layoutToSuperview(axis: .horizontally, offset: 30) descriptionLabel.layout(.top, to: .bottom, of: titleLabel, offset: 16) descriptionLabel.forceContentWrap(.vertically) } private func setupActionButton() { addSubview(actionButton) let height: CGFloat = 45 actionButton.set(.height, of: height) actionButton.layout(.top, to: .bottom, of: descriptionLabel, offset: 30) actionButton.layoutToSuperview(.bottom, offset: -30) actionButton.layoutToSuperview(.centerX) let buttonAttributes = message.button actionButton.buttonContent = buttonAttributes actionButton.contentEdgeInsets = UIEdgeInsets(top: 0, left: 30, bottom: 0, right: 30) actionButton.layer.cornerRadius = height * 0.5 actionButton.addTarget(self, action: #selector(actionButtonPressed), for: .touchUpInside) } private func setupInterfaceStyle() { titleLabel.textColor = message.title.style.color(for: traitCollection) imageView?.tintColor = message.themeImage?.image.tintColor(for: traitCollection) let tapColor = message.button.highlighedLabelColor(for: traitCollection) actionButton.setTitleColor(tapColor, for: .highlighted) actionButton.setTitleColor(tapColor, for: .selected) } public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupInterfaceStyle() } // MARK: - User Interaction @objc func actionButtonPressed() { message.action() } } ================================================ FILE: Source/MessageViews/EKRatingMessageView.swift ================================================ // // EKRatingMessageView.swift // SwiftEntryKit // // Created by Daniel Huri on 6/1/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final public class EKRatingMessageView: UIView, EntryAppearanceDescriptor { // MARK: Properties private var message: EKRatingMessage // MARK: EntryAppearenceDescriptor var bottomCornerRadius: CGFloat = 0 { didSet { buttonBarView.bottomCornerRadius = bottomCornerRadius } } private var selectedIndex: Int! { didSet { message.selectedIndex = selectedIndex let item = message.ratingItems[selectedIndex] set(title: item.title, description: item.description) } } private let messageContentView = EKMessageContentView() private let symbolsView = EKRatingSymbolsContainerView() private var buttonBarView: EKButtonBarView! public init(with message: EKRatingMessage) { self.message = message super.init(frame: UIScreen.main.bounds) setupMessageContentView() setupSymbolsView() setupButtonBarView() set(title: message.initialTitle, description: message.initialDescription) } required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func set(title: EKProperty.LabelContent, description: EKProperty.LabelContent) { messageContentView.titleContent = title messageContentView.subtitleContent = description UIView.animate(withDuration: 0.4, delay: 0, usingSpringWithDamping: 1, initialSpringVelocity: 0, options: [.transitionCrossDissolve], animations: { SwiftEntryKit.layoutIfNeeded() }, completion: nil) } private func setupMessageContentView() { addSubview(messageContentView) messageContentView.verticalMargins = 20 messageContentView.horizontalMargins = 30 messageContentView.layoutToSuperview(axis: .horizontally, priority: .must) messageContentView.layoutToSuperview(.top, offset: 10) } private func setupSymbolsView() { addSubview(symbolsView) symbolsView.setup(with: message) { [unowned self] (index: Int) in self.message.selectedIndex = index self.message.selection?(index) self.selectedIndex = index self.animateIn() } symbolsView.layoutToSuperview(.centerX) symbolsView.layout(.top, to: .bottom, of: messageContentView, offset: 10, priority: .must) } private func setupButtonBarView() { buttonBarView = EKButtonBarView(with: message.buttonBarContent) buttonBarView.clipsToBounds = true buttonBarView.alpha = 0 addSubview(buttonBarView) buttonBarView.layout(.top, to: .bottom, of: symbolsView, offset: 30) buttonBarView.layoutToSuperview(.bottom) buttonBarView.layoutToSuperview(axis: .horizontally) } // MARK: - Internal Animation private func animateIn() { layoutIfNeeded() buttonBarView.expand() } } ================================================ FILE: Source/MessageViews/EKSimpleMessageView.swift ================================================ // // EKMessageView.swift // SwiftEntryKit // // Created by Daniel Huri on 5/5/18. // import UIKit public class EKSimpleMessageView: UIView { // MARK: Props var thumbImageView: UIImageView! let messageContentView = EKMessageContentView() private let message: EKSimpleMessage // MARK: Setup init(with message: EKSimpleMessage) { self.message = message super.init(frame: UIScreen.main.bounds) setupThumbImageView(with: message.image) setupMessageContentView(with: message.title, description: message.description) } required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupThumbImageView(with content: EKProperty.ImageContent?) { guard let content = content else { return } thumbImageView = UIImageView() addSubview(thumbImageView) thumbImageView.imageContent = content } private func setupMessageContentView(with title: EKProperty.LabelContent, description: EKProperty.LabelContent) { messageContentView.titleContent = title messageContentView.subtitleContent = description addSubview(messageContentView) } private func setupInterfaceStyle() { if let image = message.image { thumbImageView?.tintColor = image.tint?.color( for: traitCollection, mode: image.displayMode ) } } public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupInterfaceStyle() } } ================================================ FILE: Source/MessageViews/MessagesUtils/EKButtonBarView.swift ================================================ // // ButtonsBarView.swift // SwiftEntryKit_Example // // Created by Daniel Huri on 4/28/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit /** Dynamic button bar view Buttons are set according to the received content. 1-2 buttons spread horizontally 3 or more buttons spread vertically */ final public class EKButtonBarView: UIView { // MARK: - Properties private var buttonViews: [EKButtonView] = [] private var separatorViews: [UIView] = [] private let buttonBarContent: EKProperty.ButtonBarContent private let spreadAxis: QLAxis private let oppositeAxis: QLAxis private let relativeEdge: NSLayoutConstraint.Attribute var bottomCornerRadius: CGFloat = 0 { didSet { adjustRoundCornersIfNecessary() } } private lazy var buttonEdgeRatio: CGFloat = { return 1.0 / CGFloat(self.buttonBarContent.content.count) }() private(set) lazy var intrinsicHeight: CGFloat = { var height: CGFloat = 0 switch buttonBarContent.content.count { case 0: height += 1 case 1...buttonBarContent.horizontalDistributionThreshold: height += buttonBarContent.buttonHeight default: for _ in 1...buttonBarContent.content.count { height += buttonBarContent.buttonHeight } } return height }() private var compressedConstraint: NSLayoutConstraint! private lazy var expandedConstraint: NSLayoutConstraint = { return set(.height, of: intrinsicHeight, priority: .defaultLow) }() // MARK: Setup required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } public init(with buttonBarContent: EKProperty.ButtonBarContent) { self.buttonBarContent = buttonBarContent if buttonBarContent.content.count <= buttonBarContent.horizontalDistributionThreshold { spreadAxis = .horizontally oppositeAxis = .vertically relativeEdge = .width } else { spreadAxis = .vertically oppositeAxis = .horizontally relativeEdge = .height } super.init(frame: .zero) setupButtonBarContent() setupSeparatorViews() compressedConstraint = set(.height, of: 1, priority: .must) } public override func layoutSubviews() { super.layoutSubviews() adjustRoundCornersIfNecessary() } private func setupButtonBarContent() { for content in buttonBarContent.content { let buttonView = EKButtonView(content: content) addSubview(buttonView) buttonViews.append(buttonView) } layoutButtons() } private func layoutButtons() { guard !buttonViews.isEmpty else { return } let suffix = Array(buttonViews.dropFirst()) if !suffix.isEmpty { suffix.layout(.height, to: buttonViews.first!) } buttonViews.layoutToSuperview(axis: oppositeAxis) buttonViews.spread(spreadAxis, stretchEdgesToSuperview: true) buttonViews.layout(relativeEdge, to: self, ratio: buttonEdgeRatio, priority: .must) } private func setupTopSeperatorView() { let topSeparatorView = UIView() addSubview(topSeparatorView) topSeparatorView.set(.height, of: 1) topSeparatorView.layoutToSuperview(.left, .right, .top) separatorViews.append(topSeparatorView) } private func setupSeperatorView(after view: UIView) { let midSepView = UIView() addSubview(midSepView) let sepAttribute: NSLayoutConstraint.Attribute let buttonAttribute: NSLayoutConstraint.Attribute switch oppositeAxis { case .vertically: sepAttribute = .centerX buttonAttribute = .right case .horizontally: sepAttribute = .centerY buttonAttribute = .bottom } midSepView.layout(sepAttribute, to: buttonAttribute, of: view) midSepView.set(relativeEdge, of: 1) midSepView.layoutToSuperview(axis: oppositeAxis) separatorViews.append(midSepView) } private func setupSeparatorViews() { setupTopSeperatorView() for button in buttonViews.dropLast() { setupSeperatorView(after: button) } setupInterfaceStyle() } // Amination public func expand() { let expansion = { self.compressedConstraint.priority = .defaultLow self.expandedConstraint.priority = .must /* NOTE: Calling layoutIfNeeded for the whole view hierarchy. Sometimes it's easier to just use frames instead of AutoLayout for hierarch complexity considerations. Here the animation influences almost the entire view hierarchy. */ SwiftEntryKit.layoutIfNeeded() } alpha = 1 if buttonBarContent.expandAnimatedly { let damping: CGFloat = buttonBarContent.content.count <= 2 ? 0.4 : 0.8 SwiftEntryKit.layoutIfNeeded() UIView.animate(withDuration: 0.8, delay: 0, usingSpringWithDamping: damping, initialSpringVelocity: 0, options: [.beginFromCurrentState, .allowUserInteraction, .layoutSubviews, .allowAnimatedContent], animations: { expansion() }, completion: nil) } else { expansion() } } public func compress() { compressedConstraint.priority = .must expandedConstraint.priority = .defaultLow } private func adjustRoundCornersIfNecessary() { let size = CGSize(width: bottomCornerRadius, height: bottomCornerRadius) let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: .bottom, cornerRadii: size) let maskLayer = CAShapeLayer() maskLayer.path = path.cgPath layer.mask = maskLayer } private func setupInterfaceStyle() { for view in separatorViews { view.backgroundColor = buttonBarContent.separatorColor(for: traitCollection) } } public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupInterfaceStyle() } } ================================================ FILE: Source/MessageViews/MessagesUtils/EKButtonView.swift ================================================ // // EKButtonView.swift // SwiftEntryKit // // Created by Daniel Huri on 12/8/18. // Copyright © 2018 CocoaPods. All rights reserved. // import UIKit final class EKButtonView: UIView { // MARK: - Properties private let button = UIButton() private let titleLabel = UILabel() private let content: EKProperty.ButtonContent // MARK: - Setup init(content: EKProperty.ButtonContent) { self.content = content super.init(frame: .zero) setupTitleLabel() setupButton() setupAcceessibility() setupInterfaceStyle() } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupAcceessibility() { isAccessibilityElement = false button.isAccessibilityElement = true button.accessibilityIdentifier = content.accessibilityIdentifier button.accessibilityLabel = content.label.text } private func setupButton() { addSubview(button) button.fillSuperview() button.addTarget(self, action: #selector(buttonTouchUp), for: [.touchUpInside, .touchUpOutside, .touchCancel]) button.addTarget(self, action: #selector(buttonTouchDown), for: .touchDown) button.addTarget(self, action: #selector(buttonTouchUpInside), for: .touchUpInside) } private func setupTitleLabel() { titleLabel.numberOfLines = content.label.style.numberOfLines titleLabel.font = content.label.style.font titleLabel.text = content.label.text titleLabel.textAlignment = .center titleLabel.lineBreakMode = .byWordWrapping addSubview(titleLabel) titleLabel.layoutToSuperview(axis: .horizontally, offset: content.contentEdgeInset) titleLabel.layoutToSuperview(axis: .vertically, offset: content.contentEdgeInset) } private func setBackground(by content: EKProperty.ButtonContent, isHighlighted: Bool) { if isHighlighted { backgroundColor = content.highlightedBackgroundColor(for: traitCollection) } else { backgroundColor = content.backgroundColor(for: traitCollection) } } private func setupInterfaceStyle() { backgroundColor = content.backgroundColor(for: traitCollection) titleLabel.textColor = content.label.style.color(for: traitCollection) } // MARK: - Selectors @objc func buttonTouchUpInside() { content.action?() } @objc func buttonTouchDown() { setBackground(by: content, isHighlighted: true) } @objc func buttonTouchUp() { setBackground(by: content, isHighlighted: false) } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupInterfaceStyle() } } ================================================ FILE: Source/MessageViews/MessagesUtils/EKRatingSymbolView.swift ================================================ // // EKRatingSymbolView.swift // SwiftEntryKit // // Created by Daniel Huri on 6/1/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final public class EKRatingSymbolView: UIView { private let button = UIButton() private let imageView = UIImageView() private let unselectedImage: EKProperty.ImageContent private let selectedImage: EKProperty.ImageContent var selection: EKRatingMessage.Selection public var isSelected: Bool { set { imageView.imageContent = newValue ? selectedImage : unselectedImage } get { return imageView.image == selectedImage.images.first } } public init(unselectedImage: EKProperty.ImageContent, selectedImage: EKProperty.ImageContent, selection: @escaping EKRatingMessage.Selection) { self.unselectedImage = unselectedImage self.selectedImage = selectedImage self.selection = selection super.init(frame: .zero) setupImageView() setupButton() } required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupButton() { addSubview(button) button.fillSuperview() button.addTarget(self, action: #selector(touchUpInside), for: .touchUpInside) button.addTarget(self, action: #selector(touchDown), for: [.touchDown]) button.addTarget(self, action: #selector(touchUp), for: [.touchUpInside, .touchUpOutside, .touchCancel]) } private func setupImageView() { addSubview(imageView) imageView.imageContent = unselectedImage imageView.centerInSuperview() imageView.sizeToSuperview(withRatio: 0.7) } @objc func touchUpInside() { selection(tag) } @objc func touchDown() { transform = CGAffineTransform(scaleX: 1.15, y: 1.15) } @objc func touchUp() { transform = CGAffineTransform(scaleX: 1, y: 1) } } ================================================ FILE: Source/MessageViews/MessagesUtils/EKRatingSymbolsContainerView.swift ================================================ // // EKRatingSymbolsContainerView.swift // SwiftEntryKit // // Created by Daniel Huri on 6/1/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit final public class EKRatingSymbolsContainerView: UIView { private var message: EKRatingMessage! private var symbolsArray: [EKRatingSymbolView] = [] public func setup(with message: EKRatingMessage, externalSelection: @escaping EKRatingMessage.Selection) { self.message = message let internalSelection = { [unowned self] (index: Int) in self.select(index: index) externalSelection(index) } for (index, item) in message.ratingItems.enumerated() { let itemView = EKRatingSymbolView(unselectedImage: item.unselectedImage, selectedImage: item.selectedImage, selection: internalSelection) itemView.tag = index addSubview(itemView) itemView.set(.height, of: item.size.height) itemView.set(.width, of: item.size.width) symbolsArray.append(itemView) } symbolsArray.layoutToSuperview(axis: .vertically, priority: .must) symbolsArray.spread(.horizontally, stretchEdgesToSuperview: true) select(index: message.selectedIndex) } private func select(index: Int? = nil) { var delay: TimeInterval = 0 for (i, view) in symbolsArray.enumerated() { DispatchQueue.main.asyncAfter(deadline: .now() + delay) { if let index = index, i <= index { view.isSelected = true view.transform = CGAffineTransform(scaleX: 1.5, y: 1.5) } else if view.isSelected || index == nil { view.isSelected = false view.transform = CGAffineTransform(scaleX: 0.5, y: 0.5) } UIView.animate(withDuration: 0.6, delay: 0, usingSpringWithDamping: 0.5, initialSpringVelocity: 0, options: [.allowUserInteraction], animations: { view.transform = .identity }, completion: nil) } delay += 0.05 } } } ================================================ FILE: Source/MessageViews/MessagesUtils/EKTextField.swift ================================================ // // EKTextField.swift // SwiftEntryKit // // Created by Daniel Huri on 5/16/18. // import Foundation import UIKit final public class EKTextField: UIView { // MARK: - Properties static let totalHeight: CGFloat = 45 private let content: EKProperty.TextFieldContent private let imageView = UIImageView() private let textField = UITextField() private let separatorView = UIView() public var text: String { set { textField.text = newValue } get { return textField.text ?? "" } } // MARK: - Setup public init(with content: EKProperty.TextFieldContent) { self.content = content super.init(frame: UIScreen.main.bounds) setupImageView() setupTextField() setupSeparatorView() textField.accessibilityIdentifier = content.accessibilityIdentifier } required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupImageView() { addSubview(imageView) imageView.contentMode = .center imageView.set(.width, .height, of: EKTextField.totalHeight) imageView.layoutToSuperview(.leading) imageView.image = content.leadingImage imageView.tintColor = content.tintColor(for: traitCollection) } private func setupTextField() { addSubview(textField) textField.textFieldContent = content textField.delegate = content.delegate textField.set(.height, of: EKTextField.totalHeight) textField.layout(.leading, to: .trailing, of: imageView) textField.layoutToSuperview(.top, .trailing) imageView.layout(to: .centerY, of: textField) } private func setupSeparatorView() { addSubview(separatorView) separatorView.layout(.top, to: .bottom, of: textField) separatorView.set(.height, of: 1) separatorView.layoutToSuperview(.bottom) separatorView.layoutToSuperview(axis: .horizontally, offset: 10) separatorView.backgroundColor = content.bottomBorderColor.color( for: traitCollection, mode: content.displayMode ) } public func makeFirstResponder() { textField.becomeFirstResponder() } public override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { separatorView.backgroundColor = content.bottomBorderColor(for: traitCollection) imageView.tintColor = content.tintColor(for: traitCollection) textField.textColor = content.textStyle.color(for: traitCollection) textField.placeholder = content.placeholder } } ================================================ FILE: Source/MessageViews/MessagesUtils/EntryAppearanceDescriptor.swift ================================================ // // EntryAppearanceDescriptor.swift // SwiftEntryKit // // Created by Daniel Huri on 1/5/19. // Copyright © 2019 CocoaPods. All rights reserved. // import UIKit /** An anti-pattern for SwiftEntryKit views to know more about their appearence, if necessary, since views don't have access to EKAttributes. This is a solution to bug #117 (round buttons in alert) */ protocol EntryAppearanceDescriptor: AnyObject { var bottomCornerRadius: CGFloat { get set } } ================================================ FILE: Source/MessageViews/Notes/EKAccessoryNoteMessageView.swift ================================================ // // EKAccessoryNoteMessageView.swift // SwiftEntryKit // // Created by Daniel Huri on 5/4/18. // import UIKit public class EKAccessoryNoteMessageView: UIView { // MARK: Props private let contentView = UIView() private var noteMessageView: EKNoteMessageView! var accessoryView: UIView! func setup(with content: EKProperty.LabelContent) { clipsToBounds = true addSubview(contentView) contentView.layoutToSuperview(.centerX, .top, .bottom) contentView.layoutToSuperview(.left, relation: .greaterThanOrEqual, offset: 16) contentView.layoutToSuperview(.right, relation: .lessThanOrEqual, offset: -16) noteMessageView = EKNoteMessageView(with: content) noteMessageView.horizontalOffset = 8 noteMessageView.verticalOffset = 7 contentView.addSubview(noteMessageView) noteMessageView.layoutToSuperview(.top, .bottom, .trailing) contentView.addSubview(accessoryView) accessoryView.layoutToSuperview(.leading, .centerY) accessoryView.layout(.trailing, to: .leading, of: noteMessageView) } } ================================================ FILE: Source/MessageViews/Notes/EKImageNoteMessageView.swift ================================================ // // EKImageNoteMessageView.swift // SwiftEntryKit // // Created by Daniel Huri on 5/4/18. // import UIKit public class EKImageNoteMessageView: EKAccessoryNoteMessageView { // MARK: Setup public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } public init(with content: EKProperty.LabelContent, imageContent: EKProperty.ImageContent) { super.init(frame: UIScreen.main.bounds) setup(with: content, imageContent: imageContent) } private func setup(with content: EKProperty.LabelContent, imageContent: EKProperty.ImageContent) { let imageView = UIImageView() imageView.imageContent = imageContent accessoryView = imageView super.setup(with: content) } } ================================================ FILE: Source/MessageViews/Notes/EKNoteMessageView.swift ================================================ // // EKNoteMessageView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/19/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit public class EKNoteMessageView: UIView { // MARK: Props private let label = UILabel() private var horizontalConstrainsts: QLAxisConstraints! private var verticalConstrainsts: QLAxisConstraints! public var horizontalOffset: CGFloat = 10 { didSet { horizontalConstrainsts.first.constant = horizontalOffset horizontalConstrainsts.second.constant = -horizontalOffset layoutIfNeeded() } } public var verticalOffset: CGFloat = 5 { didSet { verticalConstrainsts.first.constant = verticalOffset verticalConstrainsts.second.constant = -verticalOffset layoutIfNeeded() } } // MARK: Setup public init(with content: EKProperty.LabelContent) { super.init(frame: UIScreen.main.bounds) setup(with: content) } public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setup(with content: EKProperty.LabelContent) { clipsToBounds = true addSubview(label) label.content = content horizontalConstrainsts = label.layoutToSuperview(axis: .horizontally, offset: horizontalOffset, priority: .must) verticalConstrainsts = label.layoutToSuperview(axis: .vertically, offset: verticalOffset, priority: .must) } } ================================================ FILE: Source/MessageViews/Notes/EKProcessingNoteMessageView.swift ================================================ // // EKProcessingNoteMessageView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/20/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit public class EKProcessingNoteMessageView: EKAccessoryNoteMessageView { // MARK: Props private var activityIndicatorView: UIActivityIndicatorView! private var noteMessageView: EKNoteMessageView! /** Activity indication can be turned off / on */ public var isProcessing: Bool = true { didSet { if isProcessing { activityIndicatorView.startAnimating() } else { activityIndicatorView.stopAnimating() } } } // MARK: Setup public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } public init(with content: EKProperty.LabelContent, activityIndicator: UIActivityIndicatorView.Style) { super.init(frame: UIScreen.main.bounds) setup(with: content, activityIndicator: activityIndicator) } private func setup(with content: EKProperty.LabelContent, activityIndicator: UIActivityIndicatorView.Style, setProcessing: Bool = true) { activityIndicatorView = UIActivityIndicatorView() activityIndicatorView.style = activityIndicator isProcessing = setProcessing accessoryView = activityIndicatorView super.setup(with: content) } } ================================================ FILE: Source/MessageViews/Notes/EKXStatusBarMessageView.swift ================================================ // // EKXStatusBarMessageView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/19/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit public class EKXStatusBarMessageView: UIView { // MARK: Props private let leadingLabel = UILabel() private let trailingLabel = UILabel() // MARK: Setup public init(leading: EKProperty.LabelContent, trailing: EKProperty.LabelContent) { super.init(frame: UIScreen.main.bounds) setup(leading: leading, trailing: trailing) } public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setup(leading: EKProperty.LabelContent, trailing: EKProperty.LabelContent) { clipsToBounds = true set(.height, of: UIApplication.shared.statusBarFrame.maxY) addSubview(leadingLabel) leadingLabel.content = leading leadingLabel.layoutToSuperview(axis: .vertically) leadingLabel.layoutToSuperview(.leading) leadingLabel.layoutToSuperview(.width, ratio: 0.26) addSubview(trailingLabel) trailingLabel.content = trailing trailingLabel.layoutToSuperview(axis: .vertically) trailingLabel.layoutToSuperview(.trailing) trailingLabel.layoutToSuperview(.width, ratio: 0.26) } } ================================================ FILE: Source/Model/EKAlertMessage.swift ================================================ // // EKAlertMessage.swift // SwiftEntryKit // // Created by Daniel Huri on 6/1/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // public struct EKAlertMessage { public enum ImagePosition { case top case left } /** The position of the image inside the alert */ public let imagePosition: ImagePosition /** Image, Title, Description */ public let simpleMessage: EKSimpleMessage /** Contents of button bar */ public let buttonBarContent: EKProperty.ButtonBarContent public init(simpleMessage: EKSimpleMessage, imagePosition: ImagePosition = .top, buttonBarContent: EKProperty.ButtonBarContent) { self.simpleMessage = simpleMessage self.imagePosition = imagePosition self.buttonBarContent = buttonBarContent } } ================================================ FILE: Source/Model/EKColor.swift ================================================ // // EKColor.swift // SwiftEntryKit // // Created by Daniel on 21/07/2019. // Copyright © 2019 CocoaPods. All rights reserved. // import UIKit /** A color representation attribute as per user interface style */ public struct EKColor: Equatable { // MARK: - Properties public private(set) var dark: UIColor public private(set) var light: UIColor // MARK: - Setup public init(light: UIColor, dark: UIColor) { self.light = light self.dark = dark } public init(_ unified: UIColor) { self.light = unified self.dark = unified } public init(rgb: Int) { dark = UIColor(rgb: rgb) light = UIColor(rgb: rgb) } public init(red: Int, green: Int, blue: Int) { assert(red >= 0 && red <= 255, "Invalid red component") assert(green >= 0 && green <= 255, "Invalid green component") assert(blue >= 0 && blue <= 255, "Invalid blue component") let color = UIColor(red: CGFloat(red) / 255.0, green: CGFloat(green) / 255.0, blue: CGFloat(blue) / 255.0, alpha: 1.0) light = color dark = color } /** Computes the proper UIColor */ public func color(for traits: UITraitCollection, mode: EKAttributes.DisplayMode) -> UIColor { switch mode { case .inferred: if #available(iOS 13, *) { switch traits.userInterfaceStyle { case .light, .unspecified: return light case .dark: return dark @unknown default: return light } } else { return light } case .light: return light case .dark: return dark } } } public extension EKColor { /// Returns the inverse of `self` (light and dark swapped) var inverted: EKColor { return EKColor(light: dark, dark: light) } /** Returns an `EKColor` with the specified alpha component */ func with(alpha: CGFloat) -> EKColor { return EKColor(light: light.withAlphaComponent(alpha), dark: dark.withAlphaComponent(alpha)) } /** White color for all user interface styles */ static var white: EKColor { return EKColor(.white) } /** Black color for all user interface styles */ static var black: EKColor { return EKColor(.black) } /** Clear color for all user interface styles */ static var clear: EKColor { return EKColor(.clear) } /** Color that represents standard background. White for light mode, black for dark mode */ static var standardBackground: EKColor { return EKColor(light: .white, dark: .black) } /** Color that represents standard content. black for light mode, white for dark mode */ static var standardContent: EKColor { return EKColor(light: .black, dark: .white) } } ================================================ FILE: Source/Model/EKNotificationMessage.swift ================================================ // // EKNotificationMessage.swift // SwiftEntryKit // // Created by Daniel Huri on 4/20/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit public struct EKNotificationMessage { /** Insets of the content of the message */ public struct Insets { /** The insets of the content of the message, from the top, bottom, left, right */ public var contentInsets = UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16) /** The distance between the title and the description */ public var titleToDescription: CGFloat = 5 public static var `default` = Insets() } /** Image, Title, Description */ public let simpleMessage: EKSimpleMessage /** Optional auxiliary label descriptor (For instance, it be used to display time of message) */ public let auxiliary: EKProperty.LabelContent? /** Defines the vertical and horizontal margins */ public let insets: Insets public init(simpleMessage: EKSimpleMessage, auxiliary: EKProperty.LabelContent? = nil, insets: Insets = .default) { self.simpleMessage = simpleMessage self.auxiliary = auxiliary self.insets = insets } } ================================================ FILE: Source/Model/EKPopUpMessage.swift ================================================ // // EKPopUpMessage.swift // SwiftEntryKit // // Created by Daniel Huri on 4/21/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit public struct EKPopUpMessage { /** Code block that is executed as the user taps the popup button */ public typealias EKPopUpMessageAction = () -> () /** Popup theme image */ public struct ThemeImage { /** Position of the theme image */ public enum Position { case topToTop(offset: CGFloat) case centerToTop(offset: CGFloat) } /** The content of the image */ public var image: EKProperty.ImageContent /** The psotion of the image */ public var position: Position /** Initializer */ public init(image: EKProperty.ImageContent, position: Position = .topToTop(offset: 40)) { self.image = image self.position = position } } public var themeImage: ThemeImage? public var title: EKProperty.LabelContent public var description: EKProperty.LabelContent public var button: EKProperty.ButtonContent public var action: EKPopUpMessageAction var containsImage: Bool { return themeImage != nil } public init(themeImage: ThemeImage? = nil, title: EKProperty.LabelContent, description: EKProperty.LabelContent, button: EKProperty.ButtonContent, action: @escaping EKPopUpMessageAction) { self.themeImage = themeImage self.title = title self.description = description self.button = button self.action = action } } ================================================ FILE: Source/Model/EKProperty.swift ================================================ // // EKProperty.swift // SwiftEntryKit // // Created by Daniel Huri on 4/19/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit public struct EKProperty { /** Button content descriptor */ public struct ButtonContent { public typealias Action = () -> () /** Button title label content descriptor */ public var label: LabelContent /** Button background color */ public var backgroundColor: EKColor public var highlightedBackgroundColor: EKColor /** Content edge inset */ public var contentEdgeInset: CGFloat /** The display mode of the button */ public var displayMode: EKAttributes.DisplayMode /** Accessibility identifier that identifies the button */ public var accessibilityIdentifier: String? /** Action */ public var action: Action? public init(label: LabelContent, backgroundColor: EKColor, highlightedBackgroundColor: EKColor, contentEdgeInset: CGFloat = 5, displayMode: EKAttributes.DisplayMode = .inferred, accessibilityIdentifier: String? = nil, action: @escaping Action = {}) { self.label = label self.backgroundColor = backgroundColor self.highlightedBackgroundColor = highlightedBackgroundColor self.contentEdgeInset = contentEdgeInset self.displayMode = displayMode self.accessibilityIdentifier = accessibilityIdentifier self.action = action } public func backgroundColor(for traitCollection: UITraitCollection) -> UIColor { return backgroundColor.color(for: traitCollection, mode: displayMode) } public func highlightedBackgroundColor(for traitCollection: UITraitCollection) -> UIColor { return highlightedBackgroundColor.color(for: traitCollection, mode: displayMode) } public func highlighedLabelColor(for traitCollection: UITraitCollection) -> UIColor { return label.style.color.with(alpha: 0.8).color( for: traitCollection, mode: label.style.displayMode ) } } /** Label content descriptor */ public struct LabelContent { /** The text */ public var text: String /** The label's style */ public var style: LabelStyle /** The label's accessibility ideentifier */ public var accessibilityIdentifier: String? public init(text: String, style: LabelStyle, accessibilityIdentifier: String? = nil) { self.text = text self.style = style self.accessibilityIdentifier = accessibilityIdentifier } } /** Label style descriptor */ public struct LabelStyle { /** Font of the text */ public var font: UIFont /** Color of the text */ public var color: EKColor /** Text Alignment */ public var alignment: NSTextAlignment /** Number of lines */ public var numberOfLines: Int /** Display mode for the label */ public var displayMode: EKAttributes.DisplayMode public init(font: UIFont, color: EKColor, alignment: NSTextAlignment = .left, displayMode: EKAttributes.DisplayMode = .inferred, numberOfLines: Int = 0) { self.font = font self.color = color self.alignment = alignment self.displayMode = displayMode self.numberOfLines = numberOfLines } public func color(for traitCollection: UITraitCollection) -> UIColor { return color.color(for: traitCollection, mode: displayMode) } } /** Image View style descriptor */ public struct ImageContent { /** Repeated-reversed animation throughout the presentation of an image */ public enum TransformAnimation { case animate(duration: TimeInterval, options: UIView.AnimationOptions, transform: CGAffineTransform) case none } /** Tint color for the image/s */ public var tint: EKColor? /** The images */ public var images: [UIImage] /** Image sequence duration, if any */ public var imageSequenceAnimationDuration: TimeInterval /** Image View size - can be forced. If nil, then the image view hugs content and resists compression */ public var size: CGSize? /** Content mode */ public var contentMode: UIView.ContentMode /** Should the image be rounded */ public var makesRound: Bool /** Repeated-Reversed animation */ public var animation: TransformAnimation /** The display mode of the image */ public var displayMode: EKAttributes.DisplayMode /** Image accessibility identifier */ public var accessibilityIdentifier: String? public init(imageName: String, animation: TransformAnimation = .none, displayMode: EKAttributes.DisplayMode = .inferred, size: CGSize? = nil, contentMode: UIView.ContentMode = .scaleToFill, tint: EKColor? = nil, makesRound: Bool = false, accessibilityIdentifier: String? = nil) { let image = UIImage(named: imageName)! self.init(image: image, displayMode: displayMode, size: size, tint: tint, contentMode: contentMode, makesRound: makesRound, accessibilityIdentifier: accessibilityIdentifier) } public init(image: UIImage, animation: TransformAnimation = .none, displayMode: EKAttributes.DisplayMode = .inferred, size: CGSize? = nil, tint: EKColor? = nil, contentMode: UIView.ContentMode = .scaleToFill, makesRound: Bool = false, accessibilityIdentifier: String? = nil) { self.images = [image] self.size = size self.tint = tint self.displayMode = displayMode self.contentMode = contentMode self.makesRound = makesRound self.animation = animation self.imageSequenceAnimationDuration = 0 self.accessibilityIdentifier = accessibilityIdentifier } public init(images: [UIImage], imageSequenceAnimationDuration: TimeInterval = 1, displayMode: EKAttributes.DisplayMode = .inferred, animation: TransformAnimation = .none, size: CGSize? = nil, tint: EKColor? = nil, contentMode: UIView.ContentMode = .scaleToFill, makesRound: Bool = false, accessibilityIdentifier: String? = nil) { self.images = images self.size = size self.displayMode = displayMode self.tint = tint self.contentMode = contentMode self.makesRound = makesRound self.animation = animation self.imageSequenceAnimationDuration = imageSequenceAnimationDuration self.accessibilityIdentifier = accessibilityIdentifier } public init(imagesNames: [String], imageSequenceAnimationDuration: TimeInterval = 1, displayMode: EKAttributes.DisplayMode = .inferred, animation: TransformAnimation = .none, size: CGSize? = nil, tint: EKColor? = nil, contentMode: UIView.ContentMode = .scaleToFill, makesRound: Bool = false, accessibilityIdentifier: String? = nil) { let images = imagesNames.map { return UIImage(named: $0)! } self.init(images: images, imageSequenceAnimationDuration: imageSequenceAnimationDuration, displayMode: displayMode, animation: animation, size: size, tint: tint, contentMode: contentMode, makesRound: makesRound, accessibilityIdentifier: accessibilityIdentifier) } /** Quick thumbail property generator */ public static func thumb(with image: UIImage, edgeSize: CGFloat) -> ImageContent { return ImageContent(images: [image], size: CGSize(width: edgeSize, height: edgeSize), contentMode: .scaleAspectFill, makesRound: true) } /** Quick thumbail property generator */ public static func thumb(with imageName: String, edgeSize: CGFloat) -> ImageContent { return ImageContent(imagesNames: [imageName], size: CGSize(width: edgeSize, height: edgeSize), contentMode: .scaleAspectFill, makesRound: true) } public func tintColor(for traitCollection: UITraitCollection) -> UIColor? { return tint?.color(for: traitCollection, mode: displayMode) } } /** Text field content **/ public struct TextFieldContent { // NOTE: Intentionally a reference type class ContentWrapper { var text = "" } public weak var delegate: UITextFieldDelegate? public var keyboardType: UIKeyboardType public var isSecure: Bool public var leadingImage: UIImage! public var placeholder: LabelContent public var textStyle: LabelStyle public var tintColor: EKColor! public var displayMode: EKAttributes.DisplayMode public var bottomBorderColor: EKColor public var accessibilityIdentifier: String? let contentWrapper = ContentWrapper() public var textContent: String { set { contentWrapper.text = newValue } get { return contentWrapper.text } } public init(delegate: UITextFieldDelegate? = nil, keyboardType: UIKeyboardType = .default, placeholder: LabelContent, tintColor: EKColor? = nil, displayMode: EKAttributes.DisplayMode = .inferred, textStyle: LabelStyle, isSecure: Bool = false, leadingImage: UIImage? = nil, bottomBorderColor: EKColor = .clear, accessibilityIdentifier: String? = nil) { self.delegate = delegate self.keyboardType = keyboardType self.placeholder = placeholder self.textStyle = textStyle self.tintColor = tintColor self.displayMode = displayMode self.isSecure = isSecure self.leadingImage = leadingImage self.bottomBorderColor = bottomBorderColor self.accessibilityIdentifier = accessibilityIdentifier } public func tintColor(for traitCollection: UITraitCollection) -> UIColor? { return tintColor?.color(for: traitCollection, mode: displayMode) } public func bottomBorderColor(for traitCollection: UITraitCollection) -> UIColor? { return bottomBorderColor.color(for: traitCollection, mode: displayMode) } } /** Button bar content */ public struct ButtonBarContent { /** Button content array */ public var content: [ButtonContent] = [] /** The color of the separator */ public var separatorColor: EKColor /** Upper threshold for the number of buttons (*ButtonContent*) for horizontal distribution. Must be a positive value */ public var horizontalDistributionThreshold: Int /** Determines whether the buttons expands animately */ public var expandAnimatedly: Bool /** The height of each button. All are equally distributed in their axis */ public var buttonHeight: CGFloat /** The display mode of the button bar */ public var displayMode: EKAttributes.DisplayMode public init(with buttonContents: ButtonContent..., separatorColor: EKColor, horizontalDistributionThreshold: Int = 2, buttonHeight: CGFloat = 50, displayMode: EKAttributes.DisplayMode = .inferred, expandAnimatedly: Bool) { self.init(with: buttonContents, separatorColor: separatorColor, horizontalDistributionThreshold: horizontalDistributionThreshold, buttonHeight: buttonHeight, displayMode: displayMode, expandAnimatedly: expandAnimatedly) } public init(with buttonContents: [ButtonContent], separatorColor: EKColor, horizontalDistributionThreshold: Int = 2, buttonHeight: CGFloat = 50, displayMode: EKAttributes.DisplayMode = .inferred, expandAnimatedly: Bool) { guard horizontalDistributionThreshold > 0 else { fatalError("horizontalDistributionThreshold Must have a positive value!") } self.separatorColor = separatorColor self.horizontalDistributionThreshold = horizontalDistributionThreshold self.buttonHeight = buttonHeight self.displayMode = displayMode self.expandAnimatedly = expandAnimatedly content.append(contentsOf: buttonContents) } public func separatorColor(for traitCollection: UITraitCollection) -> UIColor { return separatorColor.color(for: traitCollection, mode: displayMode) } } /** Rating item content */ public struct EKRatingItemContent { public var title: EKProperty.LabelContent public var description: EKProperty.LabelContent public var unselectedImage: EKProperty.ImageContent public var selectedImage: EKProperty.ImageContent public var size: CGSize public init(title: EKProperty.LabelContent, description: EKProperty.LabelContent, unselectedImage: EKProperty.ImageContent, selectedImage: EKProperty.ImageContent, size: CGSize = CGSize(width: 50, height: 50)) { self.title = title self.description = description self.unselectedImage = unselectedImage self.selectedImage = selectedImage self.size = size } } } ================================================ FILE: Source/Model/EKRatingMessage.swift ================================================ // // EKRatingMessage.swift // SwiftEntryKit // // Created by Daniel Huri on 6/1/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import Foundation public struct EKRatingMessage { // NOTE: Intentionally a reference type class SelectedIndex { var selectedIndex: Int! } /** Selection */ public typealias Selection = (Int) -> Void /** Initial title */ public var initialTitle: EKProperty.LabelContent /** Initial description */ public var initialDescription: EKProperty.LabelContent /** Rating items */ public var ratingItems: [EKProperty.EKRatingItemContent] /** Button bar content appears after selection */ public var buttonBarContent: EKProperty.ButtonBarContent /** Selection event - Each time the user interacts a rating star */ public var selection: Selection! let selectedIndexRef = SelectedIndex() /** Selected index (if there is one) */ public var selectedIndex: Int? { get { return selectedIndexRef.selectedIndex } set { selectedIndexRef.selectedIndex = newValue } } /** Initializer */ public init(initialTitle: EKProperty.LabelContent, initialDescription: EKProperty.LabelContent, ratingItems: [EKProperty.EKRatingItemContent], buttonBarContent: EKProperty.ButtonBarContent, selection: Selection? = nil) { self.initialTitle = initialTitle self.initialDescription = initialDescription self.ratingItems = ratingItems self.buttonBarContent = buttonBarContent self.selection = selection } } ================================================ FILE: Source/Model/EKSimpleMessage.swift ================================================ // // EKSimpleMessage.swift // SwiftEntryKit // // Created by Daniel Huri on 6/1/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import Foundation public struct EKSimpleMessage { /** The image view descriptor */ public let image: EKProperty.ImageContent? /** The title label descriptor */ public let title: EKProperty.LabelContent /** The description label descriptor */ public let description: EKProperty.LabelContent public init(image: EKProperty.ImageContent? = nil, title: EKProperty.LabelContent, description: EKProperty.LabelContent) { self.image = image self.title = title self.description = description } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+Animation.swift ================================================ // // EKAttributes+Animation.swift // SwiftEntryKit // // Created by Daniel Huri on 4/21/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit // A protocol that describes an animation protocol EKAnimation { var delay: TimeInterval { get set } var duration: TimeInterval { get set } var spring: EKAttributes.Animation.Spring? { get set } } // A protocol that describes a range animation protocol EKRangeAnimation: EKAnimation { var start: CGFloat { get set } var end: CGFloat { get set } } public extension EKAttributes { /** Describes an animation that can be performed on the entry */ struct Animation: Equatable { /** Describes properties for a spring animation that can be performed on the entry */ public struct Spring: Equatable { /** The dampic of the spring animation */ public var damping: CGFloat /** The initial velocity of the spring animation */ public var initialVelocity: CGFloat /** Initializer */ public init(damping: CGFloat, initialVelocity: CGFloat) { self.damping = damping self.initialVelocity = initialVelocity } } /** Describes an animation with range */ public struct RangeAnimation: EKRangeAnimation, Equatable { /** The duration of the range animation */ public var duration: TimeInterval /** The delay of the range animation */ public var delay: TimeInterval /** The start value of the range animation (e.g. alpha, scale) */ public var start: CGFloat /** The end value of the range animation (e.g. alpha, scale) */ public var end: CGFloat /** The spring of the animation */ public var spring: Spring? /** Initializer */ public init(from start: CGFloat, to end: CGFloat, duration: TimeInterval, delay: TimeInterval = 0, spring: Spring? = nil) { self.start = start self.end = end self.delay = delay self.duration = duration self.spring = spring } } /** Describes translation animation */ public struct Translate: EKAnimation, Equatable { /** Describes the anchor position */ public enum AnchorPosition: Equatable { /** Top position - the entry shows from top or exits towards the top */ case top /** Bottom position - the entry shows from bottom or exits towards the bottom */ case bottom /** Automatic position - the entry shows and exits according to EKAttributes.Position value. If the position of the entry is top, bottom, the entry's translation anchor is top, bottom - respectively.*/ case automatic } /** Animation duration */ public var duration: TimeInterval /** Animation delay */ public var delay: TimeInterval /** To where OR from the entry is animated */ public var anchorPosition: AnchorPosition /** Optional translation spring */ public var spring: Spring? /** Initializer */ public init(duration: TimeInterval, anchorPosition: AnchorPosition = .automatic, delay: TimeInterval = 0, spring: Spring? = nil) { self.anchorPosition = anchorPosition self.duration = duration self.delay = delay self.spring = spring } } /** Translation animation prop */ public var translate: Translate? /** Scale animation prop */ public var scale: RangeAnimation? /** Fade animation prop */ public var fade: RangeAnimation? /** Does the animation contains translation */ public var containsTranslation: Bool { return translate != nil } /** Does the animation contains scale */ public var containsScale: Bool { return scale != nil } /** Does the animation contains fade */ public var containsFade: Bool { return fade != nil } /** Does the animation contains any animation whatsoever */ public var containsAnimation: Bool { return containsTranslation || containsScale || containsFade } /** Returns the maximum delay amongst all animations */ public var maxDelay: TimeInterval { return max(translate?.delay ?? 0, max(scale?.delay ?? 0, fade?.delay ?? 0)) } /** Returns the maximum duration amongst all animations */ public var maxDuration: TimeInterval { return max(translate?.duration ?? 0, max(scale?.duration ?? 0, fade?.duration ?? 0)) } /** Returns the maximum (duration+delay) amongst all animations */ public var totalDuration: TimeInterval { return maxDelay + maxDuration } /** Returns the maximum (duration+delay) amongst all animations */ public static var translation: Animation { return Animation(translate: .init(duration: 0.3)) } /** No animation at all */ public static var none: Animation { return Animation() } /** Initializer */ public init(translate: Translate? = nil, scale: RangeAnimation? = nil, fade: RangeAnimation? = nil) { self.translate = translate self.scale = scale self.fade = fade } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+BackgroundStyle.swift ================================================ // // EKAttributes+BackgroundStyle.swift // SwiftEntryKit // // Created by Daniel Huri on 4/21/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit public extension EKAttributes { /** The background style property */ enum BackgroundStyle: Equatable { /** Blur style for light and dark modes */ public struct BlurStyle: Equatable { public static var extra: BlurStyle { return BlurStyle(light: .extraLight, dark: .dark) } public static var standard: BlurStyle { return BlurStyle(light: .light, dark: .dark) } @available(iOS 10.0, *) public static var prominent: BlurStyle { return BlurStyle(light: .prominent, dark: .prominent) } public static var dark: BlurStyle { return BlurStyle(light: .dark, dark: .dark) } let light: UIBlurEffect.Style let dark: UIBlurEffect.Style public init(style: UIBlurEffect.Style) { self.light = style self.dark = style } public init(light: UIBlurEffect.Style, dark: UIBlurEffect.Style) { self.light = light self.dark = dark } /** Computes a proper `UIBlurEffect.Style` instance */ public func blurStyle(for traits: UITraitCollection, mode: EKAttributes.DisplayMode) -> UIBlurEffect.Style { switch mode { case .inferred: if #available(iOS 13, *) { switch traits.userInterfaceStyle { case .light, .unspecified: return light case .dark: return dark @unknown default: return light } } else { return light } case .light: return light case .dark: return dark } } public func blurEffect(for traits: UITraitCollection, mode: EKAttributes.DisplayMode) -> UIBlurEffect { return UIBlurEffect(style: blurStyle(for: traits, mode: mode)) } } /** Gradient background style */ public struct Gradient { public var colors: [EKColor] public var startPoint: CGPoint public var endPoint: CGPoint public init(colors: [EKColor], startPoint: CGPoint, endPoint: CGPoint) { self.colors = colors self.startPoint = startPoint self.endPoint = endPoint } } /** Visual Effect (Blurred) background style */ case visualEffect(style: BlurStyle) /** Color background style */ case color(color: EKColor) /** Gradient background style */ case gradient(gradient: Gradient) /** Image background style */ case image(image: UIImage) /** Clear background style */ case clear /** == operator overload */ public static func == (lhs: EKAttributes.BackgroundStyle, rhs: EKAttributes.BackgroundStyle) -> Bool { switch (lhs, rhs) { case (visualEffect(style: let leftStyle), visualEffect(style: let rightStyle)): return leftStyle == rightStyle case (color(color: let leftColor), color(color: let rightColor)): return leftColor == rightColor case (image(image: let leftImage), image(image: let rightImage)): return leftImage == rightImage case (gradient(gradient: let leftGradient), gradient(gradient: let rightGradient)): for (leftColor, rightColor) in zip(leftGradient.colors, rightGradient.colors) { guard leftColor == rightColor else { return false } } return leftGradient.startPoint == rightGradient.startPoint && leftGradient.endPoint == rightGradient.endPoint case (clear, clear): return true default: return false } } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+DisplayMode.swift ================================================ // // EKAttributes+DisplayMode.swift // SwiftEntryKit // // Created by Daniel on 26/07/2019. // Copyright © 2019 CocoaPods. All rights reserved. // import Foundation public extension EKAttributes { /** Display mode for the entry */ enum DisplayMode { /** The display mode is inferred from the current user interface style */ case inferred /** The display mode is light */ case light /** The display mode is dark */ case dark } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+Duration.swift ================================================ // // EKAttributes+Duration.swift // SwiftEntryKit // // Created by Daniel Huri on 5/4/18. // import Foundation public extension EKAttributes { typealias DisplayDuration = TimeInterval } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+FrameStyle.swift ================================================ // // EKAttributes+FrameStyle.swift // SwiftEntryKit // // Created by Daniel Huri on 4/28/18. // import Foundation import CoreGraphics import UIKit public extension EKAttributes { /** Corner radius of the entry - Specifies the corners */ enum RoundCorners { /** *None* of the corners will be round */ case none /** *All* of the corners will be round */ case all(radius: CGFloat) /** Only the *top* left and right corners will be round */ case top(radius: CGFloat) /** Only the *bottom* left and right corners will be round */ case bottom(radius: CGFloat) var hasRoundCorners: Bool { switch self { case .none: return false default: return true } } var cornerValues: (value: UIRectCorner, radius: CGFloat)? { switch self { case .all(radius: let radius): return (value: .allCorners, radius: radius) case .top(radius: let radius): return (value: .top, radius: radius) case .bottom(radius: let radius): return (value: .bottom, radius: radius) case .none: return nil } } } /** The border around the entry */ enum Border { /** No border */ case none /** Border wirh color and width */ case value(color: UIColor, width: CGFloat) var hasBorder: Bool { switch self { case .none: return false default: return true } } var borderValues: (color: UIColor, width: CGFloat)? { switch self { case .value(color: let color, width: let width): return(color: color, width: width) case .none: return nil } } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+HapticFeedback.swift ================================================ // // EKAttributes+HapticFeedback.swift // SwiftEntryKit // // Created by Daniel Huri on 5/1/18. // import UIKit public extension EKAttributes { /** Notification haptic feedback type. Adds an additional sensuous layer. Read more at UINotificationFeedbackType. Available from iOS 10, but you are not required to check the iOS version before using it. It's automatically handled by the kit. */ enum NotificationHapticFeedback { case success case warning case error case none @available(iOS 10.0, *) var value: UINotificationFeedbackGenerator.FeedbackType? { switch self { case .success: return .success case .warning: return .warning case .error: return .error case .none: return nil } } var isValid: Bool { return self != .none } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+LifecycleActions.swift ================================================ // // EKAttributes+LifecycleActions.swift // SwiftEntryKit // // Created by Daniel Huri on 6/16/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import Foundation public extension EKAttributes { /** Contains optionally injected events that take place during the entry lifecycle */ struct LifecycleEvents { public typealias Event = () -> Void /** Executed before the entry appears - before the animation starts. Might not get called in case another entry with a higher display priority is displayed. */ public var willAppear: Event? /** Executed after the animation ends. Might not get called in case another entry with a higher display priority is displayed. */ public var didAppear: Event? /** Executed before the entry disappears (Before the animation starts) */ public var willDisappear: Event? /** Executed after the entry disappears (After the animation ends) */ public var didDisappear: Event? public init(willAppear: Event? = nil, didAppear: Event? = nil, willDisappear: Event? = nil, didDisappear: Event? = nil) { self.willAppear = willAppear self.didAppear = didAppear self.willDisappear = willDisappear self.didDisappear = didDisappear } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+PopBehavior.swift ================================================ // // EKAttributes+PopBehavior.swift // SwiftEntryKit // // Created by Daniel Huri on 4/26/18. // import Foundation public extension EKAttributes { /** Describes the entry behavior when a new entry shows (with equal or higher display-priority) */ enum PopBehavior { /** The entry disappears promptly (Does not animates out) when a new one shows */ case overridden /** Animate the entry out - The entry rolls out when a new one shows */ case animated(animation: Animation) public var isOverriden: Bool { switch self { case .overridden: return true case .animated: return false } } var animation: Animation? { switch self { case .animated(animation: let animation): return animation case .overridden: return nil } } func validate() { #if DEBUG guard let animation = animation else { return } guard animation == .none else { return } print(""" SwiftEntryKit warning: cannot associate value `EKAttributes.Animation()` with `EKAttributes.PopBehavior.animated`. This may result in undefined behavior. Please use `PopBehavior.overridden` instead. """) #endif } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+Position.swift ================================================ // // EKAttributes+Position.swift // SwiftEntryKit // // Created by Daniel Huri on 4/21/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import Foundation public extension EKAttributes { /** The position of the entry. */ enum Position { /** The entry appears at the top of the screen. */ case top /** The entry appears at the bottom of the screen. */ case bottom /** The entry appears at the center of the screen. */ case center public var isTop: Bool { return self == .top } public var isCenter: Bool { return self == .center } public var isBottom: Bool { return self == .bottom } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+PositionConstraints.swift ================================================ // // EKAttributes+Frame.swift // SwiftEntryKit // // Created by Daniel Huri on 4/21/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit public extension EKAttributes { /** Describes the frame of the entry. It's limitations, width and offset from the anchor (top / bottom of the screen) */ struct PositionConstraints { /** Describes safe area relation */ public enum SafeArea { /** Entry overrides safe area */ case overridden /** The entry shows outs. But can optionally be colored */ case empty(fillSafeArea: Bool) public var isOverridden: Bool { switch self { case .overridden: return true default: return false } } } /** Describes an edge constraint of the entry */ public enum Edge { /** Ratio constraint to screen edge */ case ratio(value: CGFloat) /** Offset from each edge of the screen */ case offset(value: CGFloat) /** Constant edge length */ case constant(value: CGFloat) /** Unspecified edge length */ case intrinsic /** Edge totally filled */ public static var fill: Edge { return .offset(value: 0) } } /** Describes the size of the entry */ public struct Size { /** Describes a width constraint */ public var width: Edge /** Describes a height constraint */ public var height: Edge /** Initializer */ public init(width: Edge, height: Edge) { self.width = width self.height = height } /** The content's size. Entry's content view must have tight constraints */ public static var intrinsic: Size { return Size(width: .intrinsic, height: .intrinsic) } /** The content's size. Entry's content view must have tight constraints */ public static var sizeToWidth: Size { return Size(width: .offset(value: 0), height: .intrinsic) } /** Screen size, without horizontal or vertical offset */ public static var screen: Size { return Size(width: .fill, height: .fill) } } /** The relation to the keyboard's top and the screen's top while it is opened */ public enum KeyboardRelation { /** Describes the offset when the keyboard is opened */ public struct Offset { /** Describes top keyboard offset to the entry's bottom */ public var bottom: CGFloat /** Describes top screen offset to the entry's top, useful to prevent the entry from exceeding the screen top bounds */ public var screenEdgeResistance: CGFloat? public init(bottom: CGFloat = 0, screenEdgeResistance: CGFloat? = nil) { self.bottom = bottom self.screenEdgeResistance = screenEdgeResistance } /** None offset */ public static var none: Offset { return Offset() } } /** Bind the entry's bottom to the keyboard's top with an offset. Additionally, the top edge of the screen can have a resistance offset which the entry isn't able to cross. The resistance is mostly used when the device orientation changes and the entry's frame crosses the screen bounds. Current isn't supported with center entry position.*/ case bind(offset: Offset) /** Entry is unbound to the keyboard. It's location doesn't change. */ case unbind /** Returns true if the entry is bound to the keyboard */ public var isBound: Bool { switch self { case .bind(offset: _): return true case .unbind: return false } } } /** Rotation related position constraints */ public struct Rotation { /** Attributes of supported interface orientations */ public enum SupportedInterfaceOrientation { /** Uses standard supported interface orientation (target specification in general settings) */ case standard /** Supports all orinetations */ case all } /** Autorotate the entry along with the device orientation */ public var isEnabled = true /** The screen autorotates with accordance to this option */ public var supportedInterfaceOrientations = SupportedInterfaceOrientation.standard public init() {} } /** The rotation attributes of the entry */ public var rotation = Rotation() /** The entry can be bound to keyboard in case of appearance */ public var keyboardRelation = KeyboardRelation.unbind /** The size of the entry */ public var size: Size /** The maximum size of the entry */ public var maxSize: Size /** The vertical offset from the top or bottom anchor */ public var verticalOffset: CGFloat /** Can be used to display the content outside the safe area margins such as on the notch of the iPhone X or the status bar itself. */ public var safeArea = SafeArea.empty(fillSafeArea: false) public var hasVerticalOffset: Bool { return verticalOffset > 0 } /** Returns a floating entry (float-like) */ public static var float: PositionConstraints { return PositionConstraints(verticalOffset: 10, size: .init(width: .offset(value: 20), height: .intrinsic)) } /** A full width entry (toast-like) */ public static var fullWidth: PositionConstraints { return PositionConstraints(verticalOffset: 0, size: .sizeToWidth) } /** A full screen entry - fills the entire screen, modal-like */ public static var fullScreen: PositionConstraints { return PositionConstraints(verticalOffset: 0, size: .screen) } /** Initialize with default parameters */ public init(verticalOffset: CGFloat = 0, size: Size = .sizeToWidth, maxSize: Size = .intrinsic) { self.verticalOffset = verticalOffset self.size = size self.maxSize = maxSize } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+Precedence.swift ================================================ // // EKAttributes+Precedence.swift // SwiftEntryKit // // Created by Daniel Huri on 4/29/18. // import Foundation fileprivate extension Int { var isValidDisplayPriority: Bool { return self >= EKAttributes.Precedence.Priority.minRawValue && self <= EKAttributes.Precedence.Priority.maxRawValue } } public extension EKAttributes { /** Describes the manner on which the entry is pushed and displayed. See the various values of more explanation. */ enum Precedence { /** The display priority of the entry - Determines whether is can be overriden by other entries. Must be in range [0...1000] */ public struct Priority: Hashable, Equatable, RawRepresentable, Comparable { public var rawValue: Int public var hashValue: Int { return rawValue } public init(_ rawValue: Int) { assert(rawValue.isValidDisplayPriority, "Display Priority must be in range [\(Priority.minRawValue)...\(Priority.maxRawValue)]") self.rawValue = rawValue } public init(rawValue: Int) { assert(rawValue.isValidDisplayPriority, "Display Priority must be in range [\(Priority.minRawValue)...\(Priority.maxRawValue)]") self.rawValue = rawValue } public static func == (lhs: Priority, rhs: Priority) -> Bool { return lhs.rawValue == rhs.rawValue } public static func < (lhs: Priority, rhs: Priority) -> Bool { return lhs.rawValue < rhs.rawValue } } /** Describes the queueing heoristic of entries. */ public enum QueueingHeuristic { /** Determines the heuristic which the entry-queue is based on */ public static var value = QueueingHeuristic.priority /** Chronological - FIFO */ case chronological /** Ordered by priority */ case priority /** Returns the caching heuristics mechanism that determines the priority in queue */ var heuristic: EntryCachingHeuristic { switch self { case .chronological: return EKEntryChronologicalQueue() case .priority: return EKEntryPriorityQueue() } } } /** Describes an *overriding* behavior for a new entry. - In case no previous entry is currently presented, display the new entry. - In case there is an entry that is currently presented - override it using the new entry. Also optionally drop all previously enqueued entries. */ case override(priority: Priority, dropEnqueuedEntries: Bool) /** Describes a FIFO behavior for an entry presentation. - In case no previous entry is currently presented, display the new entry. - In case there is an entry that is currently presented - enqueue the new entry, an present it just after the previous one is dismissed. */ case enqueue(priority: Priority) var isEnqueue: Bool { switch self { case .enqueue: return true default: return false } } /** Setter / Getter for the display priority */ public var priority: Priority { set { switch self { case .enqueue(priority: _): self = .enqueue(priority: newValue) case .override(priority: _, dropEnqueuedEntries: let dropEnqueuedEntries): self = .override(priority: newValue, dropEnqueuedEntries: dropEnqueuedEntries) } } get { switch self { case .enqueue(priority: let priority): return priority case .override(priority: let priority, dropEnqueuedEntries: _): return priority } } } } } /** High priority entries can be overriden by other equal or higher priority entries only. Entries are ignored as a higher priority entry is being displayed. High priority entry overrides any other entry including another equal priority one. You can you on of the values (.max, high, normal, low, min) and also set your own values. */ public extension EKAttributes.Precedence.Priority { static let maxRawValue = 1000 static let highRawValue = 750 static let normalRawValue = 500 static let lowRawValue = 250 static let minRawValue = 0 /** Max - the highest possible priority of an entry. Can override only entries with *max* priority */ static let max = EKAttributes.Precedence.Priority(rawValue: maxRawValue) static let high = EKAttributes.Precedence.Priority(rawValue: highRawValue) static let normal = EKAttributes.Precedence.Priority(rawValue: normalRawValue) static let low = EKAttributes.Precedence.Priority(rawValue: lowRawValue) static let min = EKAttributes.Precedence.Priority(rawValue: minRawValue) } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+Presets.swift ================================================ // // EKAttributes+Presets.swift // SwiftEntryKit // // Created by Daniel Huri on 4/23/18. // import Foundation public extension EKAttributes { /** Default attributes - Can be mutated according to the hosting application theme */ static var `default` = EKAttributes() /** Toast preset - The frame fills margins and safe area is filled with background view */ static var toast: EKAttributes { var attributes = EKAttributes() attributes.positionConstraints = .fullWidth attributes.positionConstraints.safeArea = .empty(fillSafeArea: true) attributes.windowLevel = .statusBar attributes.scroll = .edgeCrossingDisabled(swipeable: true) attributes.popBehavior = .animated(animation: .translation) return attributes } /** Float preset - The frame is margined and the safe area is left cleared */ static var float: EKAttributes { var attributes = EKAttributes() attributes.positionConstraints = .float attributes.roundCorners = .all(radius: 10) attributes.positionConstraints.safeArea = .empty(fillSafeArea: false) attributes.windowLevel = .statusBar return attributes } /** Preset for top float entry */ static var topFloat: EKAttributes { var attributes = float attributes.position = .top return attributes } /** Preset for a bottom float entry */ static var bottomFloat: EKAttributes { var attributes = float attributes.position = .bottom return attributes } /** Preset for a center float entry */ static var centerFloat: EKAttributes { var attributes = float attributes.position = .center return attributes } /** Preset for a bottom toast entry */ static var bottomToast: EKAttributes { var attributes = toast attributes.position = .bottom return attributes } /** Preset for a top toast entry */ static var topToast: EKAttributes { var attributes = toast attributes.position = .top return attributes } /** Preset for a top note entry */ static var topNote: EKAttributes { var attributes = topToast attributes.scroll = .disabled attributes.windowLevel = .normal attributes.entryInteraction = .absorbTouches return attributes } /** Preset for a bottom note entry */ static var bottomNote: EKAttributes { var attributes = bottomToast attributes.scroll = .disabled attributes.windowLevel = .normal attributes.entryInteraction = .absorbTouches return attributes } /** Preset for a status bar entry - appears on top of the status bar */ static var statusBar: EKAttributes { var attributes = topToast attributes.windowLevel = .statusBar attributes.entryInteraction = .absorbTouches attributes.positionConstraints.safeArea = .overridden return attributes } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+Scroll.swift ================================================ // // EKAttributes+Scroll.swift // SwiftEntryKit // // Created by Daniel Huri on 4/30/18. // import Foundation import CoreGraphics public extension EKAttributes { /** Describes the event of scroll user interaction */ enum Scroll { /** Describes the event when the user leaves the entry after rubber-banding it - How the entry behaves */ public struct PullbackAnimation { public var duration: TimeInterval public var damping: CGFloat public var initialSpringVelocity: CGFloat public init(duration: TimeInterval, damping: CGFloat, initialSpringVelocity: CGFloat) { self.duration = duration self.damping = damping self.initialSpringVelocity = initialSpringVelocity } /** The entry is jolted when it's pulled back into the original position */ public static var jolt: PullbackAnimation { return PullbackAnimation(duration: 0.5, damping: 0.3, initialSpringVelocity: 10) } /** The view eases out when it's pulled back into the original position */ public static var easeOut: PullbackAnimation { return PullbackAnimation(duration: 0.3, damping: 1, initialSpringVelocity: 10) } } /** The scroll ability is totally disabled */ case disabled /** The scroll in the opposite direction to the edge is disabled */ case edgeCrossingDisabled(swipeable: Bool) /** The scroll abiliby is enabled */ case enabled(swipeable: Bool, pullbackAnimation: PullbackAnimation) var isEnabled: Bool { switch self { case .disabled: return false default: return true } } var isSwipeable: Bool { switch self { case .edgeCrossingDisabled(swipeable: let swipeable), .enabled(swipeable: let swipeable, pullbackAnimation: _): return swipeable default: return false } } var isEdgeCrossingEnabled: Bool { switch self { case .edgeCrossingDisabled: return false default: return true } } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+Shadow.swift ================================================ // // EKAttributes+Shadow.swift // SwiftEntryKit // // Created by Daniel Huri on 4/21/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import Foundation import UIKit public extension EKAttributes { /** The shadow around the entry */ enum Shadow { /** No shadow */ case none /** Shadow with value */ case active(with: Value) /** The shadow properties */ public struct Value { public let radius: CGFloat public let opacity: Float public let color: EKColor public let offset: CGSize public init(color: EKColor = .black, opacity: Float, radius: CGFloat, offset: CGSize = .zero) { self.color = color self.radius = radius self.offset = offset self.opacity = opacity } } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+StatusBar.swift ================================================ // // EKAttributes+StatusBar.swift // SwiftEntryKit // // Created by Daniel Huri on 5/25/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit public extension EKAttributes { /** Status bar appearance */ enum StatusBar { /** The appearance of the status bar */ public typealias Appearance = (visible: Bool, style: UIStatusBarStyle) /** Ignored. Status bar is ignored by entries with this apperance value*/ case ignored /** Hidden. Doesn't apply to iPhone X */ case hidden /** Visible with explicit dark style */ case dark /** Visible with explicit light style */ case light /** Keep previous state of status bar. In case there is an already displayed entry, keep its status bar appearance. In case the app is already displaying a status bar, keep its appearance */ case inferred /** Returns the status bar appearance. Note: See *Appearance* */ public var appearance: Appearance { switch self { case .dark: if #available(iOS 13, *) { return (true, .darkContent) } else { return (true, .default) } case .light: return (true, .lightContent) case .inferred: return StatusBar.currentAppearance case .hidden: return (false, StatusBar.currentStyle) case .ignored: fatalError("There is no defined appearance for an ignored status bar") } } /** Returns the status bar according to a given appearance */ public static func statusBar(by appearance: Appearance) -> StatusBar { guard appearance.visible else { return .hidden } switch appearance.style { case .lightContent: return .light default: return .dark } } /** Returns the current appearance */ public static var currentAppearance: Appearance { return (StatusBar.isCurrentVisible, StatusBar.currentStyle) } /** Returns the current status bar */ public static var currentStatusBar: StatusBar { return statusBar(by: currentAppearance) } // Accessors // TODO: Use `statusBarManager` of the window scene on iOS 13 private static var currentStyle: UIStatusBarStyle { return UIApplication.shared.statusBarStyle } // TODO: Use `statusBarManager` of the window scene on iOS 13 private static var isCurrentVisible: Bool { return !UIApplication.shared.isStatusBarHidden } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+UserInteraction.swift ================================================ // // EKAttributes+UserInteraction.swift // SwiftEntryKit // // Created by Daniel Huri on 4/21/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import Foundation public extension EKAttributes { /** Describes the user interaction events that are triggered as the user taps the entry / screen */ struct UserInteraction { /** Code that is executed when the user taps the entry / screen */ public typealias Action = () -> () /** The default event that happens as the user interacts */ public enum Default { /** Absorbs touches. The entry / screen does nothing (Swallows the touch) */ case absorbTouches /** Touches delay the exit of the entry */ case delayExit(by: TimeInterval) /** Taps dismiss the entry immediately */ case dismissEntry /** Touches are forwarded to the lower window (In most cases it would be the application main window that will handle it */ case forward } var isResponsive: Bool { switch defaultAction { case .forward: return false default: return true } } var isDelayExit: Bool { switch defaultAction { case .delayExit: return true default: return false } } /** A default action that is executed when the entry or the screen are interacted by the user */ public var defaultAction: Default /** Additional actions that can be customized by the user */ public var customTapActions: [Action] public init(defaultAction: Default = .absorbTouches, customTapActions: [Action] = []) { self.defaultAction = defaultAction self.customTapActions = customTapActions } /** Dismiss action */ public static var dismiss: UserInteraction { return UserInteraction(defaultAction: .dismissEntry) } /** Forward action */ public static var forward: UserInteraction { return UserInteraction(defaultAction: .forward) } /** Absorb touches action */ public static var absorbTouches: UserInteraction { return UserInteraction(defaultAction: .absorbTouches) } /** Delay exit action */ public static func delayExit(by delay: TimeInterval) -> UserInteraction { return UserInteraction(defaultAction: .delayExit(by: delay)) } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+Validations.swift ================================================ // // EKAttributes+Validations.swift // SwiftEntryKit // // Created by Daniel Huri on 5/18/18. // import Foundation extension EKAttributes { private static var minDisplayDuration: DisplayDuration { return 0 } var validateDisplayDuration: Bool { guard displayDuration >= EKAttributes.minDisplayDuration else { return false } return true } var validateWindowLevel: Bool { return windowLevel.value >= .normal } var isValid: Bool { return validateDisplayDuration && validateWindowLevel } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes+WindowLevel.swift ================================================ // // EKAttributes+WindowLevel.swift // SwiftEntryKit // // Created by Daniel Huri on 4/21/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit public extension EKAttributes { /** Describes the window level in which the entry would be displayed */ enum WindowLevel { /** Above the alerts */ case alerts /** Above the status bar */ case statusBar /** Above the application window */ case normal /** Custom level */ case custom(level: UIWindow.Level) /** Returns the raw value - the window level itself */ public var value: UIWindow.Level { switch self { case .alerts: return .alert case .statusBar: return .statusBar case .normal: return .normal case .custom(level: let level): return level } } } } ================================================ FILE: Source/Model/EntryAttributes/EKAttributes.swift ================================================ // // EKAttributes.swift // SwiftEntryKit // // Created by Daniel Huri on 4/19/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import Foundation import UIKit public struct EKAttributes { // MARK: Identification /** A settable **optional** name that matches the entry-attributes. - Nameless entries cannot be inquired using *SwiftEntryKit.isCurrentlyDisplaying(entryNamed: _) -> Bool* */ public var name: String? // MARK: Display Attributes /** Entry presentation window level */ public var windowLevel = WindowLevel.statusBar /** The position of the entry inside the screen */ public var position = Position.top /** The display manner of the entry. */ public var precedence = Precedence.override(priority: .normal, dropEnqueuedEntries: false) /** Describes how long the entry is displayed before it is dismissed */ public var displayDuration: DisplayDuration = 2 // Use .infinity for infinite duration /** The frame attributes of the entry */ public var positionConstraints = PositionConstraints() // MARK: User Interaction Attributes /** Describes what happens when the user interacts the screen, forwards the touch to the application window by default */ public var screenInteraction = UserInteraction.forward /** Describes what happens when the user interacts the entry, dismisses the content by default */ public var entryInteraction = UserInteraction.dismiss /** Describes the scrolling behaviour of the entry. The entry can be swiped out and in with an ability to spring back with a jolt */ public var scroll = Scroll.enabled(swipeable: true, pullbackAnimation: .jolt) /** Generate haptic feedback once the entry is displayed */ public var hapticFeedbackType = NotificationHapticFeedback.none /** Describes the actions that take place when the entry appears or is being dismissed */ public var lifecycleEvents = LifecycleEvents() // MARK: Theme & Style Attributes /** The display mode of the entry */ public var displayMode = DisplayMode.inferred /** Describes the entry's background appearance while it shows */ public var entryBackground = BackgroundStyle.clear /** Describes the background appearance while the entry shows */ public var screenBackground = BackgroundStyle.clear /** The shadow around the entry */ public var shadow = Shadow.none /** The corner attributes */ public var roundCorners = RoundCorners.none /** The border around the entry */ public var border = Border.none /** Preferred status bar style while the entry shows */ public var statusBar = StatusBar.inferred // MARK: Animation Attributes /** Describes how the entry animates in */ public var entranceAnimation = Animation.translation /** Describes how the entry animates out */ public var exitAnimation = Animation.translation /** Describes the previous entry behaviour when a new entry with higher display-priority shows */ public var popBehavior = PopBehavior.animated(animation: .translation) { didSet { popBehavior.validate() } } /** Init with default attributes */ public init() {} } ================================================ FILE: Source/SwiftEntryKit.swift ================================================ // // SwiftEntryKit.swift // SwiftEntryKit // // Created by Daniel Huri on 4/29/18. // import UIKit /** A stateless, threadsafe (unless described otherwise) entry point that contains the display and the dismissal logic of entries. */ public final class SwiftEntryKit { /** Describes the a single or multiple entries for possible dismissal states */ public enum EntryDismissalDescriptor { /** Describes specific entry / entries with name */ case specific(entryName: String) /** Describes a group of entries with lower or equal display priority */ case prioritizedLowerOrEqualTo(priority: EKAttributes.Precedence.Priority) /** Describes all the entries that are currently in the queue and pending presentation */ case enqueued /** Describes all the entries */ case all /** Describes the currently displayed entry */ case displayed } /** The window to rollback to after dismissal */ public enum RollbackWindow { /** The main window */ case main /** A given custom window */ case custom(window: UIWindow) } /** Completion handler for the dismissal method */ public typealias DismissCompletionHandler = () -> Void /** Cannot be instantiated, customized, inherited. */ private init() {} /** Returns the window that displays the entry. **Warning**: the returned `UIWindow` instance is `nil` in case no entry is currently displayed. This can be used */ public class var window: UIWindow? { return EKWindowProvider.shared.entryWindow } /** Returns true if **any** entry is currently displayed. - Not thread safe - should be called from the main queue only in order to receive a reliable result. - Convenience computed variable. Using it is the same as invoking **isCurrentlyDisplaying() -> Bool** (witohut the name of the entry). */ public class var isCurrentlyDisplaying: Bool { return isCurrentlyDisplaying() } /** Returns true if an entry with a given name is currently displayed. - Not thread safe - should be called from the main queue only in order to receive a reliable result. - If invoked with *name* = *nil* or without the parameter value, it will return *true* if **any** entry is currently displayed. - Returns a *false* value for currently enqueued entries. - parameter name: The name of the entry. Its default value is *nil*. */ public class func isCurrentlyDisplaying(entryNamed name: String? = nil) -> Bool { return EKWindowProvider.shared.isCurrentlyDisplaying(entryNamed: name) } /** Returns true if **any** entry is currently enqueued and waiting to be displayed. - Not thread safe - should be called from the main queue only in order to receive a reliable result. - Convenience computed variable. Using it is the same as invoking **~queueContains() -> Bool** (witohut the name of the entry) */ public class var isQueueEmpty: Bool { return !queueContains() } /** Returns true if an entry with a given name is currently enqueued and waiting to be displayed. - Not thread safe - should be called from the main queue only in order to receive a reliable result. - If invoked with *name* = *nil* or without the parameter value, it will return *true* if **any** entry is currently displayed, meaning, the queue is not currently empty. - parameter name: The name of the entry. Its default value is *nil*. */ public class func queueContains(entryNamed name: String? = nil) -> Bool { return EKWindowProvider.shared.queueContains(entryNamed: name) } /** Displays a given entry view using an attributes struct. - A thread-safe method - Can be invokes from any thread - A class method - Should be called on the class - parameter view: Custom view that is to be displayed - parameter attributes: Display properties - parameter presentInsideKeyWindow: Indicates whether the entry window should become the key window. - parameter rollbackWindow: After the entry has been dismissed, SwiftEntryKit rolls back to the given window. By default it is *.main* which is the app main window */ public class func display(entry view: UIView, using attributes: EKAttributes, presentInsideKeyWindow: Bool = false, rollbackWindow: RollbackWindow = .main) { DispatchQueue.main.async { EKWindowProvider.shared.display(view: view, using: attributes, presentInsideKeyWindow: presentInsideKeyWindow, rollbackWindow: rollbackWindow) } } /** Displays a given entry view controller using an attributes struct. - A thread-safe method - Can be invokes from any thread - A class method - Should be called on the class - parameter view: Custom view that is to be displayed - parameter attributes: Display properties - parameter presentInsideKeyWindow: Indicates whether the entry window should become the key window. - parameter rollbackWindow: After the entry has been dismissed, SwiftEntryKit rolls back to the given window. By default it is *.main* - which is the app main window */ public class func display(entry viewController: UIViewController, using attributes: EKAttributes, presentInsideKeyWindow: Bool = false, rollbackWindow: RollbackWindow = .main) { DispatchQueue.main.async { EKWindowProvider.shared.display(viewController: viewController, using: attributes, presentInsideKeyWindow: presentInsideKeyWindow, rollbackWindow: rollbackWindow) } } /** ALPHA FEATURE: Transform the previous entry to the current one using the previous attributes struct. - A thread-safe method - Can be invoked from any thread. - A class method - Should be called on the class. - This feature hasn't been fully tested. Use with caution. - parameter view: Custom view that is to be displayed instead of the currently displayed entry */ public class func transform(to view: UIView) { DispatchQueue.main.async { EKWindowProvider.shared.transform(to: view) } } /** Dismisses the currently presented entry and removes the presented window instance after the exit animation is concluded. - A thread-safe method - Can be invoked from any thread. - A class method - Should be called on the class. - parameter descriptor: A descriptor for the entries that are to be dismissed. The default value is *.displayed*. - parameter completion: A completion handler that is to be called right after the entry is dismissed (After the animation is concluded). */ public class func dismiss(_ descriptor: EntryDismissalDescriptor = .displayed, with completion: DismissCompletionHandler? = nil) { DispatchQueue.main.async { EKWindowProvider.shared.dismiss(descriptor, with: completion) } } /** Layout the view hierarchy that is rooted in the window. - In case you use complex animations, you can call it to refresh the AutoLayout mechanism on the entire view hierarchy. - A thread-safe method - Can be invoked from any thread. - A class method - Should be called on the class. */ public class func layoutIfNeeded() { if Thread.isMainThread { EKWindowProvider.shared.layoutIfNeeded() } else { DispatchQueue.main.async { EKWindowProvider.shared.layoutIfNeeded() } } } } ================================================ FILE: Source/Utils/GradientView.swift ================================================ // // GradientView.swift // SwiftEntryKit // // Created by Daniel Huri on 4/20/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit class GradientView: UIView { struct Style { let gradient: EKAttributes.BackgroundStyle.Gradient let displayMode: EKAttributes.DisplayMode init?(gradient: EKAttributes.BackgroundStyle.Gradient?, displayMode: EKAttributes.DisplayMode) { guard let gradient = gradient else { return nil } self.gradient = gradient self.displayMode = displayMode } } private let gradientLayer = CAGradientLayer() var style: Style? { didSet { setupColor() } } init() { super.init(frame: .zero) layer.addSublayer(gradientLayer) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func layoutSubviews() { super.layoutSubviews() gradientLayer.frame = bounds } private func setupColor() { guard let style = style else { return } gradientLayer.colors = style.gradient.colors.map { $0.color(for: traitCollection, mode: style.displayMode).cgColor } gradientLayer.startPoint = style.gradient.startPoint gradientLayer.endPoint = style.gradient.endPoint } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { setupColor() } } ================================================ FILE: Source/Utils/HapticFeedbackGenerator.swift ================================================ // // HapticFeedbackGenerator.swift // SwiftEntryKit // // Created by Daniel Huri on 4/20/18. // Copyright (c) 2018 huri000@gmail.com. All rights reserved. // import UIKit struct HapticFeedbackGenerator { @available(iOS 10.0, *) static func notification(type: EKAttributes.NotificationHapticFeedback) { guard let value = type.value else { return } let generator = UINotificationFeedbackGenerator() generator.notificationOccurred(value) } } ================================================ FILE: Source/Utils/UIView+Responder.swift ================================================ // // UIView+Responder.swift // SwiftEntryKit // // Created by Daniel Huri on 5/17/18. // import UIKit extension UIView { var containsFirstResponder: Bool { var contains = false for subview in subviews.reversed() where !contains { if subview.isFirstResponder { contains = true } else { contains = subview.containsFirstResponder } } return contains } } ================================================ FILE: SwiftEntryKit.podspec ================================================ # # Be sure to run `pod lib lint SwiftEntryKit.podspec' to ensure this is a # valid spec before submitting. # # Any lines starting with a # are optional, but their use is encouraged # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html # Pod::Spec.new do |s| s.name = 'SwiftEntryKit' s.version = '2.0.0' s.summary = 'A simple banner and pop-up displayer for iOS. Written in Swift.' s.platform = :ios s.ios.deployment_target = '9.0' s.swift_version = '5.0' s.requires_arc = true s.description = <<-DESC SwiftEntryKit is a banner presenter library for iOS. It can be used to easily display pop-ups and notification-like views within your iOS apps. SwiftEntryKit is highly customizable but also offers a bunch of beautiful presets that can be themed with your app fonts and colors. DESC s.homepage = 'https://github.com/huri000/SwiftEntryKit' s.license = { :type => 'MIT', :file => 'LICENSE' } s.author = { 'Daniel Huri' => 'huri000@gmail.com' } s.source = { :git => 'https://github.com/huri000/SwiftEntryKit.git', :tag => s.version.to_s } s.source_files = 'Source/**/*' s.frameworks = 'UIKit' end