Code Monkey home page Code Monkey logo

spalert's Introduction

SPAlert

Native popup alert similar to Apple Music or Feedback in AppStore app. Support animations. I tried to repeat Apple alert as much as possible. You can download example app Debts - Spending tracker from AppStore. If you like the project, do not forget to put star โ˜…

Preview

If you want to buy source code of example apps, please, go to xcode-shop.com.

Navigate

Requirements

Swift 4.2 & 5.0. Ready for use on iOS 10+

Installation

CocoaPods:

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

pod 'SPAlert'

Manually

If you prefer not to use any of the aforementioned dependency managers, you can integrate SPAlert into your project manually. Put Source/SPAlert folder in your Xcode project. Make sure to enable Copy items if needed and Create groups.

Quick Start

For best experience, I recomend call alerts by SPAlert. These functions are updated regularly and show as Apple way. I focus on presets:

SPAlert.present(title: "Added to Library", preset: .done)

Currently there are few presets. If you want to add a new preset, create a issue and describe how you see it. I will try to quickly add new presets.

If you want use custom image, use func:

SPAlert.present(title: "Love", message: "We'll recommend more like this in For You", image: UIImage(named: "Heart")!)

For show simple text message, use:

SPAlert.present(message: "Empty UITextField")

Usage

Sometimes it may require deep customization. In this section, I will show you what you can do.

Duration

To change the time that the SPAlert will be shown, use property duration:

let alertView = SPAlertView(title: "Added to Library", message: nil, preset: SPAlertPreset.done)
alertView.duration = 3
alertView.present()

Layout

Here you can change the sizes and spaces:

alertView.layout.topSpace = 18
alertView.layout.iconHeight = 25

For more properties see class.

Dismiss by Tap

If you click on the alert, it will disappear ahead of time. This can be disabled:

alertView.dismissByTap = false

Haptic

If you use presets, the vibro-response will be start automatically. For customize this, you need set property haptic:

alertView.haptic = .success

For disable haptic, set it to .none.

Corner Radius

I use a corner radius like an Apple. If you need to change it, see the property cornerRadius:

alertView.cornerRadius = 12

My projects

SPStorkController

SPStorkController is very similar to the modal controller displayed in Apple Music, Podcasts and Mail apps. Customizable height of view. Check scroll's bounce for more interactive. Simple adding close button and centering arrow indicator. You can download example Debts - Spending tracker app from AppStore.

If you want to buy source code of this apps, please, go to xcode-shop.com.

SPPermission

SPPermission allow request permissions with native dialog UI and interactive animations. Also you can request permissions without dialog. Check state any permission. You can start using this project with just two lines of code and easy customisation.

SPLarkController

SPLarkController make settings screen for your application. You can add buttons and switches. The amount cells is not limited. You can start using project with just two lines of code and easy customisation.

You can download Code - Learn Swift & Design app, which uses SPLarkController. Also you can buy source code of this app on xcode-shop.com.

Xcode Shop

If you want buy apps with source code, you can visit my xcode-shop.com. Here I am sale apps, modules, 3D elements and other. In applications you can find many cool UI that will be useful for your projects. Also by buying, you support me and my free GitHub development.

License

SPAlert is released under the MIT license. Check LICENSE.md for details.

Contact

If you need any application or UI to be developed, message me at [email protected] or via telegram. I develop iOS apps and designs. I use swift for development. To request more functionality, you should create a new issue. You can see my apps in AppStore.

spalert's People

Watchers

Alvin Cris Uy avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.