Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.77 KB

README.md

File metadata and controls

50 lines (33 loc) · 1.77 KB

UGDAlertView

CI Status Version License Platform

Usage

Use similar code in your ciew controller to show a custom call-to-action alert view over your controller content:

UGDAlertViewController* actionVC = [[UGDAlertViewController alloc] initWithTitle:@"Alert title" 
                                                                            text:@"Want to use custom alert view with call to action?" 
                                                                            icon:nil 
                                                                     actionTitle:@"Sure" 
                                                                        negative:@"No, thanks"];

[actionVC setMargin:UIEdgeInsetsMake(self.topLayoutGuide.length, 0, self.bottomLayoutGuide.length, 0)];

[actionVC showInViewController:self withCompletion:^(BOOL accepted) {
    // your code here
    // (accepted == YES) if user pressed the call to action button

    // remove alert view
    [actionVC hideAnimated:YES];
}];

Requirements

iOS 7 and later

Installation

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

pod "UGDAlertView"

Author

Afinello

License

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