-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathViewController.m
More file actions
38 lines (27 loc) · 858 Bytes
/
ViewController.m
File metadata and controls
38 lines (27 loc) · 858 Bytes
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
37
38
//
// ViewController.m
// readText
//
// Created by Ricardo Ruiz on 8/14/14.
// Copyright (c) 2014 iOS Apps Development. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
@synthesize input;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
-(IBAction)button:(id)sender {
// Dismiss Keyboard
[input resignFirstResponder];
// Loads text from textfield into string
NSString *userInput = input.text;
// Create alertview pass in string "userInput"
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Title" message:[NSString stringWithFormat:@"User typed: %@",userInput] delegate:self cancelButtonTitle:@"Dismiss" otherButtonTitles: nil];
[alert show];
}
@end