Giter Site home page Giter Site logo

mindinventory / trendingcustomalert Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 5.0 4.16 MB

You can use a ready-made custom alert controller.

Home Page: https://www.mindinventory.com/iphone-application-development.php

License: MIT License

Swift 100.00%
alert custom swift ios trending-topics custome-alert iphone terms-and-conditions webview photoviewer

trendingcustomalert's Introduction

Trending Custom Alert: You can use a custom trending alert for more better app UI. Very easy to use. โœ“

Description

This is a custom alert with different customization options which enhance the alert view with animation. User can add custom image at top, apply corner radius on alert view and buttons. User can able to apply custom colour and title for buttons.

There is custom three button action sheet with Banner image and title name with icon. User can able to customise by their own requirements.

There are custom image as well as webView popup. In which user can able to open any image and web url.

Sample

video

Table of content

UI Controls

  • Label
  • Button
  • ImageView
  • WebView

Features

Alert

  • Add custom image at top with hide/show option.
  • Custom corner radius for alert view and buttons.
  • Custom colour and title for buttons.

ActionSheet

  • Custom Banner image on action sheet.
  • Custom title with icon.
  • Hide/show Cancel button as well as Banner.

PopupView

  • Custom Title with Image and WebView popup.

Usage

  • Download and run source in your Xcode.

  • On action event implement showCustomAlert() which give you bunch of different customization option related to alert, whatever you want to customize just pass data in the method. You can also check different customization in the source.

showCustomAlert(title: "LogOut",
                message: "Are you sure you want to LogOut? ",
                alertType: .twoButton(title1: "No", title2: "Yes"),
                icon: "user",
                alertRadius: 70,
                btnRadius: 25,
                customCorners: [.layerMinXMinYCorner, .layerMaxXMaxYCorner])
  • Here we have different options for Alert:

    • title: Custom title.
    • message: Custom message.
    • alertType: We can choose oneButton or towButton alert, also we can apply custom button title and colour.
    • icon: We can add icon on top of the alert.
    • alertRadius: It will apply radius on main alertview.
    • btnRadius: It will apply radius on buttons.
    • customCorners: We can customize any corner of alertview. It will apply on alertview as well as on buttons.
  • On action event implement showThreeActionButtonPicker() which provides you customization option related to actionsheet, in which you can add custom banner on the top of action sheet, whatever you want to customize just pass data in the method. You can also check different customization in the source.

showThreeActionButtonPicker(title1: "Help", btnIcon1: "ic_help_circle",
                            title2: "Info", btnIcon2: "ic_info", btnStyle2: .default,
                            title3: "Logout", btnIcon3: "ic_logout", btnStyle3: .destructive,
                            banner: "gender", isShowBanner: true,
                            isShowCancle: true, controller: self)
  • Here we have different options for Actionsheet:

    • title: Custom title.
    • btnIcon: Custom icone for button.
    • btnStyle: We can give .default, .destructive style for button.
    • banner: We can add custom banner on actionsheet.
    • isShowBanner: Hide/Show banner.
    • isShowCancle: Hide/Show Cancle button.
    • controller: Need to pass self controller.
  • For Custom popup, pass data title, image or web url to ImageAlertVC. As you can see in source.

  • Web popup view: We can pass name and webUrl in the url, it will load in a popup view.

if let popupViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "ImageAlertVC") as? ImageAlertVC {
            
    popupViewController.name = "Terms & Conditions"
    popupViewController.url = URL(string: "https://www.apple.com")
    self.present(popupViewController, animated: true)
}
  • Image popup view: We can pass name and image in the imageName, it will load in a popup view.
if let popupViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "ImageAlertVC") as? ImageAlertVC {
            
    popupViewController.name = "Burj Al Arab"
    popupViewController.imageName = "burj _al_arab"
    self.present(popupViewController, animated: true)
}

By Apple

  • Xcode 12
  • iOS 11+

LICENSE!

GenerateTrendingCustomAlert is MIT-licensed.

trendingcustomalert's People

Contributors

ashishpatelmi avatar rushabh-96 avatar

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

Watchers

 avatar  avatar  avatar  avatar

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.