UITabBarItem loses tint on PopViewController - uitabbarcontroller

Ok, so, I have UINavigationController embedded in a UITabBarController. When selecting the tab bar item, I am presented with the UITableView that is the root of the NavController. Selecting an item in the table takes me to the next view (push) where I set values for that item. Upon hitting Save Changes, I pop the user back to the root controller (the table view). However, the UITabBarItem has gone from a tint of Blue back to the default tint of grey. If, while in the second screen, I hit cancel in the NavBar to return to the root, the UITabBarItem is fine, i.e. still selected and tinted blue.
I have tried several approaches including setting the TabBar's selected item on viewWillAppear as well as trying to set the tint in the UITabBarController itself. Nothing seems to fix the issue. What is really interesting is that, in the UITableView's viewDidAppear (the root view) if I set the selected TabBarItem's tint to blue, the resulting color is a dark grey.
If I select another item in the tab bar and then select the first item again, the blue tint returns. It has something to do with the popping back to the root view that is causing this.
Has anyone seen this? Any thoughts?

If you have any modals or pop-ups (such as an AlertView) in either viewWillAppear, viewDidLoad, (or anytime before the view has finally appeared), it will cause the tint to change upon popping a view.
Check your second view controller if it has any such thing.

Related

Declare bottom zone in a SwiftUI navigation sidebar below a list

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.

When exactly is onAppear called in SwiftUI?

Can anyone explain exactly when onAppear is called in SwiftUI. Docs say A view that triggers action when this view appears.
When the view with onAppear changes and is thus rendered again is probably clear. But what about:
When one of its child views changes?
When one of its siblings changes?
When its parent changes?
When navigating back in a NavigationView?
When changing back to a tab view that was previously on the screen, but has not otherwise changed?
Any time it appears on the screen?
When app returns from background?
...

Owner drawing a checkbox List View

I have created a List view control with View = Icon / List, with LVS_EX_CHECKBOXES enabled.
And the checkboxes overlap with the items text, so I am wondering how could I create a owner drawn list view with checkboxes ?
I have seen that one has to process LVN_ITEMCHANGED notitication to test if an item has been checked.
How does this apply when the checkbox itself gets owner drawn, how do I approach this problem.
How Do I manage the events, the checkbox checking and unchecking while drawing my own, do I have to implement the checking routines myself or do I get something from the window? A message or something? While drawing my own checkbox how do I differentiate between a click on the item and a click on the checkbox, do I have to check the coordinates of the cursor when the click occured? how do I do this.
THis is with view= icon, it shows ok with view=list

Hover on dropdown menu

http://www.funky7inc.com/product/detroit-police
if you hover over the area where the dropdown is on "Detroit Apparel" the list pops up instead of only appearing when you hover over the nav.
any ideas how to fix this?
Sure, you only change the opacity of that <ul class="sub-menu">... So it is actually always there, only 100% seethrough... But you can still hover over it which changes the opacity back to fully visible.
I don't know how you change this (CSS:hover of Javascript or something, I tried looking but you have minified CSS) but you can solve this by not changing just the opacity but also the display:block to display:none so it is actually gone, or use javascript $(".sub-menu").hide() or .FadeIn()/fadeOut() or something similar...
It is because you are changing the opacity of the drop down list. Opacity:0 still registers mouse over event.
Instead use visibility property or display:none
When you will hide the drop down using visibility or display:none, drop down list would not register mouse over and hence the list would not show up till the time hover is on the navigation bar.
Hope this helps.

when I Using Three20 to Launch another UITabBarController in a TTLauncherView ,Original UITabBarController Tabbar Can't disappear

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