diff options
author | Siqi LIU <me@siqi.fr> | 2013-08-29 16:54:50 +0200 |
---|---|---|
committer | Siqi LIU <me@siqi.fr> | 2013-08-29 16:54:50 +0200 |
commit | 7709d472f5cb1c98fa2cdd5b43f7dc922e0b86d0 (patch) | |
tree | 532978999c8e337ba3c311f97f58d731c6d33e36 /ios | |
parent | 7529feea8e5e03ad132b0f09735c6218b627a530 (diff) |
walkthrough pageview controller ie contained controller
Diffstat (limited to 'ios')
-rw-r--r-- | ios/iosremote/iosremote/WalkThroughPageViewController.h | 22 | ||||
-rw-r--r-- | ios/iosremote/iosremote/WalkThroughPageViewController.m | 84 |
2 files changed, 106 insertions, 0 deletions
diff --git a/ios/iosremote/iosremote/WalkThroughPageViewController.h b/ios/iosremote/iosremote/WalkThroughPageViewController.h new file mode 100644 index 000000000000..86260e7a6bf8 --- /dev/null +++ b/ios/iosremote/iosremote/WalkThroughPageViewController.h @@ -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 diff --git a/ios/iosremote/iosremote/WalkThroughPageViewController.m b/ios/iosremote/iosremote/WalkThroughPageViewController.m new file mode 100644 index 000000000000..7b30b16cde44 --- /dev/null +++ b/ios/iosremote/iosremote/WalkThroughPageViewController.m @@ -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 |