Wednesday, November 08, 2017

Grey blank toolbar on TableView

During my work on my iOS app (TapToCount - 3W), I had a very bizarre issue. There is grey blank toolbar appearing above tab bar on one of tableview controller.

Problem


Actually, the main view with tableview looks OK initially. A grey blank tool bar appears above tab bar after back from a detail view.



The detail view is popped up from the main view when a row of tableview is selected by using navigation controller. The detail view shows a toolbar with some buttons, but no tab bar. Look at detail view, I notice that the tool bar actually is raised up from bottom.




I tried to find what settings triggered this problem from storyboard on both main and detail views, as well as my codes for those views. I could not find anything wrong.

One thing I noticed is that the English version runs good. The problem only appeared on my Chinese version (when I changed iOS language to simplified Chinese, but traditional Chinese is good). I think that it must be something I might changed in storyboard for simplified Chinese. Most unlikely in my view controller codes.

Snapshots to Find out Differences


I am using MaBook Air 2014 on my App. There are tens of property settings in a view. It is really very painful slow (about 40 secs) to compare those settings switch back and forth between Chinese and English storyboards. I found a trick to do the checking, taking snapshots of property settings in one language and then using those snapshots to compare property settings in another language.

Interesting thing is that both main and detail views are exactly same! That puzzled me. Soon I realize that the view is driven by navigation controller. There might be something different in navigation controller. There are several navigation controllers: root view controller (tab view controller as start), master view controller (split view controller), and navigation controller.

From those view controllers, I found the differences!







I am not sure what those marked settings mean. I changed the settings in views of Chinese storyboard. voilà! It works!

Here is the current version of views for the same problem ones as in above.






Conclusion


Sometimes, it may be hard to find out straight solutions either from my own knowledge/skills or internet. There may be some other ways to target the issue. Here is an example, from working version as start, then trace down the difference in the problem target.

I am not going to explain what caused the problem. I may figure out reason behind those property settings. This blog is just a note about my programming experience and growth.

0 comments: