JTAlertView is the new wonderful dialog/HUD/alert kind of View.
JTAlertView is the new wonderful dialog/HUD/alert kind of View. It was also designed to cover user’s needs during customization. Created with delightful combination of image, parallax and pop effects, JTAlertView improves your user experience.
There are two ways to add the JTAlertView library to your project. Add it as a regular library or install it through CocoaPods.
pod 'JTAlertView'
You may also quick try the example project with
pod try JTAlertView
Library requires target iOS 7.0 and above
Works in both - Portrait and Landscape modes
initWithTitle:andImage:
OR class method alertWithTitle:andImage:
to initialize.overlayColor
to customize the JTAlertView.addButtonWithTitle:action:
show
and hide
methods to handle displaying.JTAlertView *alertView = [[JTAlertView alloc] initWithTitle:@"You are wonderful" andImage:image];
self.alertView.size = CGSizeMake(280, 230);
[self.alertView addButtonWithTitle:@"OK" style:JTAlertViewStyleDefault action:^(JTAlertView *alertView) {
[alertView hide];
}];
[self.alertView show];
You must setup size
property or the default will be used. popAnimation
is visible while displaying and if you tap on the dialog. The overlayColor
above given image and decent titleShadow
make title better readable. The backgroundShadow
creates decent shadow under the alertView. The font
property (it’s style
and size
) is applied to title and buttons (style
only). To customize particular buttons, use font
parameter in buttons adding methods (see below).
@property (nonatomic, assign) CGSize size;
@property (nonatomic, assign) bool popAnimation;
@property (nonatomic, assign) bool parallaxEffect;
@property (nonatomic, strong) UIColor *overlayColor;
@property (nonatomic, strong) UIFont *font;
@property (nonatomic, strong) UIColor *titleColor;
@property (nonatomic, assign) bool titleShadow;
@property (nonatomic, assign) bool backgroundShadow;
You can setup button’s title
, actionBlock
, style
(similar to UIAlertAction
styles), controlEvents
and font
if needed.
- (void)addButtonWithTitle:action:
- (void)addButtonWithTitle:style:action:
- (void)addButtonWithTitle:style:forControlEvents:action:
- (void)addButtonWithTitle:font:style:forControlEvents:action:
You can show JTAlertView withCompletion
block, in specific superview
, animated
and hide it also with delay
.
- (void)show
- (void)showInSuperview:withCompletion:animated:
- (void)hide
- (void)hideWithCompletion:animated:
- (void)hideWithDelay:animated:
This library is open-sourced by Jakub Truhlar.
The MIT License (MIT)
Copyright © 2015 Jakub Truhlar