• Stars
    star
    139
  • Rank 262,954 (Top 6 %)
  • Language
    Swift
  • License
    Apache License 2.0
  • Created over 5 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple and easy alerts to use instead of default AlertController. Separate Xib is provided to customize as pr your need. Callbacks are easily handled by using Closures.

KCustomAlert

Screenshot 2019-12-09 at 6 41 13 PM

GitHub pages URl here: https://krishnads.github.io/KCustomAlert/.

Let’s not use the default AlertController in our upcoming iOS Apps because it doesn’t feel awesome. To make the alert look better and customised, I just created Common Repo which can be used very easily for all kind of Alerts. So, let’s use this from now on.

Simple and easy alerts to use instead of default AlertController.

Separate Xib is provided to customize as per your need.

Integrate Framework file without writing a single line of code.

Callbacks are easily handled by using Closures.

Demo Video

Screenshots

Usage - It's simpler than anything: You can use it in two ways

1. Use Framework:

Simply Clone/Download the repository and drag KAlert.framework file into your project.

import KAlert in your file where you want to use it.And That's it..!

2. Use Code:

Simply Drag and drop CustomAlert folder in your project. that's it...

Use following samples to use this simple alert

For Simple one:

self.showCustomAlertWith(
    message: "This is a simple alert with a logo and message",
    descMsg: "",
    itemimage: nil,
    actions: nil)

Simple one with callback action on OK button:

let actionYes: () -> Void = { (
    print("tapped OK")
) }
self.showCustomAlertWith(
    okButtonAction: actionYes, // This is optional
    message: "This is a simple alert with a logo and message",
    descMsg: "",
    itemimage: nil,
    actions: nil)

For More Content:

let actionYes : [String: () -> Void] = [ "YES" : { (
        print("tapped YES")
) }]
let actionNo : [String: () -> Void] = [ "No" : { (
    print("tapped NO")
) }]
let arrayActions = [actionYes, actionNo]

self.showCustomAlertWith(
    message: "This is an alert with a logo, message, additional icon, description, and 2 buttons with handlers",
    descMsg: "your description goes here. Change font size from XiB file.",
    itemimage: #imageLiteral(resourceName: "icon"),
    actions: arrayActions)

Contact Me:

Krishna Datt Shukla

Application Development Specialist

Accenture Solutions Pvt. Ltd.

Skype: krishnads03

Email: [email protected]

More Repositories

1

KPassCode

A simple StackView to be used for Passcode or OTP fields. Completely customisable with separate classes and very easy to use. Just Drag and drop with 2 lines of code.
Swift
43
star
2

Animations-in-iOS

Many kind of animations in single project here...
Objective-C
36
star
3

CustomeLocationPicker

Here is the customized control to pick any address from Google Map just like UBER or LYFT Apps You can get complete Address, City, Country, Latitude and Longitude.
Objective-C
35
star
4

KGoogleDirectionWithPolyLine

Getting direction of a route and drawing polyline on map using google sdk.
Objective-C
16
star
5

KVideoPlayer

Play Multiple local/URL videos using AVPlayer like facebook, instagram. On scrolling horizontally, previous video will pause and the current will start playing smoothly.
Swift
16
star
6

DynamicTypeSupportInSwift

An easy control which support dynamic typing for both system and custom fonts. Dynamic type is changing the font size of your app when user changes the font size of system from the settings.
Swift
15
star
7

KScrollableTopMenuDemo

A very simple demo with menu bttons on top of the view which can be scrolled very easily
Objective-C
13
star
8

KImageEdit

You can do drawing on image and can add text overlay on image
Objective-C
13
star
9

KColorPicker

A beautiful Color Picker and Text Drawing like Facebook App on Image with UNDO, REDO and RESET options and generate Edited Image as output.
Objective-C
10
star
10

KConfigurableCollectionViewDemo

You can fully configure your collection view to handle number of items in a row.
Objective-C
8
star
11

LineAndPieChartDemo

Use BeizarePath to draw a simple Pie chart
Objective-C
7
star
12

KOutlookCalanderDemo

A Control which can be used to access Outlook calendar events and also can add new events to Outlook Calendar. Fetching Events and Adding events is performing by code only. No UI is there. So, please analyze code to get to know the same.
Objective-C
5
star
13

KPhotoAlbum

A control for iOS 9+ which list out all the album names and their images in a managed way.
Objective-C
3
star
14

RxSwift

Taken from Udemy. Basics of RxSwift Concepts with examples. Easy to understand. Very good for beginners.
Swift
2
star
15

SocialLoginiOS

Login using twitter, facebook, google, yahoo, etc...
Objective-C
1
star
16

SwiftUIBasics

Different Basic examples of SwiftUI. I will keep updating this.
Swift
1
star
17

KStrechechableImageInTable

Strech image for chat table
Swift
1
star
18

SwiftDemo

Multiple demo(s) in swift
Swift
1
star
19

TDD

Test Driven Development
Swift
1
star