I'm using the rotator tool to enable swipe up or down between accessibility elements with accessibility trait set to .header. This works fine - in both up and down directions for cells within a tableview. And it works fine when you transition from the first cell UP to the nav bar title. But if you then try to swipe DOWN from the nav bar title to the first cell, it says "heading not found" and remains stuck in the nav bar. Left / right swipes transition correctly across all elements.
Related
Working in Xamarin.ios (basically UIkit) and I have a UITableView with the Navigation title set. The title does not show when the table/screen is scrolled to the top. It only shows when you scroll down and it shows the title in the nav bar. Whats the best way to show the title when scrolled to the top but then have that title disappear behinf the nav bar title when scrolling?
pic 1: Should show title/header ontop of tableview, but it doesn't. It does show the right bar button item though
pic 2: when the user scrolls the tableview the navbar appears and it shows the title
It only shows the navbar title when scrolling through the tableview. But when not scrolling there is no "default" title.
I added these 2 keys to hide status bar:
Status bar is initially hidden = YES
View controller-based status bar appearance = NO
It works great, but I realize that when clicking on the status bar area, we can actually click through the view underneath.
I have a UICollectionView behind the status bar area, and I can actually click on the collection cell. In the picture below, Cell #12 is right above Cell #16, and we can actually tap on upper right corner to trigger didSelectCell(atIndexPath.
How do I disable this "click through" behavior, and bring back the "auto scroll to top" behavior when tapping on status bar?
Try setting the UICollectionView top constraint to be constrained to the parent view safeAreaTopAnchor instead of the parent view topAnchor. That way you have the UICollectionView out of the way of the statusbar
I have a logo on a navigation bar. Beneath it, I have a searchbar with three bar buttons on its both sides.
The searchbar and bar buttons are put in a UIView which is beneath the navigationbar.
I want to implement a functionality where with a very small pinch of scroll on the tableview by user, the navigationbar should move above with animation with scroll up and should come down with animation for scroll down.
Along with this, the searchbar should occupy the position of the logo while scrolling up and should come at its original position when scrolling down.
This is the same functionality implemented in Flipkart app on the Home page.
I tried using SQTShyNavigationBar by Cocoa Controls
https://github.com/cbpowell/SQTShyNavigationBar, but that does not adjust the position of my search View.
Please help me with this.
I've got a gradient background that I want to show through both the navigation bar and the tab bar. I have them set to "translucent black". If I create a ViewController and put a TableView on it, this works perfectly. However, I can't get it to work properly with a TableViewController. The tab bar works fine, but the navigation bar ends up black. If I turn off "Adjust Scroll View Insets", then the navigation bar looks the way I want it, but the top half of the first table view row gets cut off (see examples). The gradient is on the background view. The background colour of the tableview is clear.
Is there any way to get the same effect on a TableViewController? Do I need to somehow make the heading or first row of the tableview be the background that goes under the nav bar?
ViewController with TableView added:
TableViewController with "Adjust Scroll View Insets" ON:
TableViewController with "Adjust Scroll View Insets" OFF:
After doing a test I think you'd need:
Adjusts Scroll View Insets ON
Extend Edges - Under Top Bars ON
No. 1 allow the UITableView to cover the entire screen (including under the navigation bar) and No. 2 adds a space at the top of the UITableView content so that the content is not hidden under the navigation bar.
I ran into a similar issue trying to set a full screen background on a static table view controller with a clear navigation bar. I solved it by using a backgroundView on my tableView instead of setting backgroundColor. For example:
myTableView.backgroundView = UIImageView(image: UIImage(named: "backgroundImg.png"))
I set my navigation bar to clear, but you could style that however you like:
navigationController?.navigationBar.backgroundColor = UIColor.clear
I also had to set Extend Edges - Under Top Bars ON
One of the common behaviours of Apple's AppleTV apps (like Movies and Television Shows) is that they start with a UITabBar visible, and all of the view's content is rendered in the space below the tab bar. Once focus moves from the tab bar to some content on the screen, the tab bar slides off the top of the screen, and the content moves/scrolls up to fill in the space that's now available. This process reverses itself if the tab bar reappears.
Is there an easy way to accomplish this behaviour (like a check box or something?), or must I implement the didUpdateFocusInContext:withAnimationCoordinator: method in various places, and manually tweak the frames or scroll the content or something?
Select the Tab Bar object in the Tab Bar Controller scene in Storyboard mode and uncheck "Translucent". The items in the views should now move upwards when the tab bar moves upwards.
The UITabBar class also has a translucent property