BeautyAlert - BeautyAlert provides alerts with custom shapes, colors, buttons

Overview

CI Status Version License Platform

BeautyAlert helps you can easily design by determining the color, shape, and shadow direction of the alert according to your app style.

Requirements

  • swift: 4.0 or higher
  • iOS: 13.0 or higher

Installation

CocoaPods

BeautyAlert is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'BeautyAlert'

SPM

In the Xcode 13.0+ enter BeautyAlert URL in Add Package Dependency

https://github.com/ChaminLee/BeautyAlert

Usage

1. Create Alert

create BeautyAlert instance

let beautyAlert = BeautyAlert()

2. Configure your alert style

You can choose the title and content messages, their color, and the color of the entire background.

beautyAlert.setContentAttribute(
    title: "BeautyAlert Title ✨",
    titleColor: .black,
    message: "BeautyAlert helps to make custom alert easily", 
    messageColor: .black, 
    backgroundColor: .white
)

3. Add custom buttons with custom actions

You can create a confirmation and cancel button, and you can also specify an action for each button.

// Cancel Button
beautyAlert.addButton(
    title: "Cancel",
    titleColor: .black,
    backgroundColor: .lightGray, 
    style: .cancel, 
    action: cancelAction
)
// OK Button
beautyAlert.addButton(
    title: "OK",
    titleColor: .white,
    backgroundColor: .orange, 
    style: .confirm,
    action: confirmAction
)

// Actions 
func confirmAction() {
    // do confirm actions
}

func cancelAction() {
    // do cancel actions
    self.dismiss(animated: true, completion: nil)
}

4. Present it!

Just present and use it!

self.present(beautyAlert, animated: true, completion: nil)

5. Simulation



case1 case2 ...
...

Make a alert style that you want!

Author

ChaminLee, [email protected]

License

BeautyAlert is available under the MIT license. See the LICENSE file for more info.

You might also like...
In-app notification in Swift, with customizable buttons and input text field.
In-app notification in Swift, with customizable buttons and input text field.

Notie Undistracted in-app notification in Swift, with added buttons and input box. Installation CocoaPods To integrate Notie into your Xcode project u

Custom-action-sheet- - Custom action sheet with swift

Custom-action-sheet- Usage let alertController: UIAlertControllerDimmed = UIAler

A Swift library to design custom prompts with a great scope of options to choose from.
A Swift library to design custom prompts with a great scope of options to choose from.

Installation CocoaPods Install with CocoaPods by adding the following to your Podfile: source 'https://github.com/CocoaPods/Specs.git' platform :ios,

BottomSheet makes it easy to add custom bottom sheets to your SwiftUI apps.
BottomSheet makes it easy to add custom bottom sheets to your SwiftUI apps.

BottomSheet About BottomSheet BottomSheet makes it easy to add custom bottom sheets to your SwiftUI apps. The result can look like this...or completel

Highly configurable iOS Alert Views with custom content views
Highly configurable iOS Alert Views with custom content views

NYAlertViewController NYAlertViewController is a replacement for UIAlertController/UIAlertView with support for content views and UI customization. Fe

TTGSnackbar shows simple message and action button on the bottom or top of the screen with multi kinds of animation, which is written in Swift3 and inspired by Snackbar in Android. It also support showing custom view, icon image or multi action button. Custom alert View to iOS applications
Custom alert View to iOS applications

A simple, easy and custom iOS UIAlertView written in Swift Malert came to facilitates custom alert views as UIAlertController. Malert allows you to pe

A custom-designed reimplementation of the UIActionSheet control for iOS
A custom-designed reimplementation of the UIActionSheet control for iOS

TOActionSheet TOActionSheet is an iOS UI control providing a modal prompt control, similar to UIActionSheet. Unlike UIActionSheet, it can be very heav

NiceAlertView is a Swift framework that can increase time of development and show nice custom AlertsViews
NiceAlertView is a Swift framework that can increase time of development and show nice custom AlertsViews

NiceAlertView Nice and beautiful AlertView for your iOS project NiceAlertView is a Swift framework that can increase time of development and show nice

Comments
  • chore: Update pod version and README

    chore: Update pod version and README

    변경사항

    1. tag 버전과 cocoaPods 버전 통일성을 위해 pods version을 0.1.2로 버전업
    2. #1 PR에서 반영된 파라미터 코드 컨벤션을 README에도 적용

    해당 PR 머지 후 코코아팟 새버전으로 업데이트 시키려합니다🙌 어프로브된다면 앞으로는 Squash and Merge로 진행하겠습니다! (커밋메시지를 대표적으로 하나만 가져감으로 추적이 편리합니다.) 추가로, PR을 위해 만들어진 브랜치는 머지 후 삭제되도록 설정하겠습니다🙃

    opened by GREENOVER 3
  • chore: Support SPM

    chore: Support SPM

    구현사항

    1. Support SPM

    • SPM 지원 설정 및 이에 관하여 podspec의 소스파일 경로 변경
    • SPM install에 대한 README 업데이트

    2. Examples 내 코드 로직 변경

    • 기존 Alert을 생성하던 코드를 별도의 메서드로 관심사 분리

    3. 파라미터 코드 컨벤션 변경

    • 파라미터가 3개 이상 들어가게될 경우 조금 더 가독성이 좋은 코드 스타일로 변경

    @ChaminLee 리뷰 요청드립니다🙏🏻 수정되어야 하거나 스타일이 안맞는 부분이 있다면 말씀 부탁드려요🙇🏻 추가로, 아직 해당 PR은 머지가 되지 않았음으로 태그 및 팟 업데이트는 진행하지 않았습니다! p.s. 앗, 콜라보 등록이 안되어서 리뷰어 등록이나 머지 권한이 막혀있네요🥲 호옥시 가능하시다면 해당 프로젝트에 콜라보 등록을 해주시면 태그 업데이트 등도 싱크 맞춰서 할 수 있을것 같습니다😁

    opened by GREENOVER 1
  • feat: support iPadOS

    feat: support iPadOS

    • titleLabel과 messageLabel의 numberOfLines 속성 값 변경
      • title은 최대 2줄, message는 최대 10줄로 제한
    • iPadOS를 지원하기 위해 OS 분기 코드 추가
      • iPadOS: Alert의 너비는 view의 너비 * 0.3배
      • iOS: Alert의 너비는 view의 너비 * 0.8배
      • UserDevice 네임스페이스 추가
    opened by ChaminLee 0
Releases(0.1.2)
Owner
chacha
👨🏻‍💻Retrospective iOS Developer
chacha
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.

StatusAlert is being sponsored by the following tool; please help to support us by takin a look and signing up to a free trial. Dependency managers Fe

Yehor Miroshnychenko 841 Dec 6, 2022
A µFramework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil

Drops ?? A µFramework for showing alerts like the one used when copying from pasteboard or connecting Apple pencil. Features iOS 10+ Can be used in Sw

Omar Albeik 709 Dec 29, 2022
Easily create different alerts in SwiftUI

AlertWizard ????‍♂️ This package lets you easily create different alerts in SwiftUI with the call of a single function. As this is my first package th

null 3 Jun 3, 2021
Bursts 🔥 A Funny Framework is showing alerts, Have been Adapting Swift and SwiftUI

Bursts ?? A Funny Framework is showing alerts, Have been Adapting Swift and SwiftUI Features iOS 10+ Can be used in UIKit and SwiftUI applications Lig

Jovins 11 Apr 22, 2022
Create Apple-like alerts & toasts using SwiftUI

AlertToast-SwiftUI Present Apple-like alert & toast in SwiftUI ?? Example ?? Overview Currently in SwiftUI, the only way to inform the user about some

Elai Zuberman 1.1k Dec 29, 2022
iOS tweak to display toasts for Low Power alerts and charging

Electrode iOS tweak to display toasts for Low Power alerts and charging. Localization Want to help translate Electrode to your language? Sumbit a pull

null 8 Sep 7, 2022
It is a highly configurable iOS library which allows easy styling with built in styles as well as extra header and footer views so that you can make extremely unique alerts and action sheets.

 CFAlertViewController CFAlertViewController is a library that helps you display and customise Alerts, Action Sheets, and Notifications on iPad and i

Crowdfire Inc. 1.1k Dec 18, 2022
Advance animated alerts for iOS written in Swift

LIHAlert LIHAlert provides animated banners for iOS. Updated to Swift 3 Demo Project The LIHAlert workspace contains a demo project, also used for dev

null 37 Dec 9, 2022
🚨Use the iPhone X Notch to display alerts. 🚨

NotchyAlert Prerequisites Xcode 9.x Swift 4.x iPhone X Simulator/Device Demo Installation Cocoapods To install NotchyAlert using Cocoapods, add the fo

Sofiane Beors 70 Nov 20, 2022
DropView - A SwiftUI library to display Apple Pencil and Pasteboard-like alerts on iOS.

DropView is a SwiftUI-based library to display alerts inspired by the Apple Pencil and pasteboard stock ones.

Stefano Bertagno 46 Dec 4, 2022