A customizable, full-feature, lightweight iOS framework to be used instead of UIAlertController.

Overview

AdvancedActionSheet - iOS

A customizable, full-feature, lightweight iOS framework to be used instead of UIAlertController.

Cocoapods

AdvancedActionSheet is available through CocoaPods. Simply add the following to your Podfile:

use_frameworks!

target '
   
    '
    do
  pod 'AdvancedActionSheet'
end

How to use

  • Import it to your project:
import AdvancedActionSheet
  • Then create an instance of AdvancedActionSheet, add actions and present it:
let alert = AdvancedActionSheet()
alert.addAction(item: .normal(id: 0, title: "Action 1", completionHandler: { (_) in
    // User tapped on this action, do appropriate tasks
    alert.dismiss(animated: true)
}))
alert.addAction(item: .normal(id: 1, title: "Action 2", completionHandler: { (_) in
    // User tapped on this action, do appropriate tasks
    alert.dismiss(animated: true)
}))
alert.present(presenter: self, completion: nil)

  • add actions with image:
let alert = AdvancedActionSheet()
alert.addAction(item: .actionWithIcon(title: "Maps", titleColor: nil, image: UIImage(named: "maps") ?? UIImage(), completionHandler: { (_) in
    // User tapped on this action, do appropriate tasks
    alert.dismiss(animated: true)
}))
alert.addAction(item: .actionWithIcon(title: "Waze", titleColor: nil, image: UIImage(named: "waze") ?? UIImage(), completionHandler: { (_) in
    // User tapped on this action, do appropriate tasks
    alert.dismiss(animated: true)
}))
alert.addAction(item: .actionWithIcon(title: "Google Maps", titleColor: nil, image: UIImage(named: "google-maps") ?? UIImage(), completionHandler: { (_) in
    // User tapped on this action, do appropriate tasks
    alert.dismiss(animated: true)
}))
alert.present(presenter: self, completion: nil)

  • add selectable actions:
let alert = AdvancedActionSheet()
alert.addAction(item: .selectable(item: SelectableActionItem(id: 1, icon: nil, title: "USA", subtitle: "United States", defaultSelectionStatus: false, drawBottomLine: true)))
alert.addAction(item: .selectable(item: SelectableActionItem(id: 2, icon: nil, title: "UK", subtitle: "United Kingdom", defaultSelectionStatus: true, drawBottomLine: true)))
alert.addAction(item: .selectable(item: SelectableActionItem(id: 3, icon: nil, title: "Germany", subtitle: "🇩🇪", defaultSelectionStatus: true, drawBottomLine: true)))
alert.addAction(item: .selectable(item: SelectableActionItem(id: 4, icon: nil, title: "Utopia", subtitle: "🤨", defaultSelectionStatus: true, drawBottomLine: true)))
alert.addAction(item: .selectable(item: SelectableActionItem(id: 5, icon: nil, title: "Ant Title", subtitle: "Any description", defaultSelectionStatus: false, drawBottomLine: true)))
// - deactivatable: will deactivate action when no selectable is selected, and reactivate it as soon as one of them become selected
alert.addAction(item: .normal(id: 6, title: "Done", deactivatable: false, completionHandler: { (selectedIDs) in
    print(selectedIDs)
    alert.dismiss(animated: true)
}))
alert.present(presenter: self, completion: nil)

  • add gallery+camera action:
let alert = AdvancedActionSheet()
alert.addAction(item: .quickGalleryCollectionView(showCamera: true, completionHandler: { (assets, selectedActionIDs, sendAsFile) in
    // User tapped on send (as file or with compression) button
    // with selected assets &
    // selected selectable actions if there is any of them (in this example we have no selectable action while having gallery action)
    alert.dismiss(animated: true)
}, {
    // User tapped on camera, open camera as you wish (you can use UIImagePickerController)
    alert.dismiss(animated: true)
}))
alert.addAction(item: .normal(id: 0, title: "Contacts", deactivatable: false, completionHandler: { (selectedIDs) in
    // User tapped on this action, do appropriate tasks
    alert.dismiss(animated: true)
}))
alert.addAction(item: .normal(id: 1, title: "Location", deactivatable: false, completionHandler: { (selectedIDs) in
    // User tapped on this action, do appropriate tasks
    alert.dismiss(animated: true)
}))
alert.addAction(item: .normal(id: 2, title: "iCloud", deactivatable: false, completionHandler: { (selectedIDs) in
    // User tapped on this action, do appropriate tasks
    alert.dismiss(animated: true)
}))
alert.present(presenter: self, completion: nil)

Customize it:

You can customize theme (colors), fonts and even language (texts). It will fit in your application.

  • Config theme (colors):
// Just call this method
AdvancedActionSheetConfigs.configColors
  • Config fonts:
// Just call this method
AdvancedActionSheetConfigs.configFonts
  • Config language (texts):
// Just call this method
AdvancedActionSheetConfigs.configLanguage
You might also like...
An easier constructor for UIAlertController. Present an alert from anywhere.
An easier constructor for UIAlertController. Present an alert from anywhere.

ALRT An easier constructor for UIAlertController. Present an alert from anywhere like this. ALRT.create(.alert, title: "Alert?").addOK().addCancel().s

Easy Swift UIAlertController
Easy Swift UIAlertController

EZAlertController Easy Swift UIAlertController One line setup for all UIAlertControllers Button action with closures instead of selectors Easily custo

Simple UIAlertController builder class in Swift.
Simple UIAlertController builder class in Swift.

Kamagari Simple UIAlertController builder class in Swift. Features AlertBuilder class to simply build UIAlertController by using method chaining UIAle

Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...

Alerts & Pickers Advanced usage of native UIAlertController with TextField, TextView, DatePicker, PickerView, TableView, CollectionView and MapView. F

An easy to use UIAlertController builder for swift

LKAlertController An easy to use UIAlertController builder for swift Features Short and simple syntax for creating both Alerts and ActionSheets from U

UIAlertController with continuity.

CuckooAlert Allow multiple use of presentViewController to UIAlertController. You may be disappointed from this. Do you imagine that cuckoo spit out s

Use UIAlertController like a boss.
Use UIAlertController like a boss.

Description Requirements Installation CocoaPods Carthage Usage License Description CatAlertController is a high level manager object that with chainin

UIPicker inside a UIAlertController
UIPicker inside a UIAlertController

DPPickerManager UIPicker inside a UIAlertController HOW TO USE : // Strings Picker let values = ["Value 1", "Value 2", "Value 3", "Value 4"] DPPickerM

An easier constructor for UIAlertController. Present an alert from anywhere.
An easier constructor for UIAlertController. Present an alert from anywhere.

ALRT An easier constructor for UIAlertController. Present an alert from anywhere like this. ALRT.create(.alert, title: "Alert?").addOK().addCancel().s

Releases(1.0.3)
Owner
Ali Samaiee
Ali Samaiee
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style.

Introduction Popup Dialog is a simple, customizable popup dialog written in Swift. Features Easy to use API with hardly any boilerplate code Convenien

Orderella Ltd. 3.8k Dec 20, 2022
PMAlertController is a great and customizable alert that can substitute UIAlertController

PMAlertController is a small library that allows you to substitute Apple's uncustomizable UIAlertController, with a beautiful and totally customizable

Paolo Musolino 2.5k Jan 3, 2023
PMAlertController is a great and customizable alert that can substitute UIAlertController

PMAlertController is a small library that allows you to substitute Apple's uncustomizable UIAlertController, with a beautiful and totally customizable

Paolo Musolino 2.5k Jan 3, 2023
Customizable replacement for UIAlertController

ActionSheet Customizable replacement for UIAlertController. Requirements Installation Swift Package Manager The Swift Package Manager is a tool for au

Horizontal Systems 0 Oct 6, 2022
This is an iOS control for selecting a date using UIDatePicker in an UIAlertController like manner

RMDateSelectionViewController This framework allows you to select a date by presenting an action sheet. In addition, it allows you to add actions arro

Roland Moers 1.2k Dec 13, 2022
This is an iOS control for presenting any UIView in an UIAlertController like manner

RMActionController This framework allows you to present just any view as an action sheet. In addition, it allows you to add actions around the present

Roland Moers 542 Dec 5, 2022
This is an iOS control for selecting something using UIPickerView in an UIAlertController like manner

RMPickerViewController This framework allows you to pick something with a picker presented as an action sheet. In addition, it allows you to add actio

Roland Moers 382 Dec 19, 2022
A simple custom popup dialog view for iOS written in Swift. Replaces UIAlertController alert style.

A simple custom popup dialog view for iOS written in Swift. Replaces UIAlertController alert style.

donggyu 5 Jan 26, 2022
Swifty, modern UIAlertController wrapper.

Alertift Alertift.alert(title: "Alertift", message: "Alertift is swifty, modern, and awesome UIAlertController wrapper.") .action(.default("❤️"))

Suguru Kishimoto 287 Jan 7, 2023
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date...

Alerts & Pickers Advanced usage of native UIAlertController with TextField, TextView, DatePicker, PickerView, TableView, CollectionView and MapView. F

RV 5.5k Dec 22, 2022