created a loading frame

This commit is contained in:
Diego Waxemberg
2015-02-24 22:13:33 -05:00
parent 81c84597c8
commit 3617ea98e2
6 changed files with 110 additions and 1 deletions

View File

@@ -0,0 +1,14 @@
//
// LoadingFrameViewController.h
// Limelight
//
// Created by Diego Waxemberg on 2/24/15.
// Copyright (c) 2015 Limelight Stream. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface LoadingFrameViewController : UIViewController
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *loadingSpinner;
@end

View File

@@ -0,0 +1,36 @@
//
// LoadingFrameViewController.m
// Limelight
//
// Created by Diego Waxemberg on 2/24/15.
// Copyright (c) 2015 Limelight Stream. All rights reserved.
//
#import "LoadingFrameViewController.h"
@interface LoadingFrameViewController ()
@end
@implementation LoadingFrameViewController
- (void)viewDidLoad {
[super viewDidLoad];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end

View File

@@ -21,6 +21,7 @@
#import "AppListResponse.h"
#import "ServerInfoResponse.h"
#import "StreamFrameViewController.h"
#import "LoadingFrameViewController.h"
@implementation MainFrameViewController {
NSOperationQueue* _opQueue;
@@ -271,7 +272,6 @@ static NSArray* appList;
}
}
- (App*) findRunningApp {
for (App* app in appList) {
if (app.isRunning) {
@@ -296,6 +296,15 @@ static NSArray* appList;
}
}
- (void) showLoadingFrame {
LoadingFrameViewController* loadingFrame = [self.storyboard instantiateViewControllerWithIdentifier:@"loadingFrame"];
[self.navigationController presentViewController:loadingFrame animated:YES completion:nil];
}
- (void) hideLoadingFrame {
[self dismissViewControllerAnimated:YES completion:nil];
}
- (void)viewDidLoad
{
[super viewDidLoad];