explaingit

dillidon/alerts-and-pickers

5,759SwiftAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A Swift library for iOS that embeds rich pickers, dates, photos, maps, contacts, colors, countries, directly inside native alert dialogs, so users never need to navigate to a separate screen.

Mindmap

mindmap
  root((Alerts and Pickers))
    What it does
      Rich pickers in alerts
      No separate screens needed
      Native iOS look and feel
    Picker types
      Date and time
      Contacts and location map
      Photos and colors
      Countries and currencies
    Tech stack
      Swift 4
      iOS 11 and later
      CocoaPods and Carthage
    Usage
      Drop into existing project
      Completion handler result
      MIT license
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a date-time picker inside an iOS alert without building a separate picker screen

USE CASE 2

Let users select a contact or phone number from an in-alert contact browser

USE CASE 3

Show a map location picker inside an action sheet so users can pick a spot without leaving the current view

USE CASE 4

Display a photo library browser or color picker inside an alert dialog for quick selection

Tech stack

SwiftiOSCocoaPodsCarthage

Getting it running

Difficulty · easy Time to first run · 30min

Project appears inactive, check the last commit date before adding as a production dependency.

Use freely for any purpose, including commercial apps, as long as you keep the copyright notice.

In plain English

Alerts and Pickers is a Swift library for iOS developers that extends the standard system alert dialog with far more capable input types. On iOS, the built-in alert box is limited: you can add a basic text field or show a short message, but you cannot easily embed a date picker, a map, a photo library browser, or a country selector inside it. This library fills that gap by letting developers drop complex pickers directly into alert and action sheet dialogs without building custom screens from scratch. The pickers available cover a wide range of common needs. There are pickers for dates and times, plain text fields, country selection with phone codes, contact selection, location on a map, photos from the device library, currencies, and colors. Each picker is built to fit inside the native iOS alert or action sheet style, so it looks at home on the platform rather than feeling like a custom component bolted on. For an iOS developer, the practical benefit is speed. Asking a user to choose a date or pick a contact typically requires navigating to a separate screen, which means writing view controller code for the transition and back button handling. This library compresses that into an alert that appears over the current screen, the user makes a selection, and the result comes back in a completion handler. The README includes code examples and animated GIF previews showing how each picker looks and behaves. The library is written in Swift 4 and targets iOS 11 and later. It is installed via CocoaPods or Carthage, the two most common dependency managers for iOS projects. The code is released under the MIT license. The README is thorough and shows working code for every picker type, making it straightforward to drop one into an existing project. The project appears to be a read-only reference library rather than an actively maintained tool, so developers should check the last commit date before building a production dependency on it.

Copy-paste prompts

Prompt 1
Using alerts-and-pickers in my iOS Swift app, show me how to present a date and time picker inside a UIAlertController and read back the selected value in a completion handler.
Prompt 2
I want to add a country selector alert using alerts-and-pickers. Show me the CocoaPods setup and the Swift code to display the picker and print the selected country code.
Prompt 3
How do I use alerts-and-pickers to present a contact picker alert on iOS 15 and handle the case where the user has denied contacts permission?
Prompt 4
Show me how to customize the color picker alert from alerts-and-pickers to default to a specific hex color and return the chosen UIColor on confirmation.
Open on GitHub → Explain another repo

← dillidon on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.