Latest 1.0.0
Homepage https://github.com/philip-bui/error-view
License MIT
Platforms ios 9.0
Authors

Error View

CI Status
CodeCov
Version
Carthage Compatible
Platform
License

Error View appendable to View Controllers subviews.

  • Animated in and out effects.
  • Text shake effects.

Requirements

  • iOS 9.0+
  • Xcode 10.3+
  • Swift 4.2+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Error View into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'ErrorView'

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate Error View into your Xcode project using Carthage, specify it in your Cartfile:

github "philip-bui/error-view"

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but Error View does support its use on supported platforms.

Once you have your Swift package set up, adding Error View as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/philip-bui/error-view.git", from: "1.0.0"))
]

Usage

import ErrorView

// AppDelegate.swift - Modify global defaults.
ErrorView.backgroundColor = UIColor.orange
ErrorView.font = UIFont.boldSystemFont(ofSize: 14.5)
ErrorView.textColor = UIFont.white

// ViewController.swift - Customize own error views
private weak var errorView: ErrorView?

private func textViewDidBeginEditing(_ textView: UITextView) {
    errorView?.dismiss()    
}

private func textViewDidEndEditing(_ textView: UITextView) {
    guard true else {
        errorView = ErrorView(addTo: self, text: "Invalid text")
        return
    }
}

License

Error View is available under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "ErrorView",
    "version": "1.0.0",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "Error view.",
    "description": "Beautifully animated error view",
    "homepage": "https://github.com/philip-bui/error-view",
    "authors": {
        "Philip Bui": "[email protected]"
    },
    "source": {
        "git": "https://github.com/philip-bui/error-view.git",
        "tag": "1.0.0"
    },
    "documentation_url": "https://github.com/philip-bui/error-view",
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Sources/**/*.swift",
    "screenshots": [
        "https://github.com/philip-bui/error-view/raw/master/Images/ErrorView.png"
    ],
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This