mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-02-16 02:20:53 +00:00
added settings menu and persistent storage for settings
This commit is contained in:
@@ -48,6 +48,11 @@
|
||||
FB8946EC19F6AFE400339C8A /* libssl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FB8946E119F6AFB800339C8A /* libssl.a */; };
|
||||
FB8946ED19F6AFE800339C8A /* libopus.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FB8946EA19F6AFB800339C8A /* libopus.a */; };
|
||||
FBD3494319FC9C04002D2A60 /* AppManager.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD3494219FC9C04002D2A60 /* AppManager.m */; };
|
||||
FBD3495019FF2174002D2A60 /* SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD3494F19FF2174002D2A60 /* SettingsViewController.m */; };
|
||||
FBD3495319FF36FB002D2A60 /* SWRevealViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD3495219FF36FB002D2A60 /* SWRevealViewController.m */; };
|
||||
FBD3495B1A004411002D2A60 /* Hosts.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD3495A1A004411002D2A60 /* Hosts.m */; };
|
||||
FBD3495E1A004412002D2A60 /* Settings.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD3495D1A004412002D2A60 /* Settings.m */; };
|
||||
FBD349621A0089F6002D2A60 /* DataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = FBD349611A0089F6002D2A60 /* DataManager.m */; };
|
||||
FBDE86E019F7A837001C18A8 /* UIComputerView.m in Sources */ = {isa = PBXBuildFile; fileRef = FBDE86DF19F7A837001C18A8 /* UIComputerView.m */; };
|
||||
FBDE86E619F82297001C18A8 /* UIAppView.m in Sources */ = {isa = PBXBuildFile; fileRef = FBDE86E519F82297001C18A8 /* UIAppView.m */; };
|
||||
FBDE86E919F82315001C18A8 /* App.m in Sources */ = {isa = PBXBuildFile; fileRef = FBDE86E819F82315001C18A8 /* App.m */; };
|
||||
@@ -217,6 +222,17 @@
|
||||
FB8946EA19F6AFB800339C8A /* libopus.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libopus.a; sourceTree = "<group>"; };
|
||||
FBD3494119FC9C04002D2A60 /* AppManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppManager.h; sourceTree = "<group>"; };
|
||||
FBD3494219FC9C04002D2A60 /* AppManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppManager.m; sourceTree = "<group>"; };
|
||||
FBD3494E19FF2174002D2A60 /* SettingsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsViewController.h; sourceTree = "<group>"; };
|
||||
FBD3494F19FF2174002D2A60 /* SettingsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SettingsViewController.m; sourceTree = "<group>"; };
|
||||
FBD3495119FF36FB002D2A60 /* SWRevealViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SWRevealViewController.h; sourceTree = "<group>"; };
|
||||
FBD3495219FF36FB002D2A60 /* SWRevealViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SWRevealViewController.m; sourceTree = "<group>"; };
|
||||
FBD349571A003F05002D2A60 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
|
||||
FBD349591A004411002D2A60 /* Hosts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Hosts.h; path = Database/Hosts.h; sourceTree = "<group>"; };
|
||||
FBD3495A1A004411002D2A60 /* Hosts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Hosts.m; path = Database/Hosts.m; sourceTree = "<group>"; };
|
||||
FBD3495C1A004412002D2A60 /* Settings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Settings.h; path = Database/Settings.h; sourceTree = "<group>"; };
|
||||
FBD3495D1A004412002D2A60 /* Settings.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Settings.m; path = Database/Settings.m; sourceTree = "<group>"; };
|
||||
FBD349601A0089F6002D2A60 /* DataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataManager.h; path = Database/DataManager.h; sourceTree = "<group>"; };
|
||||
FBD349611A0089F6002D2A60 /* DataManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DataManager.m; path = Database/DataManager.m; sourceTree = "<group>"; };
|
||||
FBDE86DE19F7A837001C18A8 /* UIComputerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIComputerView.h; sourceTree = "<group>"; };
|
||||
FBDE86DF19F7A837001C18A8 /* UIComputerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UIComputerView.m; sourceTree = "<group>"; };
|
||||
FBDE86E419F82297001C18A8 /* UIAppView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIAppView.h; sourceTree = "<group>"; };
|
||||
@@ -289,6 +305,7 @@
|
||||
FB290CF019B2C406004C83CF /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FBD349571A003F05002D2A60 /* libsqlite3.dylib */,
|
||||
FB89468F19F6AFB800339C8A /* libs */,
|
||||
FB7E794319C8B71B00A15F68 /* libiconv.dylib */,
|
||||
FB290DC319B2E98F004C83CF /* libxml2.dylib */,
|
||||
@@ -311,6 +328,7 @@
|
||||
FB89461519F646E200339C8A /* Stream */,
|
||||
FB89461E19F646E200339C8A /* Utility */,
|
||||
FB89462319F646E200339C8A /* ViewControllers */,
|
||||
FBD3495F1A004453002D2A60 /* Database */,
|
||||
FB290CFA19B2C406004C83CF /* Supporting Files */,
|
||||
FB290D0219B2C406004C83CF /* AppDelegate.h */,
|
||||
FB290D0319B2C406004C83CF /* AppDelegate.m */,
|
||||
@@ -424,10 +442,14 @@
|
||||
FB89462319F646E200339C8A /* ViewControllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FBD3495119FF36FB002D2A60 /* SWRevealViewController.h */,
|
||||
FBD3495219FF36FB002D2A60 /* SWRevealViewController.m */,
|
||||
FB89462419F646E200339C8A /* MainFrameViewController.h */,
|
||||
FB89462519F646E200339C8A /* MainFrameViewController.m */,
|
||||
FB89462619F646E200339C8A /* StreamFrameViewController.h */,
|
||||
FB89462719F646E200339C8A /* StreamFrameViewController.m */,
|
||||
FBD3494E19FF2174002D2A60 /* SettingsViewController.h */,
|
||||
FBD3494F19FF2174002D2A60 /* SettingsViewController.m */,
|
||||
);
|
||||
path = ViewControllers;
|
||||
sourceTree = "<group>";
|
||||
@@ -593,6 +615,19 @@
|
||||
path = lib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FBD3495F1A004453002D2A60 /* Database */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FBD3495C1A004412002D2A60 /* Settings.h */,
|
||||
FBD3495D1A004412002D2A60 /* Settings.m */,
|
||||
FBD349591A004411002D2A60 /* Hosts.h */,
|
||||
FBD3495A1A004411002D2A60 /* Hosts.m */,
|
||||
FBD349601A0089F6002D2A60 /* DataManager.h */,
|
||||
FBD349611A0089F6002D2A60 /* DataManager.m */,
|
||||
);
|
||||
name = Database;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@@ -713,6 +748,7 @@
|
||||
files = (
|
||||
FB290D0719B2C406004C83CF /* Limelight.xcdatamodeld in Sources */,
|
||||
FB89463219F646E200339C8A /* VideoDecoderRenderer.m in Sources */,
|
||||
FBD3495E1A004412002D2A60 /* Settings.m in Sources */,
|
||||
FB290D0419B2C406004C83CF /* AppDelegate.m in Sources */,
|
||||
FB89463419F646E200339C8A /* Utils.m in Sources */,
|
||||
FBDE86E619F82297001C18A8 /* UIAppView.m in Sources */,
|
||||
@@ -722,9 +758,12 @@
|
||||
FBDE86E019F7A837001C18A8 /* UIComputerView.m in Sources */,
|
||||
FBDE86E919F82315001C18A8 /* App.m in Sources */,
|
||||
FB89463019F646E200339C8A /* StreamConfiguration.m in Sources */,
|
||||
FBD3495319FF36FB002D2A60 /* SWRevealViewController.m in Sources */,
|
||||
FBD3495019FF2174002D2A60 /* SettingsViewController.m in Sources */,
|
||||
FB89462C19F646E200339C8A /* HttpManager.m in Sources */,
|
||||
FB89462D19F646E200339C8A /* MDNSManager.m in Sources */,
|
||||
FB89462B19F646E200339C8A /* StreamView.m in Sources */,
|
||||
FBD3495B1A004411002D2A60 /* Hosts.m in Sources */,
|
||||
FB89463519F646E200339C8A /* MainFrameViewController.m in Sources */,
|
||||
FB89463619F646E200339C8A /* StreamFrameViewController.m in Sources */,
|
||||
FB89462819F646E200339C8A /* CryptoManager.m in Sources */,
|
||||
@@ -732,6 +771,7 @@
|
||||
FB290D0019B2C406004C83CF /* main.m in Sources */,
|
||||
FBD3494319FC9C04002D2A60 /* AppManager.m in Sources */,
|
||||
FB89462A19F646E200339C8A /* ControllerSupport.m in Sources */,
|
||||
FBD349621A0089F6002D2A60 /* DataManager.m in Sources */,
|
||||
FB89463119F646E200339C8A /* StreamManager.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
||||
@@ -18,5 +18,6 @@
|
||||
|
||||
- (void)saveContext;
|
||||
- (NSURL *)applicationDocumentsDirectory;
|
||||
- (NSURL*) getStoreURL;
|
||||
|
||||
@end
|
||||
|
||||
@@ -100,7 +100,7 @@ static NSOperationQueue* mainQueue;
|
||||
return _persistentStoreCoordinator;
|
||||
}
|
||||
|
||||
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"Limelight_iOS.sqlite"];
|
||||
NSURL *storeURL = [self getStoreURL];
|
||||
|
||||
NSError *error = nil;
|
||||
_persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
|
||||
@@ -143,4 +143,8 @@ static NSOperationQueue* mainQueue;
|
||||
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
|
||||
}
|
||||
|
||||
- (NSURL*) getStoreURL {
|
||||
return [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"Limelight_iOS.sqlite"];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
22
Limelight/Database/DataManager.h
Normal file
22
Limelight/Database/DataManager.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// DataManager.h
|
||||
// Limelight
|
||||
//
|
||||
// Created by Diego Waxemberg on 10/28/14.
|
||||
// Copyright (c) 2014 Limelight Stream. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "Settings.h"
|
||||
#import "AppDelegate.h"
|
||||
#import "Hosts.h"
|
||||
|
||||
@interface DataManager : NSObject
|
||||
|
||||
@property (strong, nonatomic) AppDelegate* appDelegate;
|
||||
|
||||
- (void) saveSettingsWithBitrate:(NSInteger)bitrate framerate:(NSInteger)framerate height:(NSInteger)height width:(NSInteger)width;
|
||||
- (Settings*) retrieveSettings;
|
||||
|
||||
|
||||
@end
|
||||
65
Limelight/Database/DataManager.m
Normal file
65
Limelight/Database/DataManager.m
Normal file
@@ -0,0 +1,65 @@
|
||||
//
|
||||
// DataManager.m
|
||||
// Limelight
|
||||
//
|
||||
// Created by Diego Waxemberg on 10/28/14.
|
||||
// Copyright (c) 2014 Limelight Stream. All rights reserved.
|
||||
//
|
||||
|
||||
#import "DataManager.h"
|
||||
|
||||
@implementation DataManager
|
||||
static NSInteger DEFAULT_BITRATE = 10000;
|
||||
static NSInteger DEFAULT_FRAMERATE = 60;
|
||||
static NSInteger DEFAULT_HEIGHT = 720;
|
||||
static NSInteger DEFAULT_WIDTH = 1280;
|
||||
|
||||
- (id) init {
|
||||
self = [super init];
|
||||
self.appDelegate = [[UIApplication sharedApplication] delegate];
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) saveSettingsWithBitrate:(NSInteger)bitrate framerate:(NSInteger)framerate height:(NSInteger)height width:(NSInteger)width {
|
||||
Settings* settingsToSave = [self retrieveSettings];
|
||||
settingsToSave.framerate = [NSNumber numberWithInteger:framerate];
|
||||
settingsToSave.bitrate = [NSNumber numberWithInteger:bitrate];
|
||||
settingsToSave.height = [NSNumber numberWithInteger:height];
|
||||
settingsToSave.width = [NSNumber numberWithInteger:width];
|
||||
[self saveSettings:settingsToSave];
|
||||
}
|
||||
|
||||
- (Settings*) retrieveSettings {
|
||||
NSFetchRequest* fetchRequest = [[NSFetchRequest alloc] init];
|
||||
NSEntityDescription* entity = [NSEntityDescription entityForName:@"Settings" inManagedObjectContext:[self.appDelegate managedObjectContext]];
|
||||
[fetchRequest setEntity:entity];
|
||||
[fetchRequest setAffectedStores:[NSArray arrayWithObjects:[[self.appDelegate persistentStoreCoordinator] persistentStoreForURL:[self.appDelegate getStoreURL]], nil]];
|
||||
|
||||
NSError* error;
|
||||
NSArray* fetchedRecords = [[self.appDelegate managedObjectContext] executeFetchRequest:fetchRequest error:&error];
|
||||
|
||||
if (fetchedRecords.count == 0) {
|
||||
// create a new settings object with the default values
|
||||
Settings* settings = [[Settings alloc] initWithEntity:entity insertIntoManagedObjectContext:[self.appDelegate managedObjectContext]];
|
||||
settings.framerate = [NSNumber numberWithInteger:DEFAULT_FRAMERATE];
|
||||
settings.bitrate = [NSNumber numberWithInteger:DEFAULT_BITRATE];
|
||||
settings.height = [NSNumber numberWithInteger:DEFAULT_HEIGHT];
|
||||
settings.width = [NSNumber numberWithInteger:DEFAULT_WIDTH];
|
||||
return settings;
|
||||
} else {
|
||||
// we should only ever have 1 settings object stored
|
||||
return [fetchedRecords objectAtIndex:0];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) saveSettings:(Settings*)settings {
|
||||
NSError* error;
|
||||
if (![[self.appDelegate managedObjectContext] save:&error]) {
|
||||
NSLog(@"ERROR: Unable to save settings to database");
|
||||
}
|
||||
|
||||
[self.appDelegate saveContext];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
18
Limelight/Database/Hosts.h
Normal file
18
Limelight/Database/Hosts.h
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Hosts.h
|
||||
// Limelight
|
||||
//
|
||||
// Created by Diego Waxemberg on 10/28/14.
|
||||
// Copyright (c) 2014 Limelight Stream. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
|
||||
|
||||
@interface Hosts : NSManagedObject
|
||||
|
||||
@property (nonatomic, retain) NSString * address;
|
||||
@property (nonatomic, retain) NSString * name;
|
||||
|
||||
@end
|
||||
17
Limelight/Database/Hosts.m
Normal file
17
Limelight/Database/Hosts.m
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// Hosts.m
|
||||
// Limelight
|
||||
//
|
||||
// Created by Diego Waxemberg on 10/28/14.
|
||||
// Copyright (c) 2014 Limelight Stream. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Hosts.h"
|
||||
|
||||
|
||||
@implementation Hosts
|
||||
|
||||
@dynamic address;
|
||||
@dynamic name;
|
||||
|
||||
@end
|
||||
20
Limelight/Database/Settings.h
Normal file
20
Limelight/Database/Settings.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Settings.h
|
||||
// Limelight
|
||||
//
|
||||
// Created by Diego Waxemberg on 10/28/14.
|
||||
// Copyright (c) 2014 Limelight Stream. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreData/CoreData.h>
|
||||
|
||||
|
||||
@interface Settings : NSManagedObject
|
||||
|
||||
@property (nonatomic, retain) NSNumber * bitrate;
|
||||
@property (nonatomic, retain) NSNumber * framerate;
|
||||
@property (nonatomic, retain) NSNumber * height;
|
||||
@property (nonatomic, retain) NSNumber * width;
|
||||
|
||||
@end
|
||||
19
Limelight/Database/Settings.m
Normal file
19
Limelight/Database/Settings.m
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// Settings.m
|
||||
// Limelight
|
||||
//
|
||||
// Created by Diego Waxemberg on 10/28/14.
|
||||
// Copyright (c) 2014 Limelight Stream. All rights reserved.
|
||||
//
|
||||
|
||||
#import "Settings.h"
|
||||
|
||||
|
||||
@implementation Settings
|
||||
|
||||
@dynamic bitrate;
|
||||
@dynamic framerate;
|
||||
@dynamic height;
|
||||
@dynamic width;
|
||||
|
||||
@end
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 31 KiB |
@@ -2,18 +2,16 @@
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x",
|
||||
"filename" : "Left4Dead2-2.jpg"
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"filename" : "Left4Dead2.jpg"
|
||||
"filename" : "settings_2x.png"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x",
|
||||
"filename" : "Left4Dead2-1.jpg"
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
BIN
Limelight/Images.xcassets/Settings.imageset/settings_2x.png
vendored
Normal file
BIN
Limelight/Images.xcassets/Settings.imageset/settings_2x.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
@@ -1,4 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<model name="Test1.xcdatamodel" userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1" systemVersion="11A491" minimumToolsVersion="Automatic" macOSVersion="Automatic" iOSVersion="Automatic">
|
||||
<elements/>
|
||||
<model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="6252" systemVersion="14A388a" minimumToolsVersion="Automatic" macOSVersion="Automatic" iOSVersion="Automatic">
|
||||
<entity name="Hosts" representedClassName="Hosts" syncable="YES">
|
||||
<attribute name="address" optional="YES" attributeType="String" syncable="YES"/>
|
||||
<attribute name="name" optional="YES" attributeType="String" syncable="YES"/>
|
||||
</entity>
|
||||
<entity name="Settings" representedClassName="Settings" syncable="YES">
|
||||
<attribute name="bitrate" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/>
|
||||
<attribute name="framerate" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/>
|
||||
<attribute name="height" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/>
|
||||
<attribute name="width" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/>
|
||||
</entity>
|
||||
<elements>
|
||||
<element name="Hosts" positionX="-63" positionY="-18" width="128" height="75"/>
|
||||
<element name="Settings" positionX="142" positionY="-36" width="128" height="103"/>
|
||||
</elements>
|
||||
</model>
|
||||
@@ -13,8 +13,10 @@
|
||||
#import "UIComputerView.h"
|
||||
#import "UIAppView.h"
|
||||
#import "AppManager.h"
|
||||
#import "SWRevealViewController.h"
|
||||
|
||||
@interface MainFrameViewController : UIViewController <MDNSCallback, PairCallback, HostCallback, AppCallback, AppAssetCallback, NSURLConnectionDelegate>
|
||||
@interface MainFrameViewController : UIViewController <MDNSCallback, PairCallback, HostCallback, AppCallback, AppAssetCallback, NSURLConnectionDelegate, SWRevealViewControllerDelegate>
|
||||
@property (strong, nonatomic) IBOutlet UIBarButtonItem *settingsSidebarButton;
|
||||
|
||||
+ (StreamConfiguration*) getStreamConfiguration;
|
||||
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
#import "UIComputerView.h"
|
||||
#import "UIAppView.h"
|
||||
#import "App.h"
|
||||
#import "SettingsViewController.h"
|
||||
#import "DataManager.h"
|
||||
#import "Settings.h"
|
||||
|
||||
@implementation MainFrameViewController {
|
||||
NSOperationQueue* _opQueue;
|
||||
@@ -134,60 +137,58 @@ static StreamConfiguration* streamConfig;
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: actually allow the user to choose the config
|
||||
unsigned long selectedConf = 1;
|
||||
NSLog(@"selectedConf: %ld", selectedConf);
|
||||
switch (selectedConf) {
|
||||
case 0:
|
||||
streamConfig.width = 1280;
|
||||
streamConfig.height = 720;
|
||||
streamConfig.frameRate = 30;
|
||||
streamConfig.bitRate = 5000;
|
||||
break;
|
||||
default:
|
||||
case 1:
|
||||
streamConfig.width = 1280;
|
||||
streamConfig.height = 720;
|
||||
streamConfig.frameRate = 60;
|
||||
streamConfig.bitRate = 10000;
|
||||
break;
|
||||
case 2:
|
||||
streamConfig.width = 1920;
|
||||
streamConfig.height = 1080;
|
||||
streamConfig.frameRate = 30;
|
||||
streamConfig.bitRate = 10000;
|
||||
break;
|
||||
case 3:
|
||||
streamConfig.width = 1920;
|
||||
streamConfig.height = 1080;
|
||||
streamConfig.frameRate = 60;
|
||||
streamConfig.bitRate = 20000;
|
||||
break;
|
||||
DataManager* dataMan = [[DataManager alloc] init];
|
||||
Settings* streamSettings = [dataMan retrieveSettings];
|
||||
|
||||
streamConfig.frameRate = [streamSettings.framerate intValue];
|
||||
streamConfig.bitRate = [streamSettings.bitrate intValue];
|
||||
streamConfig.height = [streamSettings.height intValue];
|
||||
streamConfig.width = [streamSettings.width intValue];
|
||||
|
||||
[self performSegueWithIdentifier:@"createStreamFrame" sender:nil];
|
||||
}
|
||||
|
||||
- (void)revealController:(SWRevealViewController *)revealController didMoveToPosition:(FrontViewPosition)position {
|
||||
// If we moved back to the center position, we should save the settings
|
||||
if (position == FrontViewPositionLeft) {
|
||||
[(SettingsViewController*)[revealController rearViewController] saveSettings];
|
||||
}
|
||||
NSLog(@"StreamConfig: %@, %d, %dx%dx%d at %d Mbps", streamConfig.host, streamConfig.hostAddr, streamConfig.width, streamConfig.height, streamConfig.frameRate, streamConfig.bitRate);
|
||||
[self performSegueWithIdentifier:@"createStreamFrame" sender:self];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
NSArray* streamConfigVals = [[NSArray alloc] initWithObjects:@"1280x720 (30Hz)", @"1280x720 (60Hz)", @"1920x1080 (30Hz)", @"1920x1080 (60Hz)",nil];
|
||||
|
||||
// Change button color
|
||||
_settingsSidebarButton.tintColor = [UIColor colorWithRed:.2 green:.9 blue:0.f alpha:1.f];
|
||||
|
||||
// Set the side bar button action. When it's tapped, it'll show up the sidebar.
|
||||
_settingsSidebarButton.target = self.revealViewController;
|
||||
_settingsSidebarButton.action = @selector(revealToggle:);
|
||||
|
||||
// Set the gesture
|
||||
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
|
||||
|
||||
[self.revealViewController setDelegate:self];
|
||||
|
||||
//NSArray* streamConfigVals = [[NSArray alloc] initWithObjects:@"1280x720 (30Hz)", @"1280x720 (60Hz)", @"1920x1080 (30Hz)", @"1920x1080 (60Hz)",nil];
|
||||
|
||||
_opQueue = [[NSOperationQueue alloc] init];
|
||||
[CryptoManager generateKeyPairUsingSSl];
|
||||
_uniqueId = [CryptoManager getUniqueID];
|
||||
_cert = [CryptoManager readCertFromFile];
|
||||
|
||||
// Initialize the host picker list
|
||||
// Only initialize the host picker list once
|
||||
if (hostList == nil) {
|
||||
hostList = [[NSMutableSet alloc] init];
|
||||
}
|
||||
|
||||
[self setAutomaticallyAdjustsScrollViewInsets:NO];
|
||||
|
||||
hostScrollView = [[UIScrollView alloc] init];
|
||||
hostScrollView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height / 2);
|
||||
hostScrollView.frame = CGRectMake(0, self.navigationController.navigationBar.frame.origin.y + self.navigationController.navigationBar.frame.size.height, self.view.frame.size.width, self.view.frame.size.height / 2);
|
||||
[hostScrollView setShowsHorizontalScrollIndicator:NO];
|
||||
|
||||
|
||||
appScrollView = [[UIScrollView alloc] init];
|
||||
appScrollView.frame = CGRectMake(0, hostScrollView.frame.size.height, self.view.frame.size.width, self.view.frame.size.height / 2);
|
||||
[appScrollView setShowsHorizontalScrollIndicator:NO];
|
||||
@@ -199,7 +200,8 @@ static StreamConfiguration* streamConfig;
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
{
|
||||
[super viewDidDisappear:animated];
|
||||
[super viewDidAppear:animated];
|
||||
[self.navigationController setNavigationBarHidden:NO animated:YES];
|
||||
_mDNSManager = [[MDNSManager alloc] initWithCallback:self];
|
||||
[_mDNSManager searchForHosts];
|
||||
}
|
||||
|
||||
418
Limelight/ViewControllers/SWRevealViewController.h
Executable file
418
Limelight/ViewControllers/SWRevealViewController.h
Executable file
@@ -0,0 +1,418 @@
|
||||
/*
|
||||
|
||||
Copyright (c) 2013 Joan Lluch <joan.lluch@sweetwilliamsl.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is furnished
|
||||
to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
Early code inspired on a similar class by Philip Kluz (Philip.Kluz@zuui.org)
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
RELEASE NOTES
|
||||
|
||||
|
||||
Version 2.3.0 (Current Version)
|
||||
|
||||
- StoryBoard initializing bug fix
|
||||
- Minor Code refactoring
|
||||
|
||||
Version 2.2.0
|
||||
|
||||
- State Restoration support.
|
||||
- Reverted panGestureRecognizer implementation to before v2.1.0 (works better).
|
||||
- New properties 'toggleAnimationType', 'springDampingRatio'. Default reveal animation is 'Spring'
|
||||
- New property 'frontViewShadowColor'
|
||||
- New properties 'clipsViewsToBounds' and '_extendedPointInsideHit'
|
||||
- New delegate methods for finer control of front view location in the overdraw area, as long as deprecation note on former delegate methods
|
||||
- Other minor changes that should not affect current implementations
|
||||
|
||||
Version 2.1.0
|
||||
|
||||
- Removed SWDirectionPanGestureRecognizer. Horizontal panning is filtered on the shouldBegin delegate. This is cleaner, I hope it does not break previous funcionality
|
||||
- Took a cleaner approach to storyboard support. SWRevealViewControllerSegue is now deprecated and you should use SWRevealViewControllerSegueSetController and SWRevealViewControllerSeguePushController instead.
|
||||
- A minor change on the autoresizingMask of the internal views to fix a glitch on iOS8. This should not affect iOS7
|
||||
|
||||
Version 2.0.2
|
||||
|
||||
- Added new delegates for better control of gesture recognizers
|
||||
|
||||
Version 2.0.1
|
||||
|
||||
- Fix: draggableBorderWidth now correctly handles the cases where one of the rear controllers is not provided
|
||||
- Fix: the shadow related properties are now granted at any time after view load, not just after initialization.
|
||||
|
||||
Version 2.0.0
|
||||
|
||||
- Dropped support for iOS6 and earlier. This version will only work on iOS7
|
||||
|
||||
- The method setFrontViewController:animated: does not longer perform a full reveal animation. Instead it just replaces the frontViewController in
|
||||
its current position. Use the new pushFrontViewController:animated: method to perform a replacement of the front controlles with reveal animation
|
||||
as in the previous version
|
||||
|
||||
IMPORTANT: You must replace all calls to setFrontViewController:animated by calls to pushFrontViewController:animated to prevent breaking
|
||||
functionality on existing projects.
|
||||
|
||||
- Added support for animated replacement of child controllers: setRearViewController, setFrontViewController, setRightViewController now have animated versions.
|
||||
|
||||
- The new 'replaceViewAnimationDuration' property sets the default duration of child viewController replacement.
|
||||
|
||||
- Added the following new delegate methods
|
||||
revealController:willAddViewController:forOperation:animated:
|
||||
revealController:didAddViewController:forOperation:animated:
|
||||
|
||||
- The class also supports custom UIViewControllerAnimatedTransitioning related with the replacement of child viewControllers.
|
||||
You can implement the following new delegate method: revealController:animationControllerForOperation:fromViewController:toViewController:
|
||||
and provide an object conforming to UIViewControllerAnimatedTransitioning to implement custom animations.
|
||||
|
||||
Version 1.1.3
|
||||
|
||||
- Reverted the supportedInterfaceOrientations to the default behavior. This is consistent with Apple provided controllers
|
||||
|
||||
- The presentFrontViewHierarchically now dynamically takes into account the smaller header height of bars on iPhone landscape orientation
|
||||
|
||||
Version 1.1.2
|
||||
|
||||
- The status bar style and appearance are now handled in sync with the class animations.
|
||||
You can implement the methods preferredStatusBarStyle and prefersStatusBarHidden on your child controllers to define the desired appearance
|
||||
|
||||
- The loadView method now calls a method, loadStoryboardControllers, just for the purpose of loading child controllers from a storyboard.
|
||||
You can override this method and remove the @try @catch statements if you want the debugger not to stop at them in case you have set an exception breakpoint.
|
||||
|
||||
Version 1.1.1
|
||||
|
||||
- You can now get a tapGestureRecognizer from the class. See the tapGestureRecognizer method for more information.
|
||||
|
||||
- Both the panGestureRecognizer and the tapGestureRecognizer are now attached to the revealViewController's front content view
|
||||
by default, so they will start working just by calling their access methods even if you do not attach them to any of your views.
|
||||
This enables you to dissable interactions on your views -for example based on position- without breaking normal gesture behavior.
|
||||
|
||||
- Corrected a bug that caused a crash on iOS6 and earlier.
|
||||
|
||||
Version 1.1.0
|
||||
|
||||
- The method setFrontViewController:animated now performs the correct animations both for left and right controllers.
|
||||
|
||||
- The class now automatically handles the status bar appearance depending on the currently shown child controller.
|
||||
|
||||
Version 1.0.8
|
||||
|
||||
- Support for constant width frontView by setting a negative value to reveal widths. See properties rearViewRevealWidth and rightViewRevealWidth
|
||||
|
||||
- Support for draggableBorderWidth. See property of the same name.
|
||||
|
||||
- The Pan gesture recongnizer can be disabled by implementing the following delegate method and returning NO
|
||||
revealControllerPanGestureShouldBegin:
|
||||
|
||||
- Added the ability to track pan gesture reveal progress through the following new delegate methods
|
||||
revealController:panGestureBeganFromLocation:progress:
|
||||
revealController:panGestureMovedToLocation:progress:
|
||||
revealController:panGestureEndedToLocation:progress:
|
||||
|
||||
Previous Versions
|
||||
|
||||
- No release notes were updated for previous versions.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class SWRevealViewController;
|
||||
@protocol SWRevealViewControllerDelegate;
|
||||
|
||||
#pragma mark - SWRevealViewController Class
|
||||
|
||||
// Enum values for setFrontViewPosition:animated:
|
||||
typedef NS_ENUM( NSInteger, FrontViewPosition)
|
||||
{
|
||||
// Front controller is removed from view. Animated transitioning from this state will cause the same
|
||||
// effect than animating from FrontViewPositionLeftSideMost. Use this instead of FrontViewPositionLeftSideMost when
|
||||
// you want to remove the front view controller view from the view hierarchy.
|
||||
FrontViewPositionLeftSideMostRemoved,
|
||||
|
||||
// Left most position, front view is presented left-offseted by rightViewRevealWidth+rigthViewRevealOverdraw
|
||||
FrontViewPositionLeftSideMost,
|
||||
|
||||
// Left position, front view is presented left-offseted by rightViewRevealWidth
|
||||
FrontViewPositionLeftSide,
|
||||
|
||||
// Center position, rear view is hidden behind front controller
|
||||
FrontViewPositionLeft,
|
||||
|
||||
// Right possition, front view is presented right-offseted by rearViewRevealWidth
|
||||
FrontViewPositionRight,
|
||||
|
||||
// Right most possition, front view is presented right-offseted by rearViewRevealWidth+rearViewRevealOverdraw
|
||||
FrontViewPositionRightMost,
|
||||
|
||||
// Front controller is removed from view. Animated transitioning from this state will cause the same
|
||||
// effect than animating from FrontViewPositionRightMost. Use this instead of FrontViewPositionRightMost when
|
||||
// you intent to remove the front controller view from the view hierarchy.
|
||||
FrontViewPositionRightMostRemoved,
|
||||
|
||||
};
|
||||
|
||||
// Enum values for toggleAnimationType
|
||||
typedef NS_ENUM(NSInteger, SWRevealToggleAnimationType)
|
||||
{
|
||||
SWRevealToggleAnimationTypeSpring, // <- produces a spring based animation
|
||||
SWRevealToggleAnimationTypeEaseOut, // <- produces an ease out curve animation
|
||||
};
|
||||
|
||||
|
||||
@interface SWRevealViewController : UIViewController
|
||||
|
||||
/* Basic API */
|
||||
|
||||
// Object instance init and rear view setting
|
||||
- (id)initWithRearViewController:(UIViewController *)rearViewController frontViewController:(UIViewController *)frontViewController;
|
||||
|
||||
// Rear view controller, can be nil if not used
|
||||
@property (nonatomic) UIViewController *rearViewController;
|
||||
- (void)setRearViewController:(UIViewController *)rearViewController animated:(BOOL)animated;
|
||||
|
||||
// Optional right view controller, can be nil if not used
|
||||
@property (nonatomic) UIViewController *rightViewController;
|
||||
- (void)setRightViewController:(UIViewController *)rightViewController animated:(BOOL)animated;
|
||||
|
||||
// Front view controller, can be nil on initialization but must be supplied by the time the view is loaded
|
||||
@property (nonatomic) UIViewController *frontViewController;
|
||||
- (void)setFrontViewController:(UIViewController *)frontViewController animated:(BOOL)animated;
|
||||
|
||||
// Sets the frontViewController using a default set of chained animations consisting on moving the
|
||||
// presented frontViewController to the right most possition, replacing it, and moving it back to the left position
|
||||
- (void)pushFrontViewController:(UIViewController *)frontViewController animated:(BOOL)animated;
|
||||
|
||||
// Sets the frontViewController position. You can call the animated version several times with different
|
||||
// positions to obtain a set of animations that will be performed in order one after the other.
|
||||
@property (nonatomic) FrontViewPosition frontViewPosition;
|
||||
- (void)setFrontViewPosition:(FrontViewPosition)frontViewPosition animated:(BOOL)animated;
|
||||
|
||||
// The following methods are meant to be directly connected to the action method of a button
|
||||
// to perform user triggered postion change of the controller views. This is ussually added to a
|
||||
// button on top left or right of the frontViewController
|
||||
- (IBAction)revealToggle:(id)sender;
|
||||
- (IBAction)rightRevealToggle:(id)sender; // <-- simetric implementation of the above for the rightViewController
|
||||
|
||||
// Toogles the current state of the front controller between Left or Right and fully visible
|
||||
// Use setFrontViewPosition to set a particular position
|
||||
- (void)revealToggleAnimated:(BOOL)animated;
|
||||
- (void)rightRevealToggleAnimated:(BOOL)animated; // <-- simetric implementation of the above for the rightViewController
|
||||
|
||||
// The following method will provide a panGestureRecognizer suitable to be added to any view
|
||||
// in order to perform usual drag and swipe gestures to reveal the rear views. This is usually added to the top bar
|
||||
// of a front controller, but it can be added to your frontViewController view or to the reveal controller view to provide full screen panning.
|
||||
// By default, the panGestureRecognizer is added to the view containing the front controller view. To keep this default behavior
|
||||
// you still need to call this method, just don't add it to any of your views. The default setup allows you to dissable
|
||||
// user interactions on your controller views without affecting the recognizer.
|
||||
- (UIPanGestureRecognizer*)panGestureRecognizer;
|
||||
|
||||
// The following method will provide a tapGestureRecognizer suitable to be added to any view on the frontController
|
||||
// for concealing the rear views. By default no tap recognizer is created or added to any view, however if you call this method after
|
||||
// the controller's view has been loaded the recognizer is added to the reveal controller's front container view.
|
||||
// Thus, you can disable user interactions on your frontViewController view without affecting the tap recognizer.
|
||||
- (UITapGestureRecognizer*)tapGestureRecognizer;
|
||||
|
||||
/* The following properties are provided for further customization, they are set to default values on initialization,
|
||||
you do not generally have to set them */
|
||||
|
||||
// Defines how much of the rear or right view is shown, default is 260.
|
||||
// Negative values indicate that the reveal width should be computed by substracting the full front view width,
|
||||
// so the revealed frontView width is kept constant when bounds change as opposed to the rear or right width.
|
||||
@property (nonatomic) CGFloat rearViewRevealWidth;
|
||||
@property (nonatomic) CGFloat rightViewRevealWidth; // <-- simetric implementation of the above for the rightViewController
|
||||
|
||||
// Defines how much of an overdraw can occur when dragging further than 'rearViewRevealWidth', default is 60.
|
||||
@property (nonatomic) CGFloat rearViewRevealOverdraw;
|
||||
@property (nonatomic) CGFloat rightViewRevealOverdraw; // <-- simetric implementation of the above for the rightViewController
|
||||
|
||||
// Defines how much displacement is applied to the rear view when animating or dragging the front view, default is 40.
|
||||
@property (nonatomic) CGFloat rearViewRevealDisplacement;
|
||||
@property (nonatomic) CGFloat rightViewRevealDisplacement; // <-- simetric implementation of the above for the rightViewController
|
||||
|
||||
// Defines a width on the border of the view attached to the panGesturRecognizer where the gesture is allowed,
|
||||
// default is 0 which means no restriction.
|
||||
@property (nonatomic) CGFloat draggableBorderWidth;
|
||||
|
||||
// If YES (the default) the controller will bounce to the Left position when dragging further than 'rearViewRevealWidth'
|
||||
@property (nonatomic) BOOL bounceBackOnOverdraw;
|
||||
@property (nonatomic) BOOL bounceBackOnLeftOverdraw; // <-- simetric implementation of the above for the rightViewController
|
||||
|
||||
// If YES (default is NO) the controller will allow permanent dragging up to the rightMostPosition
|
||||
@property (nonatomic) BOOL stableDragOnOverdraw;
|
||||
@property (nonatomic) BOOL stableDragOnLeftOverdraw; // <-- simetric implementation of the above for the rightViewController
|
||||
|
||||
// If YES (default is NO) the front view controller will be ofsseted vertically by the height of a navigation bar.
|
||||
// Use this on iOS7 when you add an instance of RevealViewController as a child of a UINavigationController (or another SWRevealViewController)
|
||||
// and you want the front view controller to be presented below the navigation bar of its UINavigationController grand parent.
|
||||
// The rearViewController will still appear full size and blurred behind the navigation bar of its UINavigationController grand parent
|
||||
@property (nonatomic) BOOL presentFrontViewHierarchically;
|
||||
|
||||
// Velocity required for the controller to toggle its state based on a swipe movement, default is 250
|
||||
@property (nonatomic) CGFloat quickFlickVelocity;
|
||||
|
||||
// Duration for the revealToggle animation, default is 0.25
|
||||
@property (nonatomic) NSTimeInterval toggleAnimationDuration;
|
||||
|
||||
// Animation type, default is SWRevealToggleAnimationTypeSpring
|
||||
@property (nonatomic) SWRevealToggleAnimationType toggleAnimationType;
|
||||
|
||||
// When animation type is SWRevealToggleAnimationTypeSpring determines the damping ratio, default is 1
|
||||
@property (nonatomic) CGFloat springDampingRatio;
|
||||
|
||||
// Duration for animated replacement of view controllers
|
||||
@property (nonatomic) NSTimeInterval replaceViewAnimationDuration;
|
||||
|
||||
// Defines the radius of the front view's shadow, default is 2.5f
|
||||
@property (nonatomic) CGFloat frontViewShadowRadius;
|
||||
|
||||
// Defines the radius of the front view's shadow offset default is {0.0f,2.5f}
|
||||
@property (nonatomic) CGSize frontViewShadowOffset;
|
||||
|
||||
// Defines the front view's shadow opacity, default is 1.0f
|
||||
@property (nonatomic) CGFloat frontViewShadowOpacity;
|
||||
|
||||
// Defines the front view's shadow color, default is blackColor
|
||||
@property (nonatomic) UIColor *frontViewShadowColor;
|
||||
|
||||
// Defines whether the controller should clip subviews to its view bounds. Default is NO.
|
||||
// Set this to YES when you are presenting this controller as a non full-screen child of a
|
||||
// custom container controller which does not explicitly clips its subviews.
|
||||
@property (nonatomic) BOOL clipsViewsToBounds;
|
||||
|
||||
// Defines whether your views clicable area extends beyond the bounds of this controller. Default is NO.
|
||||
// Set this to YES if you are presenting this controller as a non full-screen child of a custom container and you are not
|
||||
// clipping your front view to this controller bounds.
|
||||
@property (nonatomic) BOOL extendsPointInsideHit;
|
||||
|
||||
/* The class properly handles all the relevant calls to appearance methods on the contained controllers.
|
||||
Moreover you can assign a delegate to let the class inform you on positions and animation activity */
|
||||
|
||||
// Delegate
|
||||
@property (nonatomic,weak) id<SWRevealViewControllerDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
#pragma mark - SWRevealViewControllerDelegate Protocol
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SWRevealControllerOperationNone,
|
||||
SWRevealControllerOperationReplaceRearController,
|
||||
SWRevealControllerOperationReplaceFrontController,
|
||||
SWRevealControllerOperationReplaceRightController,
|
||||
|
||||
} SWRevealControllerOperation;
|
||||
|
||||
|
||||
@protocol SWRevealViewControllerDelegate<NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
// The following delegate methods will be called before and after the front view moves to a position
|
||||
- (void)revealController:(SWRevealViewController *)revealController willMoveToPosition:(FrontViewPosition)position;
|
||||
- (void)revealController:(SWRevealViewController *)revealController didMoveToPosition:(FrontViewPosition)position;
|
||||
|
||||
// This will be called inside the reveal animation, thus you can use it to place your own code that will be animated in sync
|
||||
- (void)revealController:(SWRevealViewController *)revealController animateToPosition:(FrontViewPosition)position;
|
||||
|
||||
// Implement this to return NO when you want the pan gesture recognizer to be ignored
|
||||
- (BOOL)revealControllerPanGestureShouldBegin:(SWRevealViewController *)revealController;
|
||||
|
||||
// Implement this to return NO when you want the tap gesture recognizer to be ignored
|
||||
- (BOOL)revealControllerTapGestureShouldBegin:(SWRevealViewController *)revealController;
|
||||
|
||||
// Implement this to return YES if you want other gesture recognizer to share touch events with the pan gesture
|
||||
- (BOOL)revealController:(SWRevealViewController *)revealController
|
||||
panGestureRecognizerShouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer;
|
||||
|
||||
// Implement this to return YES if you want other gesture recognizer to share touch events with the tap gesture
|
||||
- (BOOL)revealController:(SWRevealViewController *)revealController
|
||||
tapGestureRecognizerShouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer;
|
||||
|
||||
// Called when the gestureRecognizer began and ended
|
||||
- (void)revealControllerPanGestureBegan:(SWRevealViewController *)revealController;
|
||||
- (void)revealControllerPanGestureEnded:(SWRevealViewController *)revealController;
|
||||
|
||||
// The following methods provide a means to track the evolution of the gesture recognizer.
|
||||
// The 'location' parameter is the X origin coordinate of the front view as the user drags it
|
||||
// The 'progress' parameter is a number ranging from 0 to 1 indicating the front view location relative to the
|
||||
// rearRevealWidth or rightRevealWidth. 1 is fully revealed, dragging ocurring in the overDraw region will result in values above 1.
|
||||
// The 'overProgress' parameter is a number ranging from 0 to 1 indicating the front view location relative to the
|
||||
// overdraw region. 0 is fully revealed, 1 is fully overdrawn. Negative values occur inside the normal reveal region
|
||||
- (void)revealController:(SWRevealViewController *)revealController panGestureBeganFromLocation:(CGFloat)location progress:(CGFloat)progress overProgress:(CGFloat)overProgress;
|
||||
- (void)revealController:(SWRevealViewController *)revealController panGestureMovedToLocation:(CGFloat)location progress:(CGFloat)progress overProgress:(CGFloat)overProgress;
|
||||
- (void)revealController:(SWRevealViewController *)revealController panGestureEndedToLocation:(CGFloat)location progress:(CGFloat)progress overProgress:(CGFloat)overProgress;
|
||||
|
||||
// Notification of child controller replacement
|
||||
- (void)revealController:(SWRevealViewController *)revealController willAddViewController:(UIViewController *)viewController
|
||||
forOperation:(SWRevealControllerOperation)operation animated:(BOOL)animated;
|
||||
- (void)revealController:(SWRevealViewController *)revealController didAddViewController:(UIViewController *)viewController
|
||||
forOperation:(SWRevealControllerOperation)operation animated:(BOOL)animated;
|
||||
|
||||
// Support for custom transition animations while replacing child controllers. If implemented, it will be fired in response
|
||||
// to calls to 'setXXViewController' methods
|
||||
- (id<UIViewControllerAnimatedTransitioning>)revealController:(SWRevealViewController *)revealController
|
||||
animationControllerForOperation:(SWRevealControllerOperation)operation fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC;
|
||||
|
||||
// DEPRECATED - The following delegate methods will be removed some time in the future
|
||||
- (void)revealController:(SWRevealViewController *)revealController panGestureBeganFromLocation:(CGFloat)location progress:(CGFloat)progress; // (DEPRECATED)
|
||||
- (void)revealController:(SWRevealViewController *)revealController panGestureMovedToLocation:(CGFloat)location progress:(CGFloat)progress; // (DEPRECATED)
|
||||
- (void)revealController:(SWRevealViewController *)revealController panGestureEndedToLocation:(CGFloat)location progress:(CGFloat)progress; // (DEPRECATED)
|
||||
@end
|
||||
|
||||
|
||||
#pragma mark - UIViewController(SWRevealViewController) Category
|
||||
|
||||
// A category of UIViewController to let childViewControllers easily access their parent SWRevealViewController
|
||||
@interface UIViewController(SWRevealViewController)
|
||||
|
||||
- (SWRevealViewController*)revealViewController;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
#pragma mark - StoryBoard support Classes
|
||||
|
||||
/* StoryBoard support */
|
||||
|
||||
// String identifiers to be applied to segues on a storyboard
|
||||
extern NSString* const SWSegueRearIdentifier; // this is @"sw_rear"
|
||||
extern NSString* const SWSegueFrontIdentifier; // this is @"sw_front"
|
||||
extern NSString* const SWSegueRightIdentifier; // this is @"sw_right"
|
||||
|
||||
/* This will allow the class to be defined on a storyboard */
|
||||
|
||||
// Use this along with one of the above segue identifiers to segue to the initial state
|
||||
@interface SWRevealViewControllerSegueSetController : UIStoryboardSegue
|
||||
@end
|
||||
|
||||
// Use this to push a view controller
|
||||
@interface SWRevealViewControllerSeguePushController : UIStoryboardSegue
|
||||
@end
|
||||
|
||||
|
||||
//#pragma mark - SWRevealViewControllerSegue (DEPRECATED)
|
||||
//
|
||||
//@interface SWRevealViewControllerSegue : UIStoryboardSegue // DEPRECATED: USE SWRevealViewControllerSegueSetController instead
|
||||
//@property (nonatomic, strong) void(^performBlock)( SWRevealViewControllerSegue* segue, UIViewController* svc, UIViewController* dvc );
|
||||
//@end
|
||||
1897
Limelight/ViewControllers/SWRevealViewController.m
Executable file
1897
Limelight/ViewControllers/SWRevealViewController.m
Executable file
File diff suppressed because it is too large
Load Diff
20
Limelight/ViewControllers/SettingsViewController.h
Normal file
20
Limelight/ViewControllers/SettingsViewController.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// SettingsViewController.h
|
||||
// Limelight
|
||||
//
|
||||
// Created by Diego Waxemberg on 10/27/14.
|
||||
// Copyright (c) 2014 Limelight Stream. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
@interface SettingsViewController : UIViewController
|
||||
@property (strong, nonatomic) IBOutlet UILabel *bitrateLabel;
|
||||
@property (strong, nonatomic) IBOutlet UISlider *bitrateSlider;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *framerateSelector;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *resolutionSelector;
|
||||
|
||||
- (void) saveSettings;
|
||||
|
||||
@end
|
||||
64
Limelight/ViewControllers/SettingsViewController.m
Normal file
64
Limelight/ViewControllers/SettingsViewController.m
Normal file
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// SettingsViewController.m
|
||||
// Limelight
|
||||
//
|
||||
// Created by Diego Waxemberg on 10/27/14.
|
||||
// Copyright (c) 2014 Limelight Stream. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SettingsViewController.h"
|
||||
#import "Settings.h"
|
||||
#import "DataManager.h"
|
||||
|
||||
#define BITRATE_INTERVAL 100
|
||||
|
||||
@implementation SettingsViewController {
|
||||
NSInteger _bitrate;
|
||||
}
|
||||
static NSString* bitrateFormat = @"Bitrate: %d bps";
|
||||
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
DataManager* dataMan = [[DataManager alloc] init];
|
||||
Settings* currentSettings = [dataMan retrieveSettings];
|
||||
|
||||
_bitrate = [currentSettings.bitrate integerValue];
|
||||
NSInteger framerate = [currentSettings.framerate integerValue] == 30 ? 0 : 1;
|
||||
NSInteger resolution = [currentSettings.height integerValue] == 720 ? 0 : 1;
|
||||
|
||||
[self.resolutionSelector setSelectedSegmentIndex:resolution];
|
||||
[self.framerateSelector setSelectedSegmentIndex:framerate];
|
||||
[self.bitrateSlider setValue:_bitrate animated:YES];
|
||||
[self.bitrateSlider addTarget:self action:@selector(bitrateSliderMoved) forControlEvents:UIControlEventValueChanged];
|
||||
[self.bitrateLabel setText:[NSString stringWithFormat:bitrateFormat, (int)_bitrate]];
|
||||
}
|
||||
|
||||
- (void) bitrateSliderMoved {
|
||||
_bitrate = BITRATE_INTERVAL * floor((self.bitrateSlider.value/BITRATE_INTERVAL)+0.5);
|
||||
[self.bitrateLabel setText:[NSString stringWithFormat:bitrateFormat, (int)_bitrate]];
|
||||
}
|
||||
|
||||
|
||||
- (void) saveSettings {
|
||||
DataManager* dataMan = [[DataManager alloc] init];
|
||||
NSInteger framerate = [self.framerateSelector selectedSegmentIndex] == 0 ? 30 : 60;
|
||||
NSInteger height = [self.resolutionSelector selectedSegmentIndex] == 0 ? 720 : 1080;
|
||||
NSInteger width = height == 720 ? 1280 : 1920;
|
||||
[dataMan saveSettingsWithBitrate:_bitrate framerate:framerate height:height width:width];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Navigation
|
||||
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -25,6 +25,8 @@
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
[self.navigationController setNavigationBarHidden:YES animated:YES];
|
||||
|
||||
[self.stageLabel setText:@"Starting App"];
|
||||
[self.stageLabel sizeToFit];
|
||||
self.stageLabel.center = CGPointMake(self.view.frame.size.width / 2, self.stageLabel.center.y);
|
||||
@@ -45,9 +47,13 @@
|
||||
object:nil];
|
||||
}
|
||||
|
||||
- (void) returnToMainFrame {
|
||||
[self.navigationController popToRootViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(NSNotification *)notification {
|
||||
[_streamMan stopStream];
|
||||
[self performSegueWithIdentifier:@"returnToMainFrame" sender:self];
|
||||
[self returnToMainFrame];
|
||||
}
|
||||
|
||||
- (void) connectionStarted {
|
||||
@@ -65,7 +71,7 @@
|
||||
|
||||
UIAlertController* conTermAlert = [UIAlertController alertControllerWithTitle:@"Connection Terminated" message:@"The connection terminated unexpectedly" preferredStyle:UIAlertControllerStyleAlert];
|
||||
[conTermAlert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){
|
||||
[self performSegueWithIdentifier:@"returnToMainFrame" sender:self];
|
||||
[self returnToMainFrame];
|
||||
}]];
|
||||
[self presentViewController:conTermAlert animated:YES completion:nil];
|
||||
|
||||
@@ -92,7 +98,7 @@
|
||||
stageName, errorCode]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){
|
||||
[self performSegueWithIdentifier:@"returnToMainFrame" sender:self];
|
||||
[self returnToMainFrame];
|
||||
}]];
|
||||
[self presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
@@ -102,7 +108,7 @@
|
||||
message:message
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){
|
||||
[self performSegueWithIdentifier:@"returnToMainFrame" sender:self];
|
||||
[self returnToMainFrame];
|
||||
}]];
|
||||
[self presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
|
||||
@@ -11,10 +11,20 @@
|
||||
<view key="view" contentMode="scaleToFill" id="Icf-Kt-Ai7">
|
||||
<rect key="frame" x="0.0" y="0.0" width="1024" height="768"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" id="xFJ-oz-Sim">
|
||||
<rect key="frame" x="16" y="20" width="34" height="34"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" backgroundImage="Settings">
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
<connections>
|
||||
<outlet property="settingsButton" destination="xFJ-oz-Sim" id="SqR-wJ-2Gg"/>
|
||||
<segue destination="OIm-0n-i9v" kind="modal" identifier="createStreamFrame" modalPresentationStyle="fullScreen" id="MOD-9A-3Sk"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
@@ -60,6 +70,9 @@
|
||||
<point key="canvasLocation" x="1252" y="-312"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="Settings" width="37" height="37"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="lightContent"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="14A388a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="dgh-JZ-Q7z">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="14A388a" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="DL0-L5-LOv">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Main Frame View Controller-->
|
||||
<!--Limelight-->
|
||||
<scene sceneID="emz-kO-L7q">
|
||||
<objects>
|
||||
<viewController id="dgh-JZ-Q7z" customClass="MainFrameViewController" sceneMemberID="viewController">
|
||||
@@ -14,15 +14,119 @@
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<toolbarItems/>
|
||||
<navigationItem key="navigationItem" title="Limelight" id="1jn-Sf-Xky">
|
||||
<barButtonItem key="leftBarButtonItem" image="Settings" id="5gr-O1-slj"/>
|
||||
</navigationItem>
|
||||
<simulatedToolbarMetrics key="simulatedBottomBarMetrics"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
<connections>
|
||||
<segue destination="mI3-9F-XwU" kind="modal" identifier="createStreamFrame" id="cPc-eP-un1"/>
|
||||
<outlet property="settingsSidebarButton" destination="5gr-O1-slj" id="vK6-bY-5h5"/>
|
||||
<segue destination="mI3-9F-XwU" kind="push" identifier="createStreamFrame" id="Vgc-B6-lvM"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="HNf-lX-GEO" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="199" y="7"/>
|
||||
<point key="canvasLocation" x="1363" y="796"/>
|
||||
</scene>
|
||||
<!--Reveal View Controller-->
|
||||
<scene sceneID="QYt-XN-Ojr">
|
||||
<objects>
|
||||
<viewController id="DL0-L5-LOv" customClass="SWRevealViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Usg-e0-g4a">
|
||||
<rect key="frame" x="0.0" y="0.0" width="568" height="320"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
<connections>
|
||||
<segue destination="rYd-e6-cQU" kind="custom" identifier="sw_rear" customClass="SWRevealViewControllerSegueSetController" id="vBQ-bn-yZu"/>
|
||||
<segue destination="ftZ-kC-fxI" kind="custom" identifier="sw_front" customClass="SWRevealViewControllerSegueSetController" id="V3E-d5-bsZ"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="RXm-iV-Zqb" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-64" y="804"/>
|
||||
</scene>
|
||||
<!--Side Bar-->
|
||||
<scene sceneID="uYM-56-Ivb">
|
||||
<objects>
|
||||
<viewController id="rYd-e6-cQU" userLabel="Side Bar" customClass="SettingsViewController" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="iNk-qF-gIr" customClass="UIScrollView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="568" height="320"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="10000" minValue="0.0" maxValue="50000" id="3nn-MI-9Xu">
|
||||
<rect key="frame" x="14" y="72" width="204" height="31"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</slider>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bitrate: 10000 bps" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="SBv-Wn-LB7">
|
||||
<rect key="frame" x="17" y="43" width="142" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="1" id="dLF-qJ-2nY">
|
||||
<rect key="frame" x="16" y="156" width="123" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<segments>
|
||||
<segment title="30 Hz"/>
|
||||
<segment title="60 Hz"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Framerate:" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Kkv-DF-MAl">
|
||||
<rect key="frame" x="16" y="127" width="83" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Resolution" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="8zy-ri-Dqc">
|
||||
<rect key="frame" x="16" y="206" width="82" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" id="PCM-t4-Sha">
|
||||
<rect key="frame" x="16" y="235" width="123" height="29"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<segments>
|
||||
<segment title="720p"/>
|
||||
<segment title="1080p"/>
|
||||
</segments>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
<connections>
|
||||
<outlet property="bitrateLabel" destination="SBv-Wn-LB7" id="Wdu-me-Bvd"/>
|
||||
<outlet property="bitrateSlider" destination="3nn-MI-9Xu" id="IuD-Rk-vPp"/>
|
||||
<outlet property="framerateSelector" destination="dLF-qJ-2nY" id="hE3-hk-iwa"/>
|
||||
<outlet property="resolutionSelector" destination="PCM-t4-Sha" id="t60-W2-wkV"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="RWc-Km-KG5" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="1363" y="1266"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="pfX-8A-htT">
|
||||
<objects>
|
||||
<navigationController id="ftZ-kC-fxI" sceneMemberID="viewController">
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" id="0ZA-Ec-QgD">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<connections>
|
||||
<segue destination="dgh-JZ-Q7z" kind="relationship" relationship="rootViewController" id="NhF-R8-8s3"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="Dr2-S8-dHh" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="660" y="796"/>
|
||||
</scene>
|
||||
<!--Stream Frame View Controller-->
|
||||
<scene sceneID="5Eb-q2-vjt">
|
||||
@@ -46,20 +150,24 @@
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="8uX-4T-BiC"/>
|
||||
<nil key="simulatedStatusBarMetrics"/>
|
||||
<nil key="simulatedTopBarMetrics"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<simulatedOrientationMetrics key="simulatedOrientationMetrics" orientation="landscapeRight"/>
|
||||
<connections>
|
||||
<outlet property="spinner" destination="0vm-Iv-K4b" id="Lif-zG-6Jh"/>
|
||||
<outlet property="stageLabel" destination="2HK-Z5-4Ch" id="1bI-Ig-OpD"/>
|
||||
<segue destination="dgh-JZ-Q7z" kind="modal" identifier="returnToMainFrame" id="djB-MF-L5D"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="pqv-jd-33O" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="930" y="-14"/>
|
||||
<point key="canvasLocation" x="2092" y="796"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="Settings" width="17" height="17"/>
|
||||
</resources>
|
||||
<simulatedMetricsContainer key="defaultSimulatedMetrics">
|
||||
<simulatedStatusBarMetrics key="statusBar"/>
|
||||
<simulatedOrientationMetrics key="orientation"/>
|
||||
|
||||
Reference in New Issue
Block a user