I used AVPlayer for movie player in my app. I explained the problem with diagrams.
When I click Play button in movie view controller(Portrait mode),then goes to movie details view. When I tap on the screen , the navigation bar and movie player bar appear. If you tap again the screen, it will disappear. This goes well when the device is in Portrait mode.
But, I changed my code to Landscape mode when I click on play button, it will automatically change to Landscape mode in movie details view.
So, the problem in here is that when I do like that, tapped area is only in top and cannot tap any other places. This happens when previous view controller(Movie View Controller) is in Portrait mode and Movie Details View is in Landscape mode.
The problem won't happen if first view controller(Movie View Controller) is in Landscape mode and second view controller (Movie Details view controller) is in Landscape mode.
I have no idea of how do I solve this problem. Does first view controller rotation mode effects to second view controller?
Please anyone help me this? Thanks for reading my long paragraph.
Related
In the below screenshots (taken from the Apple Developer app), we can see that the Account button sticks to the bottom of the sidebar.
When the window is tall enough (left), the list doesn’t scroll, Account button’s background color has no difference. When the window is not tall enough (right), causing the list to scroll, Account button changes its background color to reveal the relationship.
The list's scroll position can not be probed. How can I declare the Account button in SwiftUI?
That app is a UIKit catalyst app and the sidebar uses scrollViewDidScroll which uses the contentSize to set a bottomButtonState which is passed into a child UIHostingController (so the account button can be SwiftUI) which I would assume switches between a clear or solid background.
We cant get the scroll info in SwiftUI however a possible workaround would be to add dummy 1 pixel high cell to the bottom of the list and using its onAppear to set a binding that is used in a bottom view to enable/disable a background colour and should achieve the same effect.
I have started learning swiftUI so I have question about Navigation View. My app starts with splash screen which is embedded in Navigation View and after that I have navigation link to the second screen which is Tab View. Do I need navigation views in child views of Tab View if I have some button etc and I also need to go to other screens from them or I use primary navigation view which tab view is embedded in?
When using both TabView and NavigationView, TabView should always be the parent view and should contain NavigationView inside it.
Hope this clarifies what you’re looking for?
My app, written in SwiftUI 2.0, is based on a UIPageViewController which displays four panels, in the common onboarding style. The user can swipe through them, or advance them using an arrow button at the bottom.
I also have a button in the upper left that opens a slide out menu, which can be closed by with a tap gesture anywhere on the interface. This is driven by changing the geometry in the swiftui "Geometry Reader", in which the page controller is embedded.
All this works correctly, except when the user closes the side window, the swipe gestures fail to activate the transition between pages. The active page slides with the swipe, but then snaps back into place. However, the arrow button still advances the UIPageViewController to the appropriate next page.
What causes the swipe gesture to become inactive after this slide out is triggered?
I've posted a small sample app isolating the issue here: https://github.com/stevepvc/Slide-and-Swipe-Concept. The code controlling the slide out menu is in "Top Content View".
I want to show a popup view in my app in full screen, This screen contains tabbar and navigation bar both, i am getting the problem is when popup shows, it display only in middle of the screen, but I want to show in fullscreen and above on tabbar and navigationbar, If any person have any idea please provide yout thoughts and solution.I am attaching screenshot of my problem, plz give some solution.
self.container = [[UIView alloc] initWithFrame:self.window.bounds];
[self.container addSubview:self.alertView];
[self.window addSubview:self.container];
when I launch another UITabBarController in a LaunchView, the TTLauncherView is in the page in the original UITabBarController, the Dest Controller is another UITabBarController, but the Original UITabBarController's TabBar can't disappear.
So, in the UI, I have two TabBars, the Original TabBar in the Bottom, the second Dest Controller View display in the screen except the bottom tabbar.
This is not what I want. How to solve this problem to hide the Original TabBar and let the second Dest Controller to display Full Screen?
In the first Controller, I launch second controller by LauncherView button.
You need to hide the tab bar view when pushing the new controller using
controller.hidesBottomBarWhenPushed = YES;
Take a look on this tutorial from three20 wiki, it explains on how to hide the tab bar when pushing another controller.
http://three20.info/article/2010-11-10-Hiding-The-iphone-Tab-Bar-With-TTNavigator