Comments (18)
Yes, good idea! Why use the TV Remote Menu Button to reveal/hide side view instead of gesture or button on screen? And if you have left and right side views?
from pbrevealviewcontroller.
Yes tap gesture is on the focus on tvOS. We'll see that, it's a good idea.
from pbrevealviewcontroller.
I know we can do that but this is not allowed by Apple:
from pbrevealviewcontroller.
you are right , i had to disable tap gesture because when I tap on the table cell it used to hide the menu, I had to use pan gesture to hide the menu.
from pbrevealviewcontroller.
was testing pan gesture and it doesn't work once you are on the side menu, to dismiss it i have to select the cell
from pbrevealviewcontroller.
I did some tests. It seems that the menu (left side) should be opened if there is no left focus remaining in the main view. But if there is no focus left, methods shouldUpdateFocusInContext and didUpdateFocusInContext are not called. This is an example that opens the menu with the Menu button on the remote control and if the menu is open, the Menu button returns to the system. So I turned off the tap and pan for the TV! If you have any ideas, welcome ???
from pbrevealviewcontroller.
i tested it with a UITapGestureRecognizer , it worked fine and the Menu Button didn't return to the system.
- (void)viewDidLoad {
[super viewDidLoad];
UITapGestureRecognizer *tapGestureRec = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
tapGestureRec.allowedPressTypes = @[@(UIPressTypeMenu)];
[self.view addGestureRecognizer:tapGestureRec];
}
- (void)handleTap:(UITapGestureRecognizer *)recognizer {
if (self.isLeftViewOpen) {
[self revealLeftView];
} else {
[self revealLeftView];
}
}
we should add a tap gesture in the controller just for tvOS
#if TARGET_OS_TV
//menu tap
#endif
I was thinking about adding a property in the Delegate to change which view you want to show with siri remote control, by default it will be added to left view
from pbrevealviewcontroller.
I added the menu Tap inside the controller for tvOS Target
check my code :
PBRevealViewController tvOS.zip
from pbrevealviewcontroller.
Do you know an application with a left side menu on tvOS? In general, they use top shelf.
from pbrevealviewcontroller.
you're right , and what if we use another gesture for that? play/pause button
or open menu with menu and close it with play/pause or swipe gesture
from pbrevealviewcontroller.
In my sample, you can show left menu if you press menu button and if left menu is open, if you press again menu button, the Apple tv home screen is shown. Is it not ok?
from pbrevealviewcontroller.
yes it works , what do you think about adding the UITapGestureRecognizer but with another button ?
from pbrevealviewcontroller.
I tried to reproduce the same behavior as the top shelf. I added two invisibles button for opening left and right view. For example, for the left view call [self tvOSLeftRevealButton]; This will create an invisible button and It will open the left view when it is focused by swiping. Also added swipe gesture recognizer to hide them. And the press menu button functionality for opening the left view and again to return to home screen. And using focus environment protocol methods to update the focus. What about this?
from pbrevealviewcontroller.
thanks I will test it and give you a feedback!
from pbrevealviewcontroller.
Ok. Can we continue this discussion via our email addresses? Mine is [email protected]
from pbrevealviewcontroller.
Rather, test this one. It is a better project with corrected bugs.
from pbrevealviewcontroller.
great, yes we can continue via our email mine is [email protected]
from pbrevealviewcontroller.
just tested it and it works perfectly!
from pbrevealviewcontroller.
Related Issues (20)
- didShowLeft delegate called when left view not open HOT 4
- SWRevealViewController to PBRevealViewController "FrontViewPosition" HOT 2
- Is there a way to enable/disable the menu from opening? HOT 7
- Do you have plans to update to Swift 5? HOT 3
- PBRevealViewController and using IB Traits Variations HOT 2
- MenuController with menu button. Without Storyboards. Need Help ! HOT 6
- Equivalent code SWRevealViewController in PBRevealViewController HOT 3
- Slider menu is not working when jump from appDelegate to ViewController HOT 2
- Question HOT 2
- Dismiss keyboard when menu button pressed HOT 2
- Swipe to delete UITableView HOT 4
- Dismiss left view HOT 2
- revealViewController() is coming back nil HOT 1
- Warning: Attempt to present <UINavigationController: 0x7c284400> on <PBRevealViewController HOT 3
- How to create dynamic menu items in swrevealviewcontroller objective c
- Is there any way to cache the MainViewControllers? HOT 8
- How to enable disable opening Left menu feature on UIViewControllers. HOT 1
- How to fade FrontViewcontroller on swipe or Pangesture. HOT 1
- How can i show a AlertView on Tap or pangesture for Left menu opening on each specific viewcontroller HOT 1
- Difference between SWRevealViewController & PBRevealViewController, and migration path HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pbrevealviewcontroller.