AlertView
  • October 31, 2023

AlertView A pop-up framework, Can be simple and convenient to join your project.

Warning content


Installation


  • Depend on the project Masonryand HexColors Import #import "Masonry.h" #import "HexColors.h"
  • Import the main header file:#import "RAlertView.h"

CocoaPods


pod 'RAlertView'

Preview AlertStyle


typedef NS_ENUM(NSInteger,AlertStyle) {
SimpleAlert = 0,
ConfirmAlert,
CancelAndConfirmAlert,
};

Preview AlertTheme


RAlertView *alert = [[RAlertView alloc] initWithStyle:CancelAndConfirmAlert];
alert.theme =[UIColor redColor];

Some feature set


  • Click on the background and any position hidden pop-up window

alert.isClickBackgroundCloseWindow = YES;

  • Set bounced content text center

alert.contentTextLabel.text =@”SimpleAlert \nAlertView A pop-up framework, Can be simple and convenient to join your project”;

alert.contentTextLabel.attributedText = [TextHelper attributedStringForString:@”AlertView A pop-up framework, Can be simple and convenient to join your project” lineSpacing:5];

init RAlertView


  • initWithStyle AlertStyle

RAlertView *alert = [[RAlertView alloc] initWithStyle:SimpleAlert];

  • initWithStyle AlertStyle and width

RAlertView *alert = [[RAlertView alloc] initWithStyle:SimpleAlert width:0.8];

SimpleAlert


 

RAlertView *alert = [[RAlertView alloc] initWithStyle:SimpleAlert width:0.8];
alert.isClickBackgroundCloseWindow = YES;
alert.contentTextLabel.text =@”SimpleAlert \nAlertView A pop-up framework, Can be simple and convenient to join your project”;

ConfirmAlert


 

RAlertView *alert = [[RAlertView alloc] initWithStyle:ConfirmAlert];
alert.headerTitleLabel.text = @”ConfirmAlert”;
alert.contentTextLabel.attributedText = [TextHelper attributedStringForString:@”AlertView A pop-up framework, Can be simple and convenient to join your project” lineSpacing:5];
[alert.confirmButton setTitle:@”Ok” forState:UIControlStateNormal];
alert.confirm = ^(){
NSLog(@”Click on the Ok”);
};

CancleAndConfirmAlert


 

RAlertView *alert = [[RAlertView alloc] initWithStyle:CancelAndConfirmAlert];
alert.headerTitleLabel.text = @”CancelAndConfirmAlert”;
alert.contentTextLabel.attributedText = [TextHelper attributedStringForString:@”AlertView A pop-up framework, Can be simple and convenient to join your project” lineSpacing:5];;
[alert.confirmButton setTitle:@”Ok” forState:UIControlStateNormal];
[alert.cancelButton setTitle:@”Cancel” forState:UIControlStateNormal];
alert.confirm = ^(){
NSLog(@”Click on the Ok”);
};
alert.cancel = ^(){
NSLog(@”Click on the Cancel”);
};

GitHub


View Github

#framwork #ios #swift #uialertview
YOU MIGHT ALSO LIKE...
ACarousel

A carousel view for SwiftUI

Sparklines for macOS, iOS and tvOS

A lightweight sparkline component, supporting Swift, SwiftUI, macCatalyst and Objective-C.     What is a sparkline? A sparkline is a very ...

Light Chart

LightChart is a lightweight SwiftUI package with line charts implementation. You can use it when you need only a chart that will perfectly ...

SwiftUICharts

Swift package for displaying charts effortlessly. V2 Beta is here 🎉🎉🎉 V2 focuses on providing a strong and easy to ...

SwiftUI BarChart

Lightweight and easy to use SwiftUI chart library for all Apple platforms