Follow me: @vaberer
I like ★. Do not forget to ★ this project.
A modal window for chaning text with custom transitions. Adjusted for all iOS screen sizes and landscape mode.
Custom Modal Abstract Window with UITextfield input and custom transitions. Modal window is designed to call the whole controller, set title, textfield text and new value is returned by calling delegate.
Installation
Copy the controller from the storyboard to your project.
Copy files AwesomeModalVC.h
, AwesomeModalVC.m
and PVAnimator.h
, PVAnimator.m
Calling the controller and setting values:
UIStoryboard *storyboard = self.storyboard;
AwesomeModalVC *controller = (AwesomeModalVC *)[storyboard instantiateViewControllerWithIdentifier:@"AwesomeModalVC"];
controller.delegateEdit = self;
controller.textFieltText = @"Patrik Vaberer";
controller.desc = @"Change your name";
controller.identificator = @(2);
controller.modalPresentationStyle = UIModalPresentationCustom;
controller.transitioningDelegate = controller;
[self presentViewController:controller animated:YES completion:nil];
identificator
property is just for your own purposes. The same value will be returned in the delegate method.
Calling AwesomeModalDelegate
delegate:
- (void)didDismissAwesomeModalWithNewValue:(NSString *)newValue identificator:(id)identificator {
//callback when modal window is dismissed by pressing OK button
}
Patrik Vaberer, patrik.vaberer@gmail.com
LinkedIn
Blog
AwesomeModal is available under the MIT license. See the LICENSE file for more info.