diff --git a/Limelight.xcodeproj/project.pbxproj b/Limelight.xcodeproj/project.pbxproj index 34e63da..b4d8869 100644 --- a/Limelight.xcodeproj/project.pbxproj +++ b/Limelight.xcodeproj/project.pbxproj @@ -38,6 +38,7 @@ FB4678FA1A55FFAD00377732 /* DiscoveryManager.m in Sources */ = {isa = PBXBuildFile; fileRef = FB4678F91A55FFAD00377732 /* DiscoveryManager.m */; }; FB4678FF1A565DAC00377732 /* WakeOnLanManager.m in Sources */ = {isa = PBXBuildFile; fileRef = FB4678FE1A565DAC00377732 /* WakeOnLanManager.m */; }; FB4679011A57048000377732 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB4679001A57048000377732 /* CoreFoundation.framework */; }; + FB4A23B81A9D3637004D2EF2 /* LoadingFrameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB4A23B71A9D3637004D2EF2 /* LoadingFrameViewController.m */; }; FB6549561A57907E001C8F39 /* DiscoveryWorker.m in Sources */ = {isa = PBXBuildFile; fileRef = FB6549551A57907E001C8F39 /* DiscoveryWorker.m */; }; FB7E794419C8B71B00A15F68 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = FB7E794319C8B71B00A15F68 /* libiconv.dylib */; }; FB89462819F646E200339C8A /* CryptoManager.m in Sources */ = {isa = PBXBuildFile; fileRef = FB89460619F646E200339C8A /* CryptoManager.m */; }; @@ -140,6 +141,8 @@ FB4678FD1A565DAC00377732 /* WakeOnLanManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WakeOnLanManager.h; sourceTree = ""; }; FB4678FE1A565DAC00377732 /* WakeOnLanManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WakeOnLanManager.m; sourceTree = ""; }; FB4679001A57048000377732 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; + FB4A23B61A9D3637004D2EF2 /* LoadingFrameViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoadingFrameViewController.h; sourceTree = ""; }; + FB4A23B71A9D3637004D2EF2 /* LoadingFrameViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoadingFrameViewController.m; sourceTree = ""; }; FB6549541A57907E001C8F39 /* DiscoveryWorker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiscoveryWorker.h; sourceTree = ""; }; FB6549551A57907E001C8F39 /* DiscoveryWorker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DiscoveryWorker.m; sourceTree = ""; }; FB6549621A60B4A9001C8F39 /* Limelight 0.3.1.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Limelight 0.3.1.xcdatamodel"; sourceTree = ""; }; @@ -529,6 +532,8 @@ FB89462719F646E200339C8A /* StreamFrameViewController.m */, FBD3494E19FF2174002D2A60 /* SettingsViewController.h */, FBD3494F19FF2174002D2A60 /* SettingsViewController.m */, + FB4A23B61A9D3637004D2EF2 /* LoadingFrameViewController.h */, + FB4A23B71A9D3637004D2EF2 /* LoadingFrameViewController.m */, ); path = ViewControllers; sourceTree = ""; @@ -911,6 +916,7 @@ FB89462A19F646E200339C8A /* ControllerSupport.m in Sources */, FB9AFD3D1A7E111600872C98 /* AppAssetResponse.m in Sources */, FBD349621A0089F6002D2A60 /* DataManager.m in Sources */, + FB4A23B81A9D3637004D2EF2 /* LoadingFrameViewController.m in Sources */, FB9AFD3A1A7E05CE00872C98 /* ServerInfoResponse.m in Sources */, FB89463119F646E200339C8A /* StreamManager.m in Sources */, ); diff --git a/Limelight/ViewControllers/LoadingFrameViewController.h b/Limelight/ViewControllers/LoadingFrameViewController.h new file mode 100644 index 0000000..febafdd --- /dev/null +++ b/Limelight/ViewControllers/LoadingFrameViewController.h @@ -0,0 +1,14 @@ +// +// LoadingFrameViewController.h +// Limelight +// +// Created by Diego Waxemberg on 2/24/15. +// Copyright (c) 2015 Limelight Stream. All rights reserved. +// + +#import + +@interface LoadingFrameViewController : UIViewController +@property (weak, nonatomic) IBOutlet NSLayoutConstraint *loadingSpinner; + +@end diff --git a/Limelight/ViewControllers/LoadingFrameViewController.m b/Limelight/ViewControllers/LoadingFrameViewController.m new file mode 100644 index 0000000..10ffd3b --- /dev/null +++ b/Limelight/ViewControllers/LoadingFrameViewController.m @@ -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 diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index e8a80b0..67ac909 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -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]; diff --git a/iPad.storyboard b/iPad.storyboard index 1cf1c26..2ebcfa5 100644 --- a/iPad.storyboard +++ b/iPad.storyboard @@ -226,6 +226,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/iPhone.storyboard b/iPhone.storyboard index 920eca0..3850866 100644 --- a/iPhone.storyboard +++ b/iPhone.storyboard @@ -229,6 +229,29 @@ + + + + + + + + + + + + + + + + + + + + + + +