All Projects → vitormesquita → Malert

vitormesquita / Malert

Licence: mit
Custom alert View to iOS applications

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Malert

Popupdialog
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style.
Stars: ✭ 3,709 (+1030.79%)
Mutual labels:  dialog, alertview
Customalertviewdialogue
Custom AlertView Dialogue is the world's most advanced alert view library. Custom AlertView Dialogue includes simple message popups, confirmation alerts, selector popups, action sheet bottom menus, and input/feedback contact forms.
Stars: ✭ 100 (-69.51%)
Mutual labels:  dialog, alertview
Alertonboarding
A simple and attractive AlertView to onboard your users in your amazing world.
Stars: ✭ 766 (+133.54%)
Mutual labels:  dialog, alertview
Alertview
A library to create simple alerts easily with some customization.
Stars: ✭ 222 (-32.32%)
Mutual labels:  dialog, alertview
Xfdialogbuilder
A configable dialog for IOS. Developer can custom mask layer,window size,UI theme,text content,font,layout content,push and pop Animation.
Stars: ✭ 64 (-80.49%)
Mutual labels:  dialog, alertview
BalloonPopup
Forget Android Toast! BalloonPopup displays a round or squared popup and attaches it to a View, like a callout. Uses the Builder pattern for maximum ease. The popup can automatically hide and can persist when the value is updated.
Stars: ✭ 32 (-90.24%)
Mutual labels:  dialog, alertview
Longpresspopup
Make a Popup appear long pressing on a view and handle drag-release events on its elements
Stars: ✭ 256 (-21.95%)
Mutual labels:  dialog
Gonorth
GoNorth is a story and content planning tool for RPGs and other open world games.
Stars: ✭ 289 (-11.89%)
Mutual labels:  dialog
bootstrap-modal-wrapper
Bootstrap modal factory that supports dynamic modal creations and nested stacked modal features.
Stars: ✭ 18 (-94.51%)
Mutual labels:  dialog
Razor.SweetAlert2
A Razor class library for interacting with SweetAlert2
Stars: ✭ 98 (-70.12%)
Mutual labels:  dialog
Vodal
A Vue modal with animations.
Stars: ✭ 312 (-4.88%)
Mutual labels:  dialog
Android Loading Dialog
这个是我在泡网看见的一个等待的dialog
Stars: ✭ 297 (-9.45%)
Mutual labels:  dialog
Md Date Time Picker
An implementation of Material Design Picker components in vanilla CSS, JS, and HTML
Stars: ✭ 272 (-17.07%)
Mutual labels:  dialog
Ngx Smart Modal
Modal/Dialog component crafted for Angular
Stars: ✭ 256 (-21.95%)
Mutual labels:  dialog
Rakugo Archive
Framework (inspired by Ren'Py) for story driven games in Godot.
Stars: ✭ 291 (-11.28%)
Mutual labels:  dialog
SlidingUpMenu
🚀 A very customizable library that allows you to present menu items (from menu resource and/or other sources) to users as a bottom sheet.
Stars: ✭ 26 (-92.07%)
Mutual labels:  dialog
Artdialog
经典的网页对话框组件
Stars: ✭ 3,110 (+848.17%)
Mutual labels:  dialog
hcn
Hybrid Code Networks https://arxiv.org/abs/1702.03274
Stars: ✭ 81 (-75.3%)
Mutual labels:  dialog
Rflutter alert
RFlutter Alert is super customizable and easy-to-use alert / popup dialog library for Flutter. You may create reusable alert styles or add buttons as much as you want with ease.
Stars: ✭ 271 (-17.38%)
Mutual labels:  dialog
Mbtileparser
MBTileParser is a game engine written using pure UIKit in the days before SpriteKit.
Stars: ✭ 297 (-9.45%)
Mutual labels:  dialog

Platform License Version

A simple, easy and custom iOS UIAlertView written in Swift

Malert came to facilitates custom alert views as UIAlertController. Malert allows you to personalize your alertView so that it matches your application layout

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

Requirements

  • Xcode 10.0+
  • Swift 5.0+

Versioning

  • Swift 3.x: 1.1.5
  • Swift 4.0: 2.0~3.0
  • Swift 4.2: 3.1*
  • Swift 5: 4.0

Installation

Pod

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

pod 'Malert'

Manually

If you don't use any dependency managers, you can integrate Malert in your project manually just adding the files which contains Malert Classes.

Congratulations!!! You can run Malert without any dependency managers!

Example

This is a simple example. If you want to know more, check the app Example cause There are more than 10 customizated Malerts.

Malert with custom view

import Malert

...

let view = ExampleView.instantiateFromNib()
let malert = Malert(customView: view)

let action = MalertAction(title: "OK")
action.tintColor = UIColor(red:0.15, green:0.64, blue:0.85, alpha:1.0)

malert.addAction(action)

present(malert, animated: true)

How to create actions

To add buttons to your malert There is a function called addAction that you need to provide a MalertAction object to build customizable buttons.

let malert = ... 
   	 
let action = MalertAction(title: "Take the tour") {
   print("Closure called when action was clicked")
}

action.cornerRadius = 8
action.tintColor = .white
action.backgroundColor = UIColor(red:0.38, green:0.76, blue:0.15, alpha:1.0)

malert.addAction(action)
	
...

For more details check the examples

Customize

Malert provides some attributes to cutomize it:

/* Animation attr */
public var presentDuration: TimeInterval
public var dismissDuration: TimeInterval
public var animationType: MalertAnimationType

/* Container attr */
public var margin: CGFloat
public var cornerRadius: CGFloat
public var backgroundColor: UIColor?

/* Title attr */
public var titleFont: UIFont
public var textColor: UIColor
public var textAlign: NSTextAlignment

/* Buttons attr */
public var buttonsHeight: CGFloat
public var separetorColor: UIColor
public var buttonsSpace: CGFloat
public var buttonsSideMargin: CGFloat
public var buttonsBottomMargin: CGFloat
public var buttonsAxis: UILayoutConstraintAxis

It is very simple how you can do that. Just change malert's attributes before present it:

let exampleView = ExampleView()

let alert = Malert(customView: exampleView)

//customizing your malert

alert.animationType = .modalRight
alert.buttonsSideMargin = 60
alert.buttonsBottomMargin = 16
alert.buttonsAxis = .horizontal
alert.separetorColor = .clear

Customize actions

Malert enable some attributes to customize each action:

public var tintColor: UIColor
public var backgroundColor: UIColor
public var cornerRadius: CGFloat
public var borderColor: UIColor
public var borderWidth: CGFloat

If you need more attributes to customize it, please let us know, create an issue or a pull request.

Contributing

If you think that we can do the Malert more powerful please contribute with this project. And let's improve it to help other developers.

Create a pull request or let's talk about something in issues. Thanks a lot.

Author

Vitor Mesquita, [email protected]

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].