It provides UI components such as popover, popup, dialog supporting iOS apps

Related tags

Popup LCUIComponents
Overview



Overview

LCUIComponents is an on-going project, which supports creating transient views appearing above other content onscreen when a control is selected. Currently, the framework provides supports to simply create a customisable popover with a selectable data list.

Requirements

  • iOS 8.0+
  • Xcode 8+
  • Swift 3

Usage

The following is an example of how to create a popover. For more advanced use please check out the Sample path.

Set up a basic popover with data list

import LCUIComponents
import UIKit

class PopoverSamplesVC: UIViewController {
    
    // Create a data source
    let spiceList: [LCTuple<Int>] = [(key: 1, value:"Cinnamon"),
                                     (key: 2, value:"Cloves"),
                                     (key: 3, value:"Ginger"),
                                     (key: 4, value:"Turmeric"),
                                     (key: 5, value:"Tamarind")]
    
    @IBAction func btnPopoverTapped(_ sender: UIButton) {
        setupBasicPopover(for: sender)
    }
    
    func setupBasicPopover(for sender: UIView) {
        // Init a popover with a callback closure after selecting data
        let popover = LCPopover<Int>(for: sender, title: "Spices") { tuple in
            // Use of the selected tuple
            guard let value = tuple?.value else { return }
            print(value)
        }
        // Assign data to the dataList
        popover.dataList = spiceList
        // Present the popover
        present(popover, animated: true, completion: nil)
    }
}

Set up a custom popover with data list

func setupCustomPopover(for sender: UIView) {
    // Init a popover with a callback closure after selecting data
    let popover = LCPopover<Int>(for: sender, title: "Spices") { tuple in
        // Use of the selected tuple
        guard let value = tuple?.value else { return }
        print(value)
    }
    // Assign data to the dataList
    popover.dataList = spiceList

    // Set popover properties
    popover.size = CGSize(width: 250, height: 219)
    popover.arrowDirection = .down
    popover.backgroundColor = .orange
    popover.borderColor = .orange
    popover.borderWidth = 2
    popover.barHeight = 44
    popover.titleFont = UIFont.boldSystemFont(ofSize: 19)
    popover.titleColor = .orange
    popover.textFont = UIFont(name: "HelveticaNeue-MediumItalic", size: 17) ?? UIFont.systemFont(ofSize: 17)
    popover.textColor = .black

    // Present the popover
    present(popover, animated: true, completion: nil)
}

Installation

CocoaPods

Specify LCUIComponents into your project's Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

pod 'LCUIComponents'

Manually Embedded

Simply download and add the Popover.swift file from Source path to your project.

You might also like...
PopupWindow is a simple Popup using another UIWindow in Swift
PopupWindow is a simple Popup using another UIWindow in Swift

PopupWindow PopupWindow is a simple Popup using another UIWindow Feature PopupWindow can be displayed at the top or bottom of the screen. Popup can se

A lightweight library for popup view
A lightweight library for popup view

SHPopup SHPop is lightweight library used for popup view Sample One Sample Two Sample Three Features SHPopup supports a popup inside another popup wit

The library allows to create simple popup menus

react-native-popup-menu This library allows to create simple popup menus Installation "react-native-popup-menu": "sergeymild/react-native-popup-menu"

WKWebView handling popup windows

WKWebViewWithPopUp WKWebView handling pop-up windows Property If there is a pop-up window, use the pop-up window. If there is no pop-up window, use th

IAMPopup is a simple class for expressing custom popup in various forms.
IAMPopup is a simple class for expressing custom popup in various forms.

IAMPopup Introduction IAMPopup is a simple class for expressing custom popup in various forms. This includes where to display the popup and space to d

A framework for presenting bars and view controllers as popup, much like the look and feel of Apple Music App.
A framework for presenting bars and view controllers as popup, much like the look and feel of Apple Music App.

PBPopupController PBPopupController is a framework for presenting bars and view controllers as popup, much like the look and feel of Apple Music App.

SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.

SwiftEntryKit 🤗 Donations can be made here. Table of Contents Overview Features Example Project Example Project Installation Presets Playground Requi

LNPopupController is a framework for presenting view controllers as popups of other view controllers, much like the Apple Music and Podcasts apps.
LNPopupController is a framework for presenting view controllers as popups of other view controllers, much like the Apple Music and Podcasts apps.

LNPopupController LNPopupController is a framework for presenting view controllers as popups of other view controllers, much like the Apple Music and

Swift wrapper for custom ViewController presentations on iOS
Swift wrapper for custom ViewController presentations on iOS

Presentr is a simple customizable wrapper for the Custom View Controller Presentation API introduced in iOS 8. About iOS let's you modally present any

Releases(1.1.5)
Owner
Linh Chu
Linh Chu
A Swift Popup Module help you popup your custom view easily

JFPopup JFPopup is a Swift Module help you popup your custom view easily. Support 3 way to popup, Drawer, Dialog and BottomSheet. Example To run the e

逸风 77 Dec 14, 2022
STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Objective-C and compatible with Swift.

STPopup STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Obj

Kevin Lin 2.6k Jan 6, 2023
Popover is a balloon library like Facebook app. It is written in pure swift.

Popover Description and appetize.io`s DEMO Usage To run the example project, clone the repo, and run pod install from the Example directory first. Sim

Yusuke Takahashi 2k Jan 2, 2023
Simple selection dialog

SelectionDialog Simple selection dialog inspired from ios-custom-alertview Preview Requirements iOS 8.0+ Swift 3 Xcode 8.0 Installation CocoaPods use_

Lee Sun-Hyoup 117 Aug 5, 2022
Show MS Windows style activation dialog on my screen.

Activate Mac The "Activate Windows" watermark ported to macOS with Swift Objective-C. Special thanks: MrGlockenspiel/activate-linux for the idea. Inst

Lakr Aream 195 Dec 23, 2022
Simple Swift class for iOS that shows nice popup windows with animation.

NMPopUpView Simple class for iOS that shows nice popup windows, written in Swift. The project is build with Swift 4.0, so you need Xcode 9.0 or higher

Nikos Maounis 194 Jun 5, 2022
⛩ Presenting custom views as a popup in iOS.

FFPopup is a lightweight library for presenting custom views as a popup. Bounce from Top & Bounce to Bottom Bounce from Top & Bounce to Top Bounce in

JonyFang 828 Jan 5, 2023
Simple way to present custom views as a popup in iOS and tvOS.

PopupKit PopupKit is a simple and flexible iOS framework for presenting any custom view as a popup. It includes a variety of options for controlling h

Pointwelve 59 Mar 1, 2022
SSToastMessage is written purely in SwiftUI. It will add toast, alert, and floating message view over the top of any view. It is intended to be simple, lightweight, and easy to use. It will be a popup with a single line of code.

SSToastMessage SSToastMessage is written in SwiftUI. It will add toast, alert, and floating message view over the top of any view. It is intended to b

Simform Solutions 223 Dec 2, 2022
PopupController is a controller for showing temporary popup view.

PopupController PopupController is a controller for showing temporary popup view. Demo Try PopupController on Appetize.io Installation CocoaPods pod '

daisuke sato 338 Dec 14, 2022