[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6774":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":39,"readmeContent":40,"aiSummary":41,"trendingCount":16,"starSnapshotCount":16,"syncStatus":42,"lastSyncTime":43,"discoverSource":44},6774,"SwiftEntryKit","huri000\u002FSwiftEntryKit","huri000","SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.","",null,"Swift",6762,623,69,66,0,6,39.39,"MIT License",false,"master",true,[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"actionsheet","alert","alertviewcontroller","banner","dark-modes","entry","messages","modalview","notification","popup","swift","swift4","swiftentrykit","uialertcontroller","uiwindow","2026-06-12 02:01:29","# SwiftEntryKit \u003Cimg align=\"left\" height=42 src=\"https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Fproject-icon.png\">\n\n[![Platform](http:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-iOS-blue.svg?style=flat)](https:\u002F\u002Fdeveloper.apple.com\u002Fiphone\u002Findex.action)\n[![Language](http:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flanguage-Swift-brightgreen.svg?style=flat)](https:\u002F\u002Fdeveloper.apple.com\u002Fswift)\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fv\u002FSwiftEntryKit.svg?style=flat-square)](http:\u002F\u002Fcocoapods.org\u002Fpods\u002FSwiftEntryKit)\n[![Carthage compatible](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCarthage-compatible-4BC51D.svg?style=flat)](https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage)\n[![Accio: Supported](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAccio-supported-0A7CF5.svg?style=flat)](https:\u002F\u002Fgithub.com\u002FJamitLabs\u002FAccio)\n[![License](http:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-lightgrey.svg?style=flat)](http:\u002F\u002Fmit-license.org)\n![](https:\u002F\u002Ftravis-ci.com\u002Fhuri000\u002FSwiftEntryKit.svg?branch=master)\n\n 🤗 Donations can be made [here](#donations).\n\n## Table of Contents\n\n* [Overview](#overview)\n  * [Features](#features)\n* [Example Project](#example-project)\n  * [Example Project Installation](#example-project-installation)\n  * [Presets](#presets)\n  * [Playground](#playground)\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Usage](#usage)\n  * [Quick Usage](#quick-usage)\n  * [Entry Attributes](#entry-attributes)\n    * [Entry Name](#entry-name)\n    * [Window Level](#window-level)\n    * [Display Position](#display-position)\n    * [Precedence](#precedence)\n      * [Override](#override)\n      * [Enqueue](#enqueue)\n        * [Heuristics](#heuristics)\n      * [Display Priority](#display-priority)\n    * [Display Duration](#display-duration)\n    * [Position Constraints](#position-constraints)\n    * [User Interaction](#user-interaction)\n    * [Scroll Behavior](#scroll-behavior)\n    * [Haptic Feedback](#haptic-feedback)\n    * [Lifecycle Events](#lifecycle-events)\n    * [Display Mode](#display-mode)\n    * [Background Style](#background-style)\n    * [Shadow](#shadow)\n    * [Round Corners](#round-corners)\n    * [Border](#border)\n    * [Animations](#animations)\n    * [Pop Behavior](#pop-behavior)\n    * [Status Bar](#status-bar)\n  * [Presets Usage Example](#presets-usage-example)\n  * [Custom View Usage Example](#custom-view-usage-example)\n  * [Displaying a View Controller](#displaying-a-view-controller)\n  * [Alternative Rollback Window](#alternative-rollback-window)\n  * [Dismissing an Entry](#dismissing-an-entry)\n  * [Swiping and Rubber Banding](#swiping-and-rubber-banding)\n  * [Dealing With Safe Area](#dealing-with-safe-area)\n  * [Dealing With Orientation Change](#dealing-with-orientation-change)\n  * [Swift and Objective-C Interoperability](#swift-and-objective-c-interoperability)\n* [Author](#author)\n* [Donations](#donations)\n* [License](#license)\n\n## Overview\n\nSwiftEntryKit is a simple yet versatile content presenter written in Swift.\n\n### Features\n\nBanners or pop-ups are called *Entries*.\n\n- 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.\n- The kit offers beautiful [presets](#presets) that can be themed with your own colors and fonts.\n- **Customization**: Entries are highly customizable\n  - [x] Can be [positioned](#display-position) either at the top, center, or the bottom of the screen.\n  - [x] Can be displayed within or outside the screen safe area.\n  - [x] Can be stylized: have a [border](#border), [drop-shadow](#shadow) and [round corners](#round-corners).\n  - [x] Their content and the surrounding background can be blurred, dimmed, colored or have a gradient [style](#background-style).\n  - [x] Transition [animations](#animations) are customizable - entrance, exit and pop (by another entry).\n  - [x] The [user interaction](#user-interaction) with the entry or the screen can be intercepted.\n  - [x] Entries can be enqueued or override previous entries using the [precedence](#precedence) attribute.\n  - [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. \n  - [x] Presets support accessibility.\n  - [x] Entries have an optional rubber banding effect while panning.\n  - [x] Entries can be optionally dismissed using a simple [swipe gesture](#swiping-and-rubber-banding).\n  - [x] Entries can be optionally injected with [lifecycle events](#lifecycle-events): *will* and *did* appear\u002Fdisappear.\n  - [x] The [status bar style](#status-bar) is settable for the display duration of the entry.\n  - [x] Supports [navigation controllers](#presets) & [custom views](#custom-view-usage-example) as well!\n\n## Example Project\n\nThe example project contains various presets and examples you can use and modify as your like.\n\n### Example Project Installation \n\nYou can either use the terminal or git client such as Source Tree.\n\n#### Terminal Users\n\n```bash\n$ git clone https:\u002F\u002Fgithub.com\u002Fhuri000\u002FSwiftEntryKit.git\n```\n\n#### Git Client (Source Tree)\nClone https:\u002F\u002Fgithub.com\u002Fhuri000\u002FSwiftEntryKit.git \n\n### Presets\n\n| Toasts | Notes | Floats | Popups |\n| --- | --- | --- | --- |\n| ![toasts_example](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Ftoasts.gif) | ![notes_example](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Fnotes.gif) | ![floats_example](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Ffloats.gif) | ![popup_example](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Fpopups.gif) |\n\n| Alerts | Forms | Rating | More... |\n| --- | --- | --- | --- |\n| ![alert_example](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Falerts.gif) | ![form_example](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Fforms.gif) | ![rating_example](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Frating.gif) | ![custom_example](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Fcustom.gif) |\n\n### Playground\n\n**noun: a place where people can play 🏈**\n\nThe example app contains a playground screen, an interface that allows you to customize your preferable entries.\nThe playground screen has some limitations (allows to select constant values) but you can easily modify the code to suit your needs. Check it out!\n\nThe Playground Screen | Top Toast Sample\n--- | ---\n![playground_example](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Fplayground.gif) | ![playground-sample-1](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Fplayground-sample-1.jpeg)\n\n## Requirements\n\n- iOS 9 or any higher version.\n- Xcode 9 or any higher version.\n- Swift 4.0 or any higher version.\n- The library has not been tested with iOS 8.x.y or a lower version.\n\n## Installation\n\n- SwiftEntryKit is compatible with Swift 5 as of release *1.0.0*. \n- SwiftEntryKit is compatible with Swift 4.2 as of release *0.8.1*. \n- Developers who use lower Swift version should install release *0.7.2*.\n\n### CocoaPods\n\n[CocoaPods](http:\u002F\u002Fcocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```bash\n$ gem install cocoapods\n```\n\nTo integrate SwiftEntryKit into your Xcode project using CocoaPods, specify it in your `Podfile`:\n\n```ruby\nsource 'https:\u002F\u002Fgithub.com\u002Fcocoapods\u002Fspecs.git'\nplatform :ios, '9.0'\nuse_frameworks!\n\npod 'SwiftEntryKit', '2.0.0'\n```\n\nThen, run the following command:\n\n```bash\n$ pod install\n```\n\n### Carthage\n\n[Carthage](https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http:\u002F\u002Fbrew.sh\u002F) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate SwiftEntryKit into your Xcode project using Carthage, specify the following in your `Cartfile`:\n\n```ogdl\ngithub \"huri000\u002FSwiftEntryKit\" == 2.0.0\n```\n\n### Accio\n\n[Accio](https:\u002F\u002Fgithub.com\u002FJamitLabs\u002FAccio) is a decentralized dependency manager driven by SwiftPM that works for iOS\u002FtvOS\u002FwatchOS\u002FmacOS projects.\n\nYou can install Accio with [Homebrew](http:\u002F\u002Fbrew.sh\u002F) using the following command:\n\n```bash\n$ brew tap JamitLabs\u002FAccio https:\u002F\u002Fgithub.com\u002FJamitLabs\u002FAccio.git\n$ brew install accio\n```\n\nTo integrate SwiftEntryKit into your Xcode project using Accio, specify the following in your `Package.swift` manifest:\n\n```swift\n.package(url: \"https:\u002F\u002Fgithub.com\u002Fhuri000\u002FSwiftEntryKit\", .exact(\"2.0.0\"))\n```\n\nAfter specifying `\"SwiftEntryKit\"` as a dependency of the target in which you want to use it, run `accio install`.\n\n## Usage\n\n### Quick Usage\n\nNo setup is needed! Each time you wish to display an entry, just create your view and initialize an EKAttributes struct.\nSee also the [preset usage example](#presets-usage-example), and the example project.\nlikewise:\n```Swift\n\u002F\u002F Customized view\nlet customView = SomeCustomView()\n\u002F*\nDo some customization on customView\n*\u002F\n\n\u002F\u002F Attributes struct that describes the display, style, user interaction and animations of customView.\nvar attributes = EKAttributes()\n\u002F*\nAdjust preferable attributes\n*\u002F\n```\nAnd then, just call:\n```Swift\nSwiftEntryKit.display(entry: customView, using: attributes)\n```\nThe kit will replace the application main window with the EKWindow instance and display the entry.\n\n### Entry Attributes\n\n*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 \u002F out) and more.\n\nCreate a mutable EKAttributes structure likewise:\n```Swift\nvar attributes = EKAttributes()\n```\n\nBelow are the properties that can be modified in the *EKAttributes*:\n\n#### Entry Name\nEntries can have names.\nWhen an EKAttributes struct is instantiated, it is nameless, meaning, the `name` property is `nil`. \nIt is recommended to set a meaningful name for an entry.\n\n```Swift \nattributes.name = \"Top Note\"\n```\n\nEntries with names can be specifically referred to later, for example, you can inquire whether a **specific** entry is currently displayed:\n```Swift\nif SwiftEntryKit.isCurrentlyDisplaying(entryNamed: \"Top Note\") {\n    \u002F* Do your things *\u002F\n}\n```\n\n#### Window Level\nEntries can be displayed above the application main window, above the status bar, above the alerts window or even have a custom level (UIWindowLevel).\n\nFor example, set the window level to *normal*, likewise:\n```Swift \nattributes.windowLevel = .normal\n```\nThis causes the entry to appear above the application key window and below the status bar.\n\nThe default value of `windowLevel` is `.statusBar`.\n\n#### Display Position\nThe entry can be displayed either at the *top*, *center*, or the *bottom* of the screen.\n\nFor example, set the display position to *bottom*, likewise:\n```Swift \nattributes.position = .bottom\n```\n\nThe default value of `position` is `.top`.\n\n#### Precedence\nThe 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.\n\n##### Override\nIf the [display priority](#display-priority) is equal or higher than the currently displayed entry, override it.\n\nExample 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).\n\n```Swift \nattributes.precedence = .override(priority: .max, dropEnqueuedEntries: false)\n```\n\nYou can optionally flush the entries that are inside the queue.\n\nIn case  `dropEnqueuedEntries` is `false`, enqueued entries remain in the queue. The first enqueued entry will show right after the new entry pops out. \nIn case  `dropEnqueuedEntries` is `true`, the entry-queue is flushed as the new entry is being displayed.\n\n##### Enqueue\nIf the queue is empty, display the entry immediately, otherwise, insert the entry into the queue until its turn to show arrives.\n\nExample for setting `.enqueue` precedence with `.normal` display priority: \n\n```Swift \nattributes.precedence = .enqueue(priority: .normal)\n```\n\n###### Heuristics\n\nThere are 2 possible heuristics for entries prioritization in the queue:\n\n- Display Priority Queue: The entries are sorted by their [display priority](#display-priority), then by chronological order.\n- Chronological Queue: The entries are sorted only by their chronological order (standard queue).\n\nSelect the heuristic that suits you best by doing the following, only once, before using `SwiftEntryKit` to display entries.\n\n```Swift \nEKAttributes.Precedence.QueueingHeuristic.value = .priority\n```\n\nOr:\n\n```Swift \nEKAttributes.Precedence.QueueingHeuristic.value = .chronological\n```\n\nThe default value of `EKAttributes.Precedence.QueueingHeuristic.value` is `.priority`.\n\nThe default value of precedence is `.override(priority: .normal, dropEnqueuedEntries: false)`.\n\n##### Display Priority \nThe display priority of the entry determines whether it dismisses other entries or is dismissed by them. \nAn entry can be dismissed only by an entry with an equal or a higher display priority.\n\n```Swift\nlet highPriorityAttributes = EKAttributes()\nhighPriorityAttributes.precedence.priority = .high\n\nlet normalPriorityAttributes = EKAttributes()\nnormalPriorityAttributes.precedence.priority = .normal\n\n\u002F\u002F Display high priority entry\nSwiftEntryKit.display(entry: view1, using: highPriorityAttributes)\n\n\u002F\u002F Display normal priority entry (ignored!)\nSwiftEntryKit.display(entry: view2, using: normalPriorityAttributes)\n```\n\n*view2* won't be displayed!\n\n#### Display Duration\nThe display duration of the entry (Counted from the moment the entry has finished its entrance animation and until the exit animation begins).\n\nDisplay for 4 seconds:\n```Swift\nattributes.displayDuration = 4\n```\n\nDisplay for an infinite duration\n```Swift\nattributes.displayDuration = .infinity\n```\n\nThe default value of `displayDuration` is `2`.\n\n#### Position Constraints \nConstraints that tie the entry tightly to the screen context, for example: Height, Width, Max Width, Max Height, Additional Vertical Offset & Safe Area related info.\n\n- Entries that support Auto Layout - Their height is inferred from the constraints that applied to them.\n- Entries that don't support Auto Layout - Their exact size must be explicitly set using `positionConstraints`'s `size` property.\n\nFor example:\n\nRatio edge - signifies that the ratio of the width edge has a ratio of 0.9 of the screen's width.\n```Swift\nlet widthConstraint = EKAttributes.PositionConstraints.Edge.ratio(value: 0.9)\n```\n\nIntrinsic edge - signifies that the wanted height value is the content height - Decided by the entries vertical constraints\n```Swift\nlet heightConstraint = EKAttributes.PositionConstraints.Edge.intrinsic\n```\n\nCreate the entry size constraints likewise:\n```Swift\nattributes.positionConstraints.size = .init(width: widthConstraint, height: heightConstraint)\n```\nYou 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).\n\nSafe Area - can be used to override the safe area or to color it (More examples are in the example project)\nThat snippet implies that the safe area insets should be kept and not be a part of the entry.\n```Swift\nattributes.positionConstraints.safeArea = .empty(fillSafeArea: false)\n```\n\nVertical Offset - an additional offset that can be applied to the entry (Other than the safe area).\n```Swift\nattributes.positionConstraints.verticalOffset = 10\n```\n\nAutorotation - whether the entry autorotates along with the orientation of the device. Defaults to `true`.\n```Swift\nattributes.positionConstraints.rotation.isEnabled = false\n```\n\nKeyboard Releation - used to bind an entry to the keyboard once the keyboard is displayed.\n\n```Swift\nlet offset = EKAttributes.PositionConstraints.KeyboardRelation.Offset(bottom: 10, screenEdgeResistance: 20)\nlet keyboardRelation = EKAttributes.PositionConstraints.KeyboardRelation.bind(offset: offset)\nattributes.positionConstraints.keyboardRelation = keyboardRelation\n```\nIn the example above the entry's bottom is tuned to have a 10pts offset from the top of the keyboard (while it shows)\nBecause 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.\nThe extreme situation might occur as the device orientation is landscape and the keyboard shows up (See example project form presets for more information).\n\n#### User Interaction\nThe entry and the screen can be interacted by the user. User interaction be can intercepted in various ways:\n\nAn interaction (Any touch whatsoever) with the entry delays its exit by 3s:\n```Swift\nattributes.entryInteraction = .delayExit(by: 3)\n```\n\nA tap on the entry \u002F screen dismisses it immediately:\n```Swift\nattributes.entryInteraction = .dismiss\nattributes.screenInteraction = .dismiss\n```\n\nA tap on the entry is swallowed (ignored):\n```Swift\nattributes.entryInteraction = .absorbTouches\n```\n\nA tap on the screen is forwarded to the lower level window, in most cases the receiver will be the application window.\nThis is very useful when you want to display an unintrusive content like banners and push notification entries.\n```Swift\nattributes.screenInteraction = .forward\n```\n\nPass additional actions that are invoked when the user taps the entry:\n```Swift\nlet action = {\n    \u002F\u002F Do something useful\n}\nattributes.entryInteraction.customTapActions.append(action)\n```\n\nThe default value of `screenInteraction` is `.forward`.\n\nThe default value of `entryInteraction` is `.dismiss`.\n\n#### Scroll Behavior\nDescribes 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.\n\nDisable the pan and swipe gestures on the entry:\n```Swift\nattributes.scroll = .disabled\n```\n\nEnable swipe and stretch and pullback with jolt effect:\n```Swift\nattributes.scroll = .enabled(swipeable: true, pullbackAnimation: .jolt)\n```\n\nEnable swipe and stretch and pullback with an ease-out effect:\n```Swift\nattributes.scroll = .enabled(swipeable: true, pullbackAnimation: .easeOut)\n```\n\nEnable swipe but disable stretch:\n```Swift\nattributes.scroll = .edgeCrossingDisabled(swipeable: true)\n```\n\nThe default value of `scroll` is `.enabled(swipeable: true, pullbackAnimation: .jolt)`.\n\n#### [Haptic Feedback](https:\u002F\u002Fdeveloper.apple.com\u002Fios\u002Fhuman-interface-guidelines\u002Fuser-interaction\u002Ffeedback\u002F)\nThe device can produce a haptic feedback, thus adding an additional sensory depth to each entry.\n\nThe default value of `hapticFeedbackType` is `.none`.\n\n#### Lifecycle Events\nEvents can be injected to the entry so that they are to be called during its lifecycle.\n\n```Swift\nattributes.lifecycleEvents.willAppear = {\n    \u002F\u002F Executed before the entry animates inside \n}\n\nattributes.lifecycleEvents.didAppear = {\n    \u002F\u002F Executed after the entry animates inside\n}\n\nattributes.lifecycleEvents.willDisappear = {\n    \u002F\u002F Executed before the entry animates outside\n}\n\nattributes.lifecycleEvents.didDisappear = {\n    \u002F\u002F Executed after the entry animates outside\n}\n```\n\n#### Display Mode\nTo allow you to fully support any user interface style, `SwiftEntryKit` introduces two specialized types:\n- `EKColor` describes a color under light and dark modes.\n- `EKAttributes.BackgroundStyle.BlurStyle` describes a blur effect under light and dark modes. \n\nThe following forces `SwiftEntryKit` to display the entry on dark mode.\n```Swift\nattributes.displayMode = .dark\n```\n\nThe possible values are: `.light`, `.dark`, `.inferred`.\nThe default value is `.inferred`, which means that the entry will be displayed with the current user interface style.\n\n#### Background Style\nThe entry and the screen can have various background styles, such as blur, color, gradient and even an image.\n\nThe following example implies clear background for both the entry and the screen:\n```Swift\nattributes.entryBackground = .clear\nattributes.screenBackground = .clear\n```\n\nColored entry background and dimmed screen background:\n```Swift\nattributes.entryBackground = .color(color: .standardContent)\nattributes.screenBackground = .color(color: EKColor(UIColor(white: 0.5, alpha: 0.5)))\n```\n\nGradient entry background (diagonal vector):\n```Swift\nlet colors: [EKColor] = ...\nattributes.entryBackground = .gradient(gradient: .init(colors: colors, startPoint: .zero, endPoint: CGPoint(x: 1, y: 1)))\n```\n\nVisual Effect entry background:\n```Swift\nattributes.entryBackground = .visualEffect(style: .dark)\n```\n\nThe default value of `entryBackground` and `screenBackground` is `.clear`. \n\n#### Shadow\nThe shadow that surrounds the entry.\n\nEnable shadow around the entry:\n```Swift\nattributes.shadow = .active(with: .init(color: .black, opacity: 0.3, radius: 10, offset: .zero))\n```\n\nDisable shadow around the entry:\n```Swift\nattributes.shadow = .none\n```\n\nThe default value of `shadow` is `.none`. \n\n#### Round Corners\nRound corners around the entry.\n\nOnly top left and right corners with radius of 10:\n```Swift\nattributes.roundCorners = .top(radius: 10)\n```\n\nOnly bottom left and right corners with radius of 10:\n```Swift\nattributes.roundCorners = .bottom(radius: 10)\n```\n\nAll corners with radius of 10:\n```Swift\nattributes.roundCorners = .all(radius: 10)\n```\n\nNo round corners:\n```Swift\nattributes.roundCorners = .none\n```\n\nThe default value of `roundCorners` is `.none`. \n\n#### Border\nThe border around the entry.\n\nAdd a black border with thickness of 0.5pts:\n```Swift\nattributes.border = .value(color: .black, width: 0.5)\n```\n\nNo border:\n```Swift\nattributes.border = .none\n```\n\nThe default value of `border` is `.none`. \n\n#### Animations\nDescribes how the entry animates into and out of the screen. \n\n* Each animation descriptor can have up to 3 types of animations at the same time. Those can be combined to a single complex one!\n* Translation animation anchor can be explicitly set but it receives a default value according to position of the entry.\n\nExample for _translation_ from top with spring, _scale_ in and even _fade in_ as a single entrance animation:\n```Swift\nattributes.entranceAnimation = .init(\n                 translate: .init(duration: 0.7, anchorPosition: .top, spring: .init(damping: 1, initialVelocity: 0)), \n                 scale: .init(from: 0.6, to: 1, duration: 0.7), \n                 fade: .init(from: 0.8, to: 1, duration: 0.3))\n```\n\nThe default value of `entranceAnimation` and `exitAnimation` is `.translation` - The entry translates in or out, respectively, with duration of 0.3 seconds. \n\n#### Pop Behavior\nDescribes the entry behavior when it's being popped (dismissed by an entry with equal \u002F higher display-priority.\n\nThe entry is being popped animatedly:\n```Swift\nattributes.popBehavior = .animated(animation: .init(translate: .init(duration: 0.2)))\n```\n\nThe entry is being overridden (Disappears promptly):\n```Swift\nattributes.popBehavior = .overridden\n```\n\nThe default value of `popBehavior` is `.animated(animation: .translation)` - It translates out with duration of 0.3 seconds. \n\n#### Status Bar\nThe status bar appearance can be modified during the display of the entry. \nSwiftEntryKit supports both *View controller-based status bar appearance* and manual setting. \n\nSetting the status bar style is fairly simple - \n\nStatus bar becomes visible and gets a light style:\n```Swift\nattributes.statusBar = .light\n```\n\nThe status bar becomes hidden:\n```Swift\nattributes.statusBar = .hidden\n```\n\nThe status bar appearance is inferred from the previous context (won't be changed):\n```Swift\nattributes.statusBar = .inferred\n```\n\nIn case there is an already presenting entry with lower\u002Fequal display priority, the status bar will change its style. \nWhen the entry is removed, the status bar gets its initial style back.\n\nThe default value of `statusBar` is `.inferred`. \n\n#### EKAttributes' interface is as follows:\n\n```Swift\npublic struct EKAttributes\n\n    \u002F\u002F Identification\n    public var name: String?\n\n    \u002F\u002F Display\n    public var windowLevel: WindowLevel\n    public var position: Position\n    public var precedence: Precedence\n    public var displayDuration: DisplayDuration\n    public var positionConstraints: PositionConstraints\n\n    \u002F\u002F User Interaction\n    public var screenInteraction: UserInteraction\n    public var entryInteraction: UserInteraction\n    public var scroll: Scroll\n    public var hapticFeedbackType: NotificationHapticFeedback\n    public var lifecycleEvents: LifecycleEvents\n\n    \u002F\u002F Theme & Style\n    public var displayMode = DisplayMode.inferred\n    public var entryBackground: BackgroundStyle\n    public var screenBackground: BackgroundStyle\n    public var shadow: Shadow\n    public var roundCorners: RoundCorners\n    public var border: Border\n    public var statusBar: StatusBar\n    \n    \u002F\u002F Animations\n    public var entranceAnimation: Animation\n    public var exitAnimation: Animation\n    public var popBehavior: PopBehavior\n}\n```\n\n### Presets Usage Example:\n\nYou can use one of the presets that come with SwiftEntryKit, doing these 4 simple steps:\n\n1. Create your *EKAttributes* struct and set your preferable properties.\n2. Create *EKNotificationMessage* struct (The Content) and set the content.\n3. Create *EKNotificationMessageView* (The View) and inject *EKNotificationMessage* struct to it.\n4. Display the entry using *SwiftEntryKit* class method.\n\n#### EKNotificationMessageView preset example:\n\n```Swift\n\u002F\u002F Generate top floating entry and set some properties\nvar attributes = EKAttributes.topFloat\nattributes.entryBackground = .gradient(gradient: .init(colors: [EKColor(.red), EKColor(.green)], startPoint: .zero, endPoint: CGPoint(x: 1, y: 1)))\nattributes.popBehavior = .animated(animation: .init(translate: .init(duration: 0.3), scale: .init(from: 1, to: 0.7, duration: 0.7)))\nattributes.shadow = .active(with: .init(color: .black, opacity: 0.5, radius: 10, offset: .zero))\nattributes.statusBar = .dark\nattributes.scroll = .enabled(swipeable: true, pullbackAnimation: .jolt)\nattributes.positionConstraints.maxSize = .init(width: .constant(value: UIScreen.main.minEdge), height: .intrinsic)\n\nlet title = EKProperty.LabelContent(text: titleText, style: .init(font: titleFont, color: textColor))\nlet description = EKProperty.LabelContent(text: descText, style: .init(font: descFont, color: textColor))\nlet image = EKProperty.ImageContent(image: UIImage(named: imageName)!, size: CGSize(width: 35, height: 35))\nlet simpleMessage = EKSimpleMessage(image: image, title: title, description: description)\nlet notificationMessage = EKNotificationMessage(simpleMessage: simpleMessage)\n\nlet contentView = EKNotificationMessageView(with: notificationMessage)\nSwiftEntryKit.display(entry: contentView, using: attributes)\n```\n\n### Custom View Usage Example:\n\n```Swift\n\u002F\u002F Create a basic toast that appears at the top\nvar attributes = EKAttributes.topToast\n\n\u002F\u002F Set its background to white\nattributes.entryBackground = .color(color: .white)\n\n\u002F\u002F Animate in and out using default translation\nattributes.entranceAnimation = .translation\nattributes.exitAnimation = .translation\n\nlet customView = UIView()\n\u002F*\n... Customize the view as you like ...\n*\u002F\n\n\u002F\u002F Display the view with the configuration\nSwiftEntryKit.display(entry: customView, using: attributes)\n```\n\n### Displaying a View Controller\nAs from version 0.4.0, view controllers are supported as well.\n\n```Swift\nSwiftEntryKit.display(entry: customViewController, using: attributes)\n```\n\n### Alternative Rollback Window\nBy default, the window held by the application delegate becomes the key again right after SwiftEntryKit has finished displaying the entry.\nThis behavior can be changed using `rollbackWindow` parameter.\n\n```Swift\nSwiftEntryKit.display(entry: view, using: attributes, rollbackWindow: .custom(window: alternativeWindow))\n```\nAfter the entry has been dismissed, the given window `alternativeWindow` would become the key instead of the window that is held by the application delegate.\n\n### Dismissing an Entry\nYou can dismiss the currently displayed entry by simply invoke *dismiss* in the SwiftEntryKit class, likewise:\n\n```Swift\nSwiftEntryKit.dismiss()\n```\nOr:\n\n```Swift\nSwiftEntryKit.dismiss(.displayed)\n```\n\nThis dismisses the entry animatedly using its *exitAnimation* attribute and on completion, the window would be removed as well.\n\nYou can dismiss the currently displayed entry and flush the queue as well, likewise:\n\n```Swift\nSwiftEntryKit.dismiss(.all)\n```\n\nOnly flush the queue, leaving any currently displayed entry to its natural lifecycle:\n\n```Swift\nSwiftEntryKit.dismiss(.queue)\n```\n\nDismiss a specific entry by name - either currently displayed or enqueued. All the entries with the given name are dismissed.\n\n```Swift\nSwiftEntryKit.dismiss(.specific(entryName: \"Entry Name\"))\n```\n\nDismiss any entry with a lower or equal display priority of `.normal`.\n\n```Swift\nSwiftEntryKit.dismiss(.prioritizedLowerOrEqualTo(priority: .normal))\n```\n\n#### Using a completion handler\n\nInject a trailing closure to be executed after the entry dismissal.\n\n```Swift\nSwiftEntryKit.dismiss {\n    \u002F\u002F Executed right after the entry has been dismissed\n}\n```\n\n### Is Currently Displaying\nInquire whether an entry is currently displayed:\n```Swift\nif SwiftEntryKit.isCurrentlyDisplaying {\n    \u002F* Do your things *\u002F\n}\n```\n\nInquire whether a **specific** entry is currently displayed using the `name` property inside `EKAttributes`.\n```Swift\nif SwiftEntryKit.isCurrentlyDisplaying(entryNamed: \"Top Note\") {\n\u002F* Do your things *\u002F\n}\n```\n\n### Queue Contains\nInquire whether the queue of entries is not empty:\n```Swift\nif SwiftEntryKit.isQueueEmpty {\n    \u002F* Do your things *\u002F\n}\n```\n\nInquire whether the queue of entries contains an entry with name:\n```Swift\nif SwiftEntryKit.queueContains(entryNamed: \"Custom-Name\") {\n    \u002F* Do your things *\u002F\n}\n```\n\n### Swiping and Rubber Banding\nEntries can be panned vertically (This ability can be enabled using the *scroll* attributes). \nThefore it's only natural that an entry can be dismissed using a swipe-like gesture.\n\nEnable swipe gesture. When the swipe gesture fails (doesn't pass the velocity threshold) ease it back.\n```Swift\nattributes.scroll = .enabled(swipeable: true, pullbackAnimation: .easeOut)\n```\n\nEnable swipe gesture. When the swipe gesture fails throw it back out with a jolt.\n```Swift\nattributes.scroll = .enabled(swipeable: true, pullbackAnimation: .jolt)\n```\n\nThe *PullbackAnimation* values (duration, damping & initialSpringVelocity) can be customized as well.\n\nSwipe | Jolt |\n--- | --- |\n![swipe_example](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Fswipe.gif) | ![band_example](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Frubber_band.gif) |\n\n### Dealing with safe area:\n*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:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Ftoasts.gif) do), or even leave the safe area empty (Like [Floats](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Ffloats.gif) do).\n\nSwiftEntryKit 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.\n\n### Dealing with orientation change:\nSwiftEntryKit identifies orientation changes and adjust the entry's layout to those changes.\nTherefore, if you wish to limit the entries's width, you are able to do so by giving it a maximum value, likewise:\n\n```Swift\nvar attributes = EKAttributes.topFloat\n\n\u002F\u002F Give the entry the width of the screen minus 20pts from each side, the height is decided by the content's contraint's\nattributes.positionConstraints.size = .init(width: .offset(value: 20), height: .intrinsic)\n\n\u002F\u002F 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.\nlet edgeWidth = min(UIScreen.main.bounds.width, UIScreen.main.bounds.height)\nattributes.positionConstraints.maxSize = .init(width: .constant(value: edgeWidth), height: .intrinsic)\n\nlet customView = UIView()\n\u002F*\n... Customize the view as you like ...\n*\u002F\n\n\u002F\u002F Use class method of SwiftEntryKit to display the view using the desired attributes\nSwiftEntryKit.display(entry: customView, using: attributes)\n```\n\nOrientation Change Demonstration |\n--- |\n![orientation_change](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Forientation.gif)\n\n### Dark Mode in the Example Project\n\nYou can tinker with the display mode using a segmented control on presets screen, forcing light and dark modes.\nAll the presets are dark mode ready, but only some in the example project demonstrate dark mode capabilities.\n\n![light_dark](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fswift-entrykit\u002Fdark-light.gif)\n\n### Swift and Objective-C Interoperability\nSwiftEntryKit's APIs use the Swift language exclusive syntax (enums, associated values, and more). \nTherefore, `SwiftEntryKit` cannot be referenced directly from an Objective-C file (*.m*, *.h* or *.mm*).\n\nYet, 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.\n\n[This project](https:\u002F\u002Fgithub.com\u002Fhuri000\u002FObjcEntryKitExample) demonstrates that using Carthage and CocoaPods.  \n\n## Author\n\nDaniel Huri, huri000@gmail.com\n\n## Donations\n\nDonations can be made by sending either Bitcoin or Ether to the following addresses.\n\n| BTC | ETH |\n| :---: | :---: | \n| 134TiBiUvVNt7Na5KXEFBSChLdgVDw1Hnr | 0xAe6616181FCdde4793AE749Ce21Cd5Af9333A3E2 |\n| ![btc_address](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fdonate\u002Fbtc-address.png) | ![eth_address](https:\u002F\u002Fgithub.com\u002Fhuri000\u002Fassets\u002Fblob\u002Fmaster\u002Fdonate\u002Feth-address.png) |\n\n## Thank You\n\nThanks Lily Azar, lilushkaa@gmail.com for those awesome preset icons. \n\n## Credits\n\n[**Icons Credits**](\u002FCREDITS.md)\n\n## License\n\nSwiftEntryKit is available under the MIT license. See the [LICENSE](\u002FLICENSE) file for more info.\n\n### Exceptions\nPlease be aware that any use of the icons inside the project requires attribution to the creator. See [credits](\u002FCREDITS.md) for the creators list.\n","SwiftEntryKit 是一个用于iOS应用的展示库，可以轻松地在应用中显示各种覆盖层。它支持多种类型的弹出窗口，如警告、通知和模态视图等，并且提供了丰富的自定义选项，包括显示位置、动画效果、用户交互行为等。该库采用Swift编写，兼容Swift 4及以上版本，并支持通过CocoaPods、Carthage等多种方式集成到项目中。适用于需要在iOS应用中快速实现美观且功能强大的提示或信息展示场景，比如用户引导、消息通知或是操作确认等界面。",2,"2026-06-11 03:08:48","top_language"]