Skip to content

grawson/GRCustomAlert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GRCustomAlert

CI Status Version License Platform

Screenshot

Custom iOS Alert

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

//initialize the custom view controller
let vc = CustomAlertViewController()

//Customize alert properties here

//add the view controller and view
addChildViewController(vc)
view.addSubview(vc.view)

Customization

//Text
vc.alert.titleText =           //title text
vc.alert.messageText =         //message text
vc.alert.titleFont =           //title font
vc.alert.messageFont =         //message font

//Colors
vc.alert.viewColor =           //background color of the alert
vc.alert.accentColor =         //color of text and exclamation mark

//Frame
vc.alert.frameWidth =          //width of the alert view
vc.alert.contentHeight =       //height of the alert view
vc.alert.offset =              //Open space between the content and the button
vc.alert.actionHeight =        //height of the button
vc.alert.rounded =             //radius of button's rounded corners

//Animation
vc.alert.animation =           //Animation type for presentation and dismissal of alert

Installation

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

pod "GRCustomAlert"

Author

Gavi Rawson, grawson2@jhu.edu

License

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