forked from rnystrom/TransitionExample
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCodeModalController.m
More file actions
36 lines (27 loc) · 1.22 KB
/
Copy pathCodeModalController.m
File metadata and controls
36 lines (27 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// CodeModalController.m
// TransitionExample
//
// Created by Ryan Nystrom on 9/26/13.
// Copyright (c) 2013 Ryan Nystrom. All rights reserved.
//
#import "CodeModalController.h"
@interface CodeModalController ()
@end
@implementation CodeModalController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor colorWithRed:231/255.f green:15/255.f blue:36/255.f alpha:1];
UIButton *removeButton = [UIButton buttonWithType:UIButtonTypeCustom];
removeButton.frame = CGRectMake(281, 474, 206, 55);
removeButton.backgroundColor = [UIColor colorWithWhite:1 alpha:0.2];
[removeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[removeButton addTarget:self action:@selector(onRemoveButton:) forControlEvents:UIControlEventTouchUpInside];
[removeButton setTitle:@"Remove Modal" forState:UIControlStateNormal];
removeButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
[self.view addSubview:removeButton];
}
- (void)onRemoveButton:(id)sender {
[self dismissViewControllerAnimated:YES completion:nil];
}
@end