diff --git a/Limelight/ViewControllers/StreamFrameViewController.h b/Limelight/ViewControllers/StreamFrameViewController.h index 07a1374..35d0dc4 100644 --- a/Limelight/ViewControllers/StreamFrameViewController.h +++ b/Limelight/ViewControllers/StreamFrameViewController.h @@ -11,5 +11,7 @@ #import @interface StreamFrameViewController : UIViewController +@property (strong, nonatomic) IBOutlet UILabel *stageLabel; +@property (strong, nonatomic) IBOutlet UIActivityIndicatorView *spinner; @end diff --git a/Limelight/ViewControllers/StreamFrameViewController.m b/Limelight/ViewControllers/StreamFrameViewController.m index fc6e0cb..3dd9b75 100644 --- a/Limelight/ViewControllers/StreamFrameViewController.m +++ b/Limelight/ViewControllers/StreamFrameViewController.m @@ -24,7 +24,9 @@ - (void)viewDidLoad { [super viewDidLoad]; - + + [self.stageLabel setText:@"Starting App"]; + [UIApplication sharedApplication].idleTimerDisabled = YES; _controllerSupport = [[ControllerSupport alloc] init]; @@ -48,6 +50,10 @@ - (void) connectionStarted { printf("Connection started\n"); + dispatch_async(dispatch_get_main_queue(), ^{ + [self.spinner stopAnimating]; + [self.stageLabel setText:@"Waiting for first frame..."]; + }); } - (void)connectionTerminated:(long)errorCode { @@ -64,6 +70,11 @@ - (void) stageStarting:(char*)stageName { printf("Starting %s\n", stageName); + dispatch_async(dispatch_get_main_queue(), ^{ + NSString* lowerCase = [NSString stringWithFormat:@"%s in progress...", stageName]; + NSString* titleCase = [[[lowerCase substringToIndex:1] uppercaseString] stringByAppendingString:[lowerCase substringFromIndex:1]]; + [self.stageLabel setText:titleCase]; + }); } - (void) stageComplete:(char*)stageName { @@ -72,7 +83,7 @@ - (void) stageFailed:(char*)stageName withError:(long)errorCode { UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Connection Failed" message:[NSString stringWithFormat:@"%s failed with error %ld", - stageName, errorCode] + stageName, errorCode] preferredStyle:UIAlertControllerStyleAlert]; [alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){ [self performSegueWithIdentifier:@"returnToMainFrame" sender:self]; diff --git a/MainFrame-iPad.storyboard b/MainFrame-iPad.storyboard index 1fa91ef..9eb0431 100644 --- a/MainFrame-iPad.storyboard +++ b/MainFrame-iPad.storyboard @@ -1,5 +1,5 @@ - + @@ -109,7 +109,24 @@ + + + + + + + + + + + + @@ -117,6 +134,8 @@ + + diff --git a/MainFrame-iPhone.storyboard b/MainFrame-iPhone.storyboard index 0b04f23..4aecfbb 100644 --- a/MainFrame-iPhone.storyboard +++ b/MainFrame-iPhone.storyboard @@ -1,5 +1,5 @@ - + @@ -103,12 +103,31 @@ + + + + + + + + + + + + + +