summaryrefslogtreecommitdiff
path: root/ios/iosremote/iosremote/WalkThroughPageViewController.m
blob: 7b30b16cde4413c3bcd21b385da08d689a71fd4b (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//
//  WalkThroughPageViewController.m
//  iosremote
//
//  Created by Siqi Liu on 8/27/13.
//  Copyright (c) 2013 libreoffice. All rights reserved.
//

#import "WalkThroughPageViewController.h"

@interface WalkThroughPageViewController ()

@end

@implementation WalkThroughPageViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    switch (self.index) {
        case 0:
            [self.image setImage:[UIImage imageNamed:@"WTconnection"]];
            self.instructionText.text = @"Connect your iOS device and your computer to the same WiFi network.";
            self.instructionHint.text = @"Or create a personal hotspot on your computer or your iPhone if no local WiFi network is available.";
            self.instructionTitle.text = @"Connection";
            [self.hintImage setImage:[UIImage imageNamed:@"WTConnectionHotspot"]];
            break;
        case 1:
            [self.image setImage:[UIImage imageNamed:@"WTconnecting"]];
            self.instructionText.text = @"Launch Impress & select your computer.";
            self.instructionHint.text = @"Enter the PIN code in SlideShow - Impress Remote";
            self.instructionTitle.text = @"Pairing";
            [self.hintImage setImage:[UIImage imageNamed:@"WTPairing"]];
            break;
        case 2:{
            [self.image setImage:[UIImage imageNamed:@"WTcontrol"]];
//            self.instructionText.text = @"Control your presentation at your fingertips!";
            self.instructionTitle.text = @"Control";
            UIImage *backgroundImage = [UIImage imageNamed:@"buttonBackground"];
            UIEdgeInsets insets = UIEdgeInsetsMake(20, 7, 20, 7);
            UIImage *stretchableBackgroundImage = [backgroundImage resizableImageWithCapInsets:insets];
            
            [self.okButton setBackgroundImage:stretchableBackgroundImage forState:UIControlStateNormal];
            
            self.okButton.hidden = NO;
            break;
        }
        default:
            break;
    }
    self.indexLabl.text = [NSString stringWithFormat:@"%d", self.index+1];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)viewDidUnload {
    [self setImage:nil];
    [self setInstructionText:nil];
    [self setInstructionTitle:nil];
    [self setOkButton:nil];
    [self setInstructionHint:nil];
    [self setIndexLabl:nil];
    [self setHintImage:nil];
    [super viewDidUnload];
}
- (IBAction)okButtonHandleBack:(id)sender {
    [self.navigationController popToRootViewControllerAnimated:YES];
}
@end