2014-10-04 14:02:03 +02:00
|
|
|
//
|
|
|
|
// ViewController.m
|
|
|
|
// ModalPresentation
|
|
|
|
//
|
|
|
|
// Created by Wojciech Nagrodzki on 04/10/2014.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "ViewController.h"
|
2014-10-04 14:03:21 +02:00
|
|
|
#import "SampleViewController.h"
|
2014-10-04 14:04:08 +02:00
|
|
|
#import "UIViewController+NGModalPresentation.h"
|
2014-10-04 14:02:03 +02:00
|
|
|
|
2014-10-04 14:03:21 +02:00
|
|
|
|
|
|
|
@interface ViewController () <SampleViewControllerDelegate>
|
2014-10-04 14:02:03 +02:00
|
|
|
|
|
|
|
@end
|
|
|
|
|
2014-10-04 14:03:21 +02:00
|
|
|
|
2014-10-04 14:02:03 +02:00
|
|
|
@implementation ViewController
|
|
|
|
|
2014-10-04 14:03:21 +02:00
|
|
|
#pragma mark - IBActions
|
|
|
|
|
|
|
|
- (IBAction)presentModalViewControllerButtonTapped:(id)sender
|
|
|
|
{
|
|
|
|
SampleViewController * sampleViewController = [[SampleViewController alloc] init];
|
2014-10-04 14:04:08 +02:00
|
|
|
sampleViewController.preferredContentSize = CGSizeMake(320, 640);
|
2014-10-04 14:03:21 +02:00
|
|
|
sampleViewController.delegate = self;
|
2014-10-04 14:04:08 +02:00
|
|
|
[self ng_presentViewController:sampleViewController animated:YES completion:nil];
|
2014-10-04 14:02:03 +02:00
|
|
|
}
|
|
|
|
|
2014-10-04 14:03:21 +02:00
|
|
|
#pragma mark - SampleViewControllerDelegate
|
|
|
|
|
|
|
|
- (void)sampleViewControllerRequiredDismiss:(SampleViewController *)sampleViewController
|
|
|
|
{
|
|
|
|
[self dismissViewControllerAnimated:YES completion:nil];
|
2014-10-04 14:02:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@end
|