Code Monkey home page Code Monkey logo

alerts-and-pickers's Introduction

Swift 4.0 Platform: iOS XCode 9+ iOS 11 Licence MIT

Alerts & Pickers

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

Features

  • Custom pickers based on UITextField, UITextView, UIDatePicker, UIPickerView, UITableView, UICollectionView and MKMapView.
  • Example using a Storyboard.
  • Easy contentViewController placement.
  • Attributed title label and message label.
  • Button customization: image and title color.
  • Understandable action button placement.
  • Easy presentation.
  • Pure Swift 4.

Usage

  • New Alert
let alert = UIAlertController(style: .alert, title: "Title", message: "Message")
// or
let alert = UIAlertController(style: .alert)
  • Set and styling title
alert.set(title: "Title", font: .systemFont(ofSize: 20), color: .black)
// or
alert.setTitle(font: .systemFont(ofSize: 20), color: .black)
  • Set and styling message
alert.set(message: "Message", font: .systemFont(ofSize: 16), color: .black)
// or
alert.setMessage(font: .systemFont(ofSize: 16), color: .black)
  • Add button with image
alert.addAction(image: image, title: "Title", color: .black, style: .default) { action in
    // completion handler
}
  • Show Alert
// show alert
alert.show()

// or show alert with options
alert.show(animated: true, vibrate: true) {
    // completion handler
}

Set Content ViewController

When setting your own custom UIViewController into UIAlertController keep in mind to set prefferedContentSize.height of the controller otherwise it will no effect. You can not set prefferedContentSize.width.

let alert = UIAlertController(style: .alert, title: "Title")
let vc = CustomViewController()
vc.preferredContentSize.height = height
alert.setValue(vc, forKey: "contentViewController")
alert.show()

// or
let alert = UIAlertController(style: .alert, title: "Title")
let vc = CustomViewController()
alert.set(vc: vc, height: height)
alert.show()

Pickers

For UX better to use .actionSheet style in UIAlertController when set picker into contentViewController. If you like you can use .alert style as well, buy .actionSheet style is wider and User can see more as well as action button is placing at bottom that also more convenience for User to touch it.

UITextField In native UIAlertController you can only add UITextField to .alert style with default style and you can not change such properties as .borderColor, .borderWidth, .frame.size and so on. But if you make your own UIViewController with UITextField, it will solve all these problems.

One TextField Picker

You can use both styles .alert and .actionSheet of UIAlertController.

let alert = UIAlertController(style: self.alertStyle, title: "TextField")                  
let config: TextField.Config = { textField in
    textField.becomeFirstResponder()
    textField.textColor = .black
    textField.placeholder = "Type something"
    textField.left(image: image, color: .black)
    textField.leftViewPadding = 12
    textField.borderWidth = 1
    textField.cornerRadius = 8
    textField.borderColor = UIColor.lightGray.withAlphaComponent(0.5)
    textField.backgroundColor = nil
    textField.keyboardAppearance = .default
    textField.keyboardType = .default
    textField.isSecureTextEntry = true
    textField.returnKeyType = .done
    textField.action { textField in
        // validation and so on
    }
}              
alert.addOneTextField(configuration: config)
alert.addAction(title: "OK", style: .cancel)
alert.show()

Two TextFields Picker

You can use both styles .alert and .actionSheet of UIAlertController.

let alert = UIAlertController(style: .alert, title: "Login")

let configOne: TextField.Config = { textField in
    textField.left(image: user), color: .black)
    textField.leftViewPadding = 16
    textField.leftTextPadding = 12
    textField.becomeFirstResponder()
    textField.backgroundColor = nil
    textField.textColor = .black
    textField.placeholder = "Name"
    textField.clearButtonMode = .whileEditing
    textField.keyboardAppearance = .default
    textField.keyboardType = .default
    textField.returnKeyType = .done
    textField.action { textField in
        // action with input
    }
}

let configTwo: TextField.Config = { textField in
    textField.textColor = .black
    textField.placeholder = "Password"
    textField.left(image: lock, color: .black)
    textField.leftViewPadding = 16
    textField.leftTextPadding = 12
    textField.borderWidth = 1
    textField.borderColor = UIColor.lightGray.withAlphaComponent(0.5)
    textField.backgroundColor = nil
    textField.clearsOnBeginEditing = true
    textField.keyboardAppearance = .default
    textField.keyboardType = .default
    textField.isSecureTextEntry = true
    textField.returnKeyType = .done
    textField.action { textField in
        // action with input
    }
}
// vInset - is top and bottom margin of two textFields   
alert.addTwoTextFields(vInset: 12, textFieldOne: configOne, textFieldTwo: configTwo)
alert.addAction(title: "OK", style: .cancel)
alert.show()

DatePicker

UIDatePicker does not look very much in .alert style.

let alert = UIAlertController(style: .actionSheet, title: "Select date")
alert.addDatePicker(mode: .dateAndTime, date: date, minimumDate: minDate, maximumDate: maxDate) { date in
    // action with selected date
}
alert.addAction(title: "OK", style: .cancel)
alert.show()

PickerView

Example how to use UIPickerView as contentViewController and change height of the UIAlertController.

let alert = UIAlertController(style: .actionSheet, title: "Picker View", message: "Preferred Content Height")

let frameSizes: [CGFloat] = (150...400).map { CGFloat($0) }
let pickerViewValues: [[String]] = [frameSizes.map { Int($0).description }]
let pickerViewSelectedValue: PickerViewViewController.Index = (column: 0, row: frameSizes.index(of: 216) ?? 0)

alert.addPickerView(values: pickerViewValues, initialSelection: pickerViewSelectedValue) { vc, picker, index, values in
    DispatchQueue.main.async {
        UIView.animate(withDuration: 1) {
            vc.preferredContentSize.height = frameSizes[index.row]
        }
    }
}
alert.addAction(title: "Done", style: .cancel)
alert.show()

Locale Pickers

  • Country Picker

let alert = UIAlertController(style: .actionSheet, message: "Select Country")
alert.addLocalePicker(type: .country) { info in
    // action with selected object
}
alert.addAction(title: "OK", style: .cancel)
alert.show()
  • Phone Code Picker

let alert = UIAlertController(style: .actionSheet, title: "Phone Codes")
alert.addLocalePicker(type: .phoneCode) { info in
    // action with selected object
}
alert.addAction(title: "OK", style: .cancel)
alert.show()
  • Currency Picker

let alert = UIAlertController(style: .actionSheet, title: "Currencies")
alert.addLocalePicker(type: .currency) { info in
    alert.title = info?.currencyCode
    alert.message = "is selected"
    // action with selected object
}
alert.addAction(title: "OK", style: .cancel)
alert.show()

Image Picker

  • Horizontal Image Picker with paging and single selection:
let alert = UIAlertController(style: .actionSheet)
let photos: [UIImage] = images
alert.addImagePicker(
    flow: .horizontal,
    paging: true,
    images: photos,
    selection: .single(action: { [unowned self] image in
        // action with selected image
    }))
alert.addAction(title: "OK", style: .cancel)
alert.show()
  • Vertical Image Picker w/o paging and with multiple selection:
let alert = UIAlertController(style: .actionSheet)
let photos: [UIImage] = images
alert.addImagePicker(
    flow: .vertical,
    paging: false,
    height: UIScreen.main.bounds.height,
    images: photos,
    selection: .multiple(action: { [unowned self] images in
        // action with selected images
    }))
alert.addAction(title: "OK", style: .cancel)
alert.show()

PhotoLibrary Picker

let alert = UIAlertController(style: .actionSheet)
alert.addPhotoLibraryPicker(
    flow: .horizontal,
    paging: true,
    selection: .single(action: { image in
        // action with selected image
    }))
alert.addAction(title: "Cancel", style: .cancel)
alert.show()

ColorPicker

Example how to use UIViewController instantiated from Storyboard with Autolayout as contentViewController in the UIAlertController.

let alert = UIAlertController(style: .actionSheet)
alert.addColorPicker(color: color) { color in
    // action with selected color
}
alert.addAction(title: "Done", style: .cancel)
alert.show()

Contacts Picker

let alert = UIAlertController(style: .actionSheet)
alert.addContactsPicker { contact in
    // action with contact
}
alert.addAction(title: "Cancel", style: .cancel)
alert.show()

Location Picker

let alert = UIAlertController(style: .actionSheet)
alert.addLocationPicker { location in
    // action with location
}
alert.addAction(title: "Cancel", style: .cancel)
alert.show()

Telegram Picker

let alert = UIAlertController(style: .actionSheet)
alert.addTelegramPicker { result in
    switch result {
      case .photo(let assets):
        // action with assets
      case .contact(let contact):
        // action with contact
      case .location(let location):
        // action with location
    }
}
alert.addAction(title: "Cancel", style: .cancel)
alert.show()

TextViewer

let alert = UIAlertController(style: .actionSheet)
alert.addTextViewer(text: .attributedText(text))
alert.addAction(title: "OK", style: .cancel)
alert.show()

Alerts vs. Action Sheets

There are some things to keep in mind when using .actionSheet and .alert styles:

  • Pickers better to use in .actionSheet style.
  • UITextField can be used in both styles.

Installing

Manually

Download and drop /Source folder in your project.

Requirements

  • Swift 4
  • iOS 11 or higher

Authors

Communication

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

License

This project is licensed under the MIT License.

alerts-and-pickers's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alerts-and-pickers's Issues

Storyboard?

This is a superb control! Perhaps you could add an example using a Storyboard? I have a large project, where Alerts-Pickers would need to be incorporated.

Reasons for minimum target iOS 11?

Hello, Thanks for this Marvelous library.

Can you tell the reason, why we require to set minimum target to iOS 11?

And, the Alert/ActionSheet are default one? with modified?

Conflict source

Your lib is great 👍
But it include a lot of view extensions file attached cause conflict with exist extensions in project. I think you should wrap your lib to use it more convenience. Thanks.

UI bugs

Привет, на 7ке (наверное, и на меньших тоже) contacts picker в режиме поиска заезжает выше safe area'и, + ячейки таблицы не уезжают под search texfield, а остаются видны под ним.
Чтобы совсем красиво, стоит поставить оффсет scroll indicator'у ниже кнопки cancel.

Уменьшенные скрины

2018-02-23 23 41 47

2018-02-23 23 41 55

AlertController with textfield not showing

Hi,

Thank you for making this beautiful library available for developpers.
Actually I am trying to use the One TextField Picker, but the alert is not showing and I am getting this error: Attempt to present <UIAlertController: 0x7fa2b21d2400> on <Project.SplashViewController: 0x7fa2b140c560> whose view is not in the window hierarchy!

When I add self.present(alert, animated: true, completion: nil) before alert.show() to solve the problem I am getting another exception: Application tried to present modally an active controller

Did I miss something? Can you help me please

Thank you.

Question: Date picker with custom time periods

Hey,

First of all – thanks for this awesome library!

Quick question: I’d like to create a custom data picker, where the dates are normal ones, but the time consists of only 3 values: All Day, Morning and Afternoon. Can this be achieved with the library?

Thanks!

PhotoLibrayPicker

Can it be used for multiple selections in the same way the image picker does?

Introduction

How can I describe the source file after putting it in the application?
For example, how would you describe how to implement this simple one?
2018-02-17 14 56 21
It is pretty rudimentary content, but please tell me..

Issue with VerticalScrollFlowLayout

Hi,
I am using 'VegaScrollFlowLayout' class to add animation to collectionView items. This works like a charm if I use a fixed itemSize for CollectionView cell with no section header. But If I use any (section header or dynamic itemSize). The CollectionView displayed item with some weird way.
I face these 2 issues while using this class:

  1. When adding section header, and use default FlowLayout. Everything works well. When using 'VerticalScrollFlowLayout', Section Header doesn't display anymore.

  2. If use 'estimatedItemSize' instead of 'itemSize' for dynamic item size. The animation doesn't work properly.
    Let me know If you can help me on this.
    Thanks

Support iOS9

Thanks. It is nice ideas which provide better UX for Picker in iOS.
Can you support iOS 9.0 and above?

Warning: Attempt to present UIAlertController

I have a collection view, in the footer of the collectionView I have a tableView. I'm using a protocol to have a custom cell present the pickerView. I'm getting this error whenever I press the button

PickerViewViewController.swift (line: 43) :: deinit :: has deinitialized 2018-08-01 17:45:08.675531-0700 localSelling[23104:2173373] Warning: Attempt to present <UIAlertController: 0x7ff28b850800> on <UINavigationController: 0x7ff28c00b000> whose view is not in the window hierarchy!

IBinspectables breaking storyboard in Xcode 9.x

I'm using Xcode 9.3 and swift 4.

The IBinspectables on every UIView is breaking my storyboard and causing a ton of issues with my project.

Why are there IBInspectables on every UIView? Seems completely unrelated the functionality of the project.

Can we remove these or make them optional? Seems far too invasive for a simple library addition.
Any feedback or help appreciated. Thanks!!

is it available in iPad ?

i got this error

2018-08-07 15:13:45.663030+0700 playsound[20334:1138125] Error loading /Library/Audio/Plug-Ins/HAL/Digidesign CoreAudio.plugin/Contents/MacOS/Digidesign CoreAudio:  dlopen(/Library/Audio/Plug-Ins/HAL/Digidesign CoreAudio.plugin/Contents/MacOS/Digidesign CoreAudio, 262): no suitable image found.  Did find:
	/Library/Audio/Plug-Ins/HAL/Digidesign CoreAudio.plugin/Contents/MacOS/Digidesign CoreAudio: mach-o, but not built for iOS simulator
2018-08-07 15:13:45.663232+0700 playsound[20334:1138125] Cannot find function pointer NewDigiCoreAudioPlugIn for factory <CFUUID 0x600000239c00> B8A063B5-2F3D-444A-88CB-D0B8F1B22042 in CFBundle/CFPlugIn 0x7fd33ff071e0 </Library/Audio/Plug-Ins/HAL/Digidesign CoreAudio.plugin> (bundle, not loaded)
2018-08-07 15:13:46.157918+0700 playsound[20334:1138125] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController (<UIAlertController: 0x7fd34400b200>) of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem.  If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.'
*** First throw call stack:
(
	0   CoreFoundation                      0x0000000106f731e6 __exceptionPreprocess + 294
	1   libobjc.A.dylib                     0x0000000102db8031 objc_exception_throw + 48
	2   UIKit                               0x0000000104779043 -[UIPopoverPresentationController presentationTransitionWillBegin] + 3168
	3   UIKit                               0x0000000103c0c4f4 __71-[UIPresentationController _initViewHierarchyForPresentationSuperview:]_block_invoke + 2537
	4   UIKit                               0x0000000103c09c69 __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 436
	5   UIKit                               0x0000000103aa04b3 _runAfterCACommitDeferredBlocks + 318
	6   UIKit                               0x0000000103a8f71e _cleanUpAfterCAFlushAndRunDeferredBlocks + 388
	7   UIKit                               0x0000000103abdea5 _afterCACommitHandler + 137
	8   CoreFoundation                      0x0000000106f15607 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
	9   CoreFoundation                      0x0000000106f1555e __CFRunLoopDoObservers + 430
	10  CoreFoundation                      0x0000000106ef9b81 __CFRunLoopRun + 1537
	11  CoreFoundation                      0x0000000106ef930b CFRunLoopRunSpecific + 635
	12  GraphicsServices                    0x000000010c07aa73 GSEventRunModal + 62
	13  UIKit                               0x0000000103a95057 UIApplicationMain + 159
	14  playsound                           0x00000001020680d7 main + 55
	15  libdyld.dylib                       0x0000000109ad1955 start + 1
	16  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 


my code in swift

//
//  Chapter1_25.swift
//  playsound
//
//  Created by student on 8/7/18.
//  Copyright © 2018 harvestidea. All rights reserved.
//

import UIKit
import AVFoundation
import RLBAlertsPickers

class Chapter1_25: UIViewController, AVAudioPlayerDelegate {

    var conversationSound: AVAudioPlayer = AVAudioPlayer()
    var currentColor = UIColor.black
    
    var color = UIColor.black
    
    func audioPlay() {
        
        let path = Bundle.main.path(forResource: "p4highnote.mp3", ofType: nil)!
        let url = URL(fileURLWithPath: path)
        do {
            conversationSound = try AVAudioPlayer(contentsOf: url)
            conversationSound.delegate = self
            conversationSound.play()
        } catch {
            print(error)
        }
        
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        audioPlay()
        
        let alert = UIAlertController(style: .actionSheet, message: "Select Country")
        alert.addLocalePicker(type: .country) { info in
            // action with selected object
        }
        alert.addAction(title: "OK", style: .cancel)
        alert.show()
        
    }
}

Silly picker logic

Picker returns a lot of params on each click/scroll action - even when it is not necessary. And in the same time it returns NOTHING on custom actions!
What if an user selects something and presses "Done" button and only thenI want to get the data? For example - when picking of the value should cause network requests.
According to your silly logic I must cache the data user selects on each scroll action and get them at the end. Of course you could provide values, index and etc properties/methods but you declared them private

Bug in textField with alert

I found a bug when i use oneTextField or tow
.. i try to get a text from text feild
It’s return nil so how i can fix this issue
Temporarily i use app life cycle func in OneTextfieldViewController viewWillDisappea(..){
Super...
Print(self.textField.text)
}

ImagePicker images from Library?

Could you suggest a way to select images from the device library while maintaining the integrity of your control?

Many thanks

How to remove unnecessary permissions

I've tried to upload my app to the app store to start the TestFlight and it got rejected and got this message

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSContactsUsageDescription key with a string value explaining to the user how the app uses this data.

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data.

I figure that your library has some calls to these functionalities since I do not use them. Is there a way to fix it, I do not want to request this access to my users

Thread 1: Fatal error: cannot increment beyond endIndex

in the simulator works fine, but in the devices appear in this line the error:

subscript (r: Range<Int>) -> String {
    let start = index(startIndex, offsetBy: r.lowerBound)
    let end = index(startIndex, offsetBy: r.upperBound) <- Thread 1: Fatal error: cannot....
    return String(self[Range(start ..< end)])
}

location picker POI tap

For the location picker can you allow users to tap te POI icons instead of only being able to just search I know the map does not have a func but it would be cool for this project.

[Request]UIView

Hi, is it possible to implement a custom UIView that is empty?

Private API?

Hi,
I noticed this code users the function setValue:ForKey: which is considered private API. Other than the fact it may break in future iOS releases, does anyone know if Apple is alright with not rejecting it?

TextField crash

The TextField needs to be in the window heirarchy in order for it not to crash

Example build error in Xcode10, together with crash

Build Error:

location:

Alert&Pickers/Source/Extensions/String+Extension.swift

line 16:

return String(self[Range(start ..< end)])

Xcode said

Cannot invoke initializer for type 'Range<_>' with an argument list of type '(Range<String.Index>)'

After I modified it to the following code, the error disappeared.

let range = Range.init(uncheckedBounds: (lower: start, upper: end))    
return String(self[range])

App Crash:

When clicking Contacts Picker:

Alert&Pickers/Source/Extensions/String+Extension.swift // line 15
Thread 1: Fatal error: Can't advance past endIndex

***** 2018-07-19 02:15:39 +0000 ViewController.swift (line: 413) :: collectionView(_:didSelectItemAt:) :: selected alert - Country Picker

***** 2018-07-19 02:15:41 +0000 LocalePickerViewController.swift (line: 104) :: deinit :: has deinitialized

***** 2018-07-19 02:15:44 +0000 ViewController.swift (line: 413) :: collectionView(_:didSelectItemAt:) :: selected alert - Contacts Picker

***** 2018-07-19 02:15:44 +0000 ContactsPickerViewController.swift (line: 152) :: checkStatus(completionHandler:) :: status = CNAuthorizationStatus

Photo Library Picker Bug / Issue

Hi folks,
when I open "Photo Library Picker" and close it before the images loaded / appears, the app crash because of deallocated picker.

Attempted to read an unowned reference but the object was already deallocated

Have anyone else this problem too?

Happy for a hint. :-)

XIB instead of storyboard.

I want to use this library in my project but i am using XIB in my project so can you please do it with XIB rather then storyboard.Waiting for your responce.

Error: init(coder:) has not been implemented"

App works fine when this is in app delegate:
window?.rootViewController = UINavigationController(rootViewController: ViewController())

When it's not and I try to present it, I get these errors:

  1. Fatal error: init(coder:) has not been implemented

  2. Warning: Attempt to present <UIAlertController: 0x108839200> on <MainVC: 0x105055e00> whose view is not in the window hierarchy!

webview in alert

I want add a vebview in alert,
let title = "Privacy Policy"
let message = "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)

        let subview = alert.view.subviews.first
        let bgview = subview?.subviews.first
        bgview?.backgroundColor = UIColor(red: 255, green: 255, blue: 255)
        bgview?.layer.cornerRadius = 10
        print(alert.view.frame.size.width)

        alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: nil))
        alert.addAction(UIAlertAction(title: "No", style: .cancel, handler: nil))
        
        
        
        let web = UIWebView(frame: CGRect(x: 0, y: 50, width: alert.view.bounds.size.width * 0.7, height: self.view.frame.size.height * 0.70 - 95))

        let requestURL = NSURL(string: "http://google.com");
        let request = NSURLRequest(url: requestURL! as URL);
        web.loadRequest(request as URLRequest);
        
        web.scalesPageToFit = true
        web.loadRequest(request as URLRequest)
        alert.view.addSubview(web)
        
        self.present(alert, animated: true)

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.