ProductPromotion
Logo

Swift

made by https://0x3d.site

GitHub - peterprokop/SwiftOverlays: SwiftOverlays is a Swift GUI library for displaying various popups and notifications
SwiftOverlays is a Swift GUI library for displaying various popups and notifications - peterprokop/SwiftOverlays
Visit Site

GitHub - peterprokop/SwiftOverlays: SwiftOverlays is a Swift GUI library for displaying various popups and notifications

GitHub - peterprokop/SwiftOverlays: SwiftOverlays is a Swift GUI library for displaying various popups and notifications

Imgur

SwiftOverlays is a Swift GUI library for displaying various popups and notifications.

SwiftOverlays animated logo is kindly made by Crafted Pixels

Build Status Carthage compatible

Features

SwiftOverlays provides several ways to notify user:

  • Wait overlay: a simple overlay with activity indicator

Wait

  • Wait overlay with text

WaitWithText

  • Overlay with text only
  • Overlay with image and text (can be used with PPSwiftGifs to show custom animated GIF instead of UIActivityIndicatorView)
  • All of the above with blocking any user interaction
  • Notification on top of the status bar, similar to native iOS local/push notifications

Notification

Installation

Manual

Just clone and add SwiftOverlays.swift to your project.

Carthage

  • > Cartfile
  • nano Cartfile
  • put github "peterprokop/SwiftOverlays" ~> 5.0.1 into Cartfile
  • Save it: ctrl-x, y, enter
  • Run carthage update
  • Copy SwiftOverlays.framework from Carthage/Build/iOS to your project
  • Make sure that SwiftOverlays is added in Embedded Binaries section of your target (or else you will get dyld library not loaded referenced from ... reason image not found error)
  • Add import SwiftOverlays on top of your view controller's code

Cocoapods

  • Make sure that you use latest stable Cocoapods version: pod --version
  • If not, update it: sudo gem install cocoapods
  • pod init in you project root dir
  • nano Podfile, add:
pod 'SwiftOverlays', '~> 5.0.1'
use_frameworks! 
  • Save it: ctrl-x, y, enter
  • pod update
  • Open generated .xcworkspace
  • Don't forget to import SwiftOverlays: import SwiftOverlays!

Requirements

  • iOS 10.0+
  • Xcode 10.0+
  • Swift 4.2 (if you need older swift version, see swift-3.0 and others)

Usage

If you're using CocoaPods, import the library with import SwiftOverlays

You can use UIViewController convenience methods provided by library:

// In your view controller:

// Wait overlay
self.showWaitOverlay()

// Wait overlay with text
let text = "Please wait..."
self.showWaitOverlayWithText(text)

// Overlay with text only
let text = "This is a text-only overlay...\n...spanning several lines"
self.showTextOverlay(text)

// Remove everything
self.removeAllOverlays()

// Notification on top of the status bar
UIViewController.showOnTopOfStatusBar(annoyingNotificationView!, duration: 5)

// Block user interaction
SwiftOverlays.showBlockingWaitOverlayWithText("This is blocking overlay!")

// Don't forget to unblock!
SwiftOverlays.removeAllBlockingOverlays()

Using with UITableViewController/UICollectionViewController

You can't use SwiftOverlays convenience methods directly with UITableViewController - because its view is, well, an UITableView, and overlay will be scrolled along with it.

Instead I suggest using UIViewController instead of UITableViewController and adding UITableView as a subview. (the same applies to UICollectionViewController)

If for some reason you can't use UIViewController, you can do something like:

if let superview = self.view.superview {
  SwiftOverlays.showCenteredWaitOverlayWithText(superview, text: "Please wait...")
  SwiftOverlays.removeAllOverlaysFromView(superview)
}

(but in that case overlay will be added to the superview, and you should obviously do that only if superview is available - for example in viewDidAppear method of your controller.).

Contribution

You are welcome to fork and submit pull requests

Other Projects

  • StarryStars - iOS GUI library for displaying and editing ratings.
  • AlertyAlert - AlertyAlert is a nice and fluffy iOS alert library for all your alerty needs.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory