settingView close/expand control
This commit is contained in:
1 parent
a591380d60
commit
fcb68bc54f
5 files changed
+18
-15
No files matched your search
@@ -30,7 +30,8 @@
|
|||||||
@property (weak, nonatomic) IBOutlet UINavigationItem *navigationItem;
|
@property (weak, nonatomic) IBOutlet UINavigationItem *navigationItem;
|
||||||
|
|
||||||
|
|
||||||
-(void)simulateSettingsButtonPress;
|
-(void)expandSettingsView;
|
||||||
|
- (void)closeSettingViewAnimated:(BOOL)anaimated;
|
||||||
-(void)reloadStreamConfig;
|
-(void)reloadStreamConfig;
|
||||||
-(bool)isIPhonePortrait;
|
-(bool)isIPhonePortrait;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -382,13 +382,12 @@ static NSMutableSet* hostList;
|
|||||||
if (host.state == StateOnline && host.pairState == PairStatePaired && host.appList.count > 0) {
|
if (host.state == StateOnline && host.pairState == PairStatePaired && host.appList.count > 0) {
|
||||||
[self switchToAppView];
|
[self switchToAppView];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)launchButtonTappedForHost:(TemporaryHost *)host {
|
- (void)launchButtonTappedForHost:(TemporaryHost *)host {
|
||||||
_selectedHost = host;
|
_selectedHost = host;
|
||||||
if (host.state == StateOnline && host.pairState == PairStatePaired && host.appList.count > 0) {
|
if (host.state == StateOnline && host.pairState == PairStatePaired && host.appList.count > 0) {
|
||||||
[[self revealViewController] revealToggleAnimated:NO];
|
[self closeSettingViewAnimated:NO];
|
||||||
[self switchToAppView];
|
[self switchToAppView];
|
||||||
[self updateAppsForHost:_selectedHost];
|
[self updateAppsForHost:_selectedHost];
|
||||||
[self prepareToStreamApp:_sortedAppList.firstObject];
|
[self prepareToStreamApp:_sortedAppList.firstObject];
|
||||||
@@ -1065,13 +1064,19 @@ static NSMutableSet* hostList;
|
|||||||
|
|
||||||
#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
|
|
||||||
- (void)simulateSettingsButtonPress { //simulate pressing the setting button, called from setting view controller.
|
- (void)expandSettingsView { //simulate pressing the setting button, called from setting view controller.
|
||||||
//if([self isIPhonePortrait]) return; // disable settings view expanding in iphone portrait mode since it's buggy.
|
if (currentPosition == FrontViewPositionLeft) {
|
||||||
if (_settingsButton.target && [_settingsButton.target respondsToSelector:_settingsButton.action]) {
|
[[self revealViewController] revealToggleAnimated:YES];
|
||||||
[_settingsButton.target performSelector:_settingsButton.action withObject:_settingsButton];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)closeSettingViewAnimated:(BOOL)anaimated { //simulate pressing the setting button, called from setting view controller.
|
||||||
|
if (currentPosition != FrontViewPositionLeft) {
|
||||||
|
[[self revealViewController] revealToggleAnimated:anaimated];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)handleOrientationChange {
|
- (void)handleOrientationChange {
|
||||||
// UIDeviceOrientation targetOrientation = [[UIDevice currentDevice] orientation];
|
// UIDeviceOrientation targetOrientation = [[UIDevice currentDevice] orientation];
|
||||||
// if([self isIPhone] && UIDeviceOrientationIsPortrait(targetOrientation)) [self simulateSettingsButtonPressClose]; // on iphone, force close settings views if target orietation is portrait.
|
// if([self isIPhone] && UIDeviceOrientationIsPortrait(targetOrientation)) [self simulateSettingsButtonPressClose]; // on iphone, force close settings views if target orietation is portrait.
|
||||||
|
|||||||
@@ -328,12 +328,6 @@ BOOL isCustomResolution(CGSize res) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)simulateSettingsButtonPress{
|
|
||||||
[self.mainFrameViewController simulateSettingsButtonPress];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
- (void)viewDidDisappear:(BOOL)animated{
|
- (void)viewDidDisappear:(BOOL)animated{
|
||||||
[super viewDidDisappear:NO];
|
[super viewDidDisappear:NO];
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"SettingsViewClosedNotification" object:self]; // notify other view that settings view just closed
|
[[NSNotificationCenter defaultCenter] postNotificationName:@"SettingsViewClosedNotification" object:self]; // notify other view that settings view just closed
|
||||||
@@ -358,7 +352,7 @@ BOOL isCustomResolution(CGSize res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)edgeSwiped {
|
- (void)edgeSwiped {
|
||||||
[self simulateSettingsButtonPress];
|
[self.mainFrameViewController closeSettingViewAnimated:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isIPhone {
|
- (BOOL)isIPhone {
|
||||||
|
|||||||
@@ -729,10 +729,11 @@
|
|||||||
|
|
||||||
- (void)expandSettingsView{
|
- (void)expandSettingsView{
|
||||||
self.mainFrameViewcontroller.settingsExpandedInStreamView = true; //notify mainFrameViewContorller that this is a setting expansion in stream view, some settings shall be disabled.
|
self.mainFrameViewcontroller.settingsExpandedInStreamView = true; //notify mainFrameViewContorller that this is a setting expansion in stream view, some settings shall be disabled.
|
||||||
[self.mainFrameViewcontroller simulateSettingsButtonPress];
|
[self.mainFrameViewcontroller expandSettingsView];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)edgeSwiped{
|
- (void)edgeSwiped{
|
||||||
|
return; // disable this now.
|
||||||
if([self->_mainFrameViewcontroller isIPhonePortrait]){ // disable backmenu for iphone portrait mode;
|
if([self->_mainFrameViewcontroller isIPhonePortrait]){ // disable backmenu for iphone portrait mode;
|
||||||
[self returnToMainFrame]; //directly quit the session
|
[self returnToMainFrame]; //directly quit the session
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -1112,6 +1112,7 @@
|
|||||||
INFOPLIST_FILE = "Limelight/Limelight-Info.plist";
|
INFOPLIST_FILE = "Limelight/Limelight-Info.plist";
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = MoonlightZWM;
|
INFOPLIST_KEY_CFBundleDisplayName = MoonlightZWM;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
@@ -1170,6 +1171,7 @@
|
|||||||
INFOPLIST_FILE = "Limelight/Limelight-Info.plist";
|
INFOPLIST_FILE = "Limelight/Limelight-Info.plist";
|
||||||
INFOPLIST_KEY_CFBundleDisplayName = MoonlightZWM;
|
INFOPLIST_KEY_CFBundleDisplayName = MoonlightZWM;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
|
|||||||
Reference in new issue
Block a user