walkthrough pageview controller ie contained controller
This commit is contained in:
22
ios/iosremote/iosremote/WalkThroughPageViewController.h
Normal file
22
ios/iosremote/iosremote/WalkThroughPageViewController.h
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
//
|
||||||
|
// WalkThroughPageViewController.h
|
||||||
|
// iosremote
|
||||||
|
//
|
||||||
|
// Created by Siqi Liu on 8/27/13.
|
||||||
|
// Copyright (c) 2013 libreoffice. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
@interface WalkThroughPageViewController : UIViewController
|
||||||
|
@property (weak, nonatomic) IBOutlet UIImageView *image;
|
||||||
|
@property (weak, nonatomic) IBOutlet UILabel *instructionTitle;
|
||||||
|
@property (weak, nonatomic) IBOutlet UILabel *instructionText;
|
||||||
|
@property (weak, nonatomic) IBOutlet UIImageView *hintImage;
|
||||||
|
@property (weak, nonatomic) IBOutlet UILabel *instructionHint;
|
||||||
|
@property (weak, nonatomic) IBOutlet UILabel *indexLabl;
|
||||||
|
@property (weak, nonatomic) IBOutlet UIButton *okButton;
|
||||||
|
|
||||||
|
- (IBAction)okButtonHandleBack:(id)sender;
|
||||||
|
@property (assign, nonatomic) NSInteger index;
|
||||||
|
@end
|
84
ios/iosremote/iosremote/WalkThroughPageViewController.m
Normal file
84
ios/iosremote/iosremote/WalkThroughPageViewController.m
Normal file
@@ -0,0 +1,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
|
Reference in New Issue
Block a user