Kaydet (Commit) 743dd31c authored tarafından Siqi LIU's avatar Siqi LIU

add walkthrough guide for iPhone

üst 2410b3c3
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>HOWTO_GUIDE_SEEN</key>
<false/>
<key>TOUCH_POINTER_ENABLED</key> <key>TOUCH_POINTER_ENABLED</key>
<true/> <true/>
<key>TIMER_AUTOSTART_ENABLED</key> <key>TIMER_AUTOSTART_ENABLED</key>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "iosremote/Communication/CommunicationManager.m" filePath = "iosremote/Communication/CommunicationManager.m"
timestampString = "398443855.270743" timestampString = "399020934.030192"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "90" startingLineNumber = "90"
......
...@@ -26,12 +26,9 @@ ...@@ -26,12 +26,9 @@
@property BOOL masterIsHiddenWhenLandscape; @property BOOL masterIsHiddenWhenLandscape;
// Welcome page // Welcome page
-(IBAction)startConnectionModal:(id)sender; -(void)startConnectionModal:(id)sender;
- (void) setWelcomePageVisible:(BOOL)visible; - (void) setWelcomePageVisible:(BOOL)visible;
@property (weak, nonatomic) IBOutlet UIView *welcome_blocking_page; @property (weak, nonatomic) IBOutlet UIView *welcome_blocking_page;
@property (weak, nonatomic) IBOutlet UIImageView *welcome_libO_icon;
@property (weak, nonatomic) IBOutlet UIButton *welcome_connect_button;
@property (weak, nonatomic) IBOutlet UILabel *welcome_label;
@property (weak, nonatomic) IBOutlet UITableView *horizontalTableView; @property (weak, nonatomic) IBOutlet UITableView *horizontalTableView;
@property (weak, nonatomic) IBOutlet UIButton *startButton; @property (weak, nonatomic) IBOutlet UIButton *startButton;
......
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
# pragma mark - welcome page # pragma mark - welcome page
-(IBAction)startConnectionModal:(id)sender -(void)startConnectionModal:(id)sender
{ {
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"iPad_autosize" UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"iPad_autosize"
bundle: nil]; bundle: nil];
...@@ -375,6 +375,7 @@ ...@@ -375,6 +375,7 @@
[self presentViewController:sspt animated:YES completion:^{}]; [self presentViewController:sspt animated:YES completion:^{}];
} }
}]; }];
[self startConnectionModal:nil];
} }
- (void) setWelcomePageVisible:(BOOL)visible - (void) setWelcomePageVisible:(BOOL)visible
...@@ -429,7 +430,6 @@ ...@@ -429,7 +430,6 @@
[self setNextButton:nil]; [self setNextButton:nil];
[self setSlideNumber:nil]; [self setSlideNumber:nil];
[self setSlideNumber:nil]; [self setSlideNumber:nil];
[self setWelcome_connect_button:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self.slideShowFinishedObserver]; [[NSNotificationCenter defaultCenter] removeObserver:self.slideShowFinishedObserver];
[[NSNotificationCenter defaultCenter] removeObserver:self.slideShowImageNoteReadyObserver]; [[NSNotificationCenter defaultCenter] removeObserver:self.slideShowImageNoteReadyObserver];
...@@ -437,7 +437,6 @@ ...@@ -437,7 +437,6 @@
[self setStartButton:nil]; [self setStartButton:nil];
[self setClearButton:nil]; [self setClearButton:nil];
[self setTimeLabel:nil]; [self setTimeLabel:nil];
[self setWelcome_label:nil];
[self setGearButton:nil]; [self setGearButton:nil];
[super viewDidUnload]; [super viewDidUnload];
} }
...@@ -523,7 +522,9 @@ static BOOL isBlank = NO; ...@@ -523,7 +522,9 @@ static BOOL isBlank = NO;
#pragma mark - Reconnection #pragma mark - Reconnection
- (void) didReceiveDisconnection - (void) didReceiveDisconnection
{ {
[self dismissViewControllerAnimated:YES completion:nil]; [self dismissViewControllerAnimated:YES completion:^{
[self startConnectionModal:nil];
}];
if (self.welcome_blocking_page.isHidden == YES) { if (self.welcome_blocking_page.isHidden == YES) {
[self setWelcomePageVisible:YES]; [self setWelcomePageVisible:YES];
......
...@@ -37,7 +37,9 @@ ...@@ -37,7 +37,9 @@
#define kHorizontalTableCellHighlightedBackgroundColor [UIColor colorWithRed:0 green:0.4745098 blue:0.29019808 alpha:0.9] #define kHorizontalTableCellHighlightedBackgroundColor [UIColor colorWithRed:0 green:0.4745098 blue:0.29019808 alpha:0.9]
#define kTintColor [UIColor colorWithRed:0 green:0.462745098 blue:1 alpha:1.0] #define kTintColor [UIColor orangeColor]
#define kTextTintColor [UIColor colorWithRed:0 green:0.462745098 blue:1 alpha:1.0]
#define kAppTitleFont [UIFont fontWithName:@"HelveticaNeue-Medium" size:20.0f] #define kAppTitleFont [UIFont fontWithName:@"HelveticaNeue-Medium" size:20.0f]
......
...@@ -230,7 +230,6 @@ ...@@ -230,7 +230,6 @@
_style = UITableViewCellSelectionStyleNone; _style = UITableViewCellSelectionStyleNone;
[self setTitle:NSLocalizedString(@"Impress Remote", @"App name displayed on navbar")]; [self setTitle:NSLocalizedString(@"Impress Remote", @"App name displayed on navbar")];
} }
- (void) viewDidAppear:(BOOL)animated - (void) viewDidAppear:(BOOL)animated
...@@ -262,15 +261,26 @@ ...@@ -262,15 +261,26 @@
[self.serviceBrowser setDelegate:self]; [self.serviceBrowser setDelegate:self];
[self startSearching]; [self startSearching];
if (![[CommunicationManager fetchSSIDInfo] valueForKey:@"SSID"]) { if (![[NSUserDefaults standardUserDefaults] boolForKey:@"HOWTO_GUIDE_SEEN"])
[self revealHelpInfo:[self.tableView cellForRowAtIndexPath:[NSIndexPath {
indexPathForRow:0 UIAlertView * av = [[UIAlertView alloc] initWithTitle:@"How-To guide" message:NSLocalizedString(@"Take a tour of iOS Impress Remote?", nil) delegate:self cancelButtonTitle:NSLocalizedString(@"No, thanks", nil) otherButtonTitles:NSLocalizedString(@"Yes", nil), nil];
inSection:0]].accessoryView];
[av show];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"HOWTO_GUIDE_SEEN"];
} }
[super viewDidAppear:animated]; [super viewDidAppear:animated];
} }
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex == 0){
[alertView dismissWithClickedButtonIndex:0 animated:YES];
}else if (buttonIndex == 1){
[alertView dismissWithClickedButtonIndex:0 animated:YES];
[self performSegueWithIdentifier:@"howtoSegue" sender:self];
}
}
- (void) viewWillDisappear:(BOOL)animated - (void) viewWillDisappear:(BOOL)animated
{ {
[self disableSpinner]; [self disableSpinner];
...@@ -394,7 +404,7 @@ ...@@ -394,7 +404,7 @@
[sectionFooter setNumberOfLines:5]; [sectionFooter setNumberOfLines:5];
sectionFooter.backgroundColor = [UIColor clearColor]; sectionFooter.backgroundColor = [UIColor clearColor];
sectionFooter.font = kAppSmallTextFont; sectionFooter.font = kAppSmallTextFont;
sectionFooter.textColor = kTintColor; sectionFooter.textColor = kTextTintColor;
sectionFooter.text = NSLocalizedString(@"Customize server config instruction", @"Displayed when no customized server is available"); sectionFooter.text = NSLocalizedString(@"Customize server config instruction", @"Displayed when no customized server is available");
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, [self tableView:tableView heightForFooterInSection:section])]; UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, [self tableView:tableView heightForFooterInSection:section])];
...@@ -436,15 +446,15 @@ ...@@ -436,15 +446,15 @@
{ {
if (sender) { if (sender) {
if ([[CommunicationManager fetchSSIDInfo] valueForKey:@"SSID"]) if ([[CommunicationManager fetchSSIDInfo] valueForKey:@"SSID"])
[PopoverView showPopoverAtPoint:CGPointMake(sender.frame.origin.x, [PopoverView showPopoverAtPoint:CGPointMake(sender.frame.origin.x - sender.frame.size.width,
sender.frame.origin.y + sender.frame.size.height/2) sender.frame.origin.y + sender.frame.size.height/3)
inView:sender inView:sender
withText:[NSString withText:[NSString
stringWithFormat:NSLocalizedString(@"* Launch Impress on your computer\n* Connect both devices to the same WiFi network\n* P.S. Your iOS device is connected to \"%@\" now", nil), [[CommunicationManager fetchSSIDInfo] valueForKey:@"SSID"]] stringWithFormat:NSLocalizedString(@"* Launch Impress on your computer\n* Connect both devices to the same WiFi network\n* P.S. Your iOS device is connected to \"%@\" now", nil), [[CommunicationManager fetchSSIDInfo] valueForKey:@"SSID"]]
delegate:nil]; delegate:nil];
else { else {
[PopoverView showPopoverAtPoint:CGPointMake(sender.frame.origin.x, [PopoverView showPopoverAtPoint:CGPointMake(sender.frame.origin.x - sender.frame.size.width,
sender.frame.origin.y + sender.frame.size.height/2) sender.frame.origin.y + sender.frame.size.height/3)
inView:sender inView:sender
withText:[NSString withText:[NSString
stringWithFormat:NSLocalizedString(@"* You don't have a WiFi connection now.\n* Connect your iOS device and your computer to the same network\n* Refresh\n* hint: you may create a personal hotspot on your computer/iPhone", nil), [[CommunicationManager fetchSSIDInfo] valueForKey:@"SSID"]] stringWithFormat:NSLocalizedString(@"* You don't have a WiFi connection now.\n* Connect your iOS device and your computer to the same network\n* Refresh\n* hint: you may create a personal hotspot on your computer/iPhone", nil), [[CommunicationManager fetchSSIDInfo] valueForKey:@"SSID"]]
......
...@@ -109,16 +109,21 @@ ...@@ -109,16 +109,21 @@
_startButton = [UIButton buttonWithType:UIButtonTypeCustom]; _startButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_startButton setBackgroundImage:[UIImage imageNamed:@"navBarButtonNormal"] forState:UIControlStateNormal]; [_startButton setBackgroundImage:[UIImage imageNamed:@"navBarButtonNormal"] forState:UIControlStateNormal];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
_startButton.frame = CGRectMake(10.0, 30.0, 300.0, 50.0); _startButton.frame = CGRectMake(145.0, 30.0, 160.0, 40.0);
} else { } else {
self.modalViewController.view.backgroundColor = [UIColor clearColor]; self.modalViewController.view.backgroundColor = [UIColor clearColor];
_startButton.frame = CGRectMake(30.0, 50.0, 470.0, 50.0); _startButton.frame = CGRectMake(30.0, 50.0, 470.0, 40.0);
} }
[_startButton setTitle:NSLocalizedString(@"Start Presentation", nil) forState:UIControlStateNormal]; [_startButton setTitle:NSLocalizedString(@"Start Presentation", nil) forState:UIControlStateNormal];
[_startButton setTitleColor:kTintColor forState:UIControlStateNormal]; [_startButton setTitleColor:kTintColor forState:UIControlStateNormal];
[_startButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateHighlighted]; [_startButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateHighlighted];
[_startButton addTarget:self action:@selector(startPresentationAction:) forControlEvents:UIControlEventTouchUpInside]; [_startButton addTarget:self action:@selector(startPresentationAction:) forControlEvents:UIControlEventTouchUpInside];
UIImage *backgroundImage = [UIImage imageNamed:@"buttonBackground"];
UIEdgeInsets insets = UIEdgeInsetsMake(20, 7, 20, 7);
UIImage *stretchableBackgroundImage = [backgroundImage resizableImageWithCapInsets:insets];
[_startButton setBackgroundImage:stretchableBackgroundImage forState:UIControlStateNormal];
_startButton.tag = 1; _startButton.tag = 1;
} }
return _startButton; return _startButton;
......
...@@ -325,13 +325,11 @@ ...@@ -325,13 +325,11 @@
if (!isBlank) { if (!isBlank) {
[PopoverView showPopoverAtPoint: CGPointMake(self.navigationController.view.frame.size.width - 20, 0) [PopoverView showPopoverAtPoint: CGPointMake(self.navigationController.view.frame.size.width - 20, 0)
inView:self.view inView:self.view
withTitle:NSLocalizedString(@"More", @"Popover title")
withStringArray:[NSArray arrayWithObjects:NSLocalizedString(@"Stop Presentation", nil), NSLocalizedString(@"Restart", nil), NSLocalizedString(@"Blank Screen", nil), nil] withStringArray:[NSArray arrayWithObjects:NSLocalizedString(@"Stop Presentation", nil), NSLocalizedString(@"Restart", nil), NSLocalizedString(@"Blank Screen", nil), nil]
delegate:self]; delegate:self];
} else { } else {
[PopoverView showPopoverAtPoint: CGPointMake(self.navigationController.view.frame.size.width - 20, 0) [PopoverView showPopoverAtPoint: CGPointMake(self.navigationController.view.frame.size.width - 20, 0)
inView:self.view inView:self.view
withTitle:@"More"
withStringArray:[NSArray arrayWithObjects:NSLocalizedString(@"Stop Presentation", nil), NSLocalizedString(@"Restart", nil), NSLocalizedString(@"Resume from blank screen", nil), nil] withStringArray:[NSArray arrayWithObjects:NSLocalizedString(@"Stop Presentation", nil), NSLocalizedString(@"Restart", nil), NSLocalizedString(@"Resume from blank screen", nil), nil]
delegate:self]; delegate:self];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment