NGModalPresentation/ModalPresentation/ViewController.m

37 lines
777 B
Mathematica
Raw Normal View History

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