Skip to content

Commit

Permalink
UI layout unification: remove obsolete section on extended layout in …
Browse files Browse the repository at this point in the history
…NOTES.Design (#371)
  • Loading branch information
herzbube committed Mar 26, 2022
1 parent 6a1c9af commit 76c6167
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions doc/NOTES.Design
Original file line number Diff line number Diff line change
Expand Up @@ -162,46 +162,6 @@ View controller hierarchy for UITypePhonePortraitOnly:
+-- UICollectionView (BoardPositionCollectionViewCell cells)


iOS 7 and Auto Layout
---------------------
In iOS 7 Apple added the concept of translucent / transparent bars (tab bars,
navigation bars, toolbars, the status bar) and of views that extend behind
those bars. Despite a variety of APIs that allow the developer to control the
behaviour of view controllers, I have had a lot of trouble adapting the app to
the new concept - possibly this has to do with the fact that, personally, I find
the concept quite silly.

Reasons for the current layout:
- When not zoomed the Go board is drawn so that it fully fits into the visible
area, with no scrolling possible. In this mode it doesn't make sense to let
the wooden background extend behind bars.
- When zoomed the Go board can be scrolled. I have decided that in this mode I
also don't want the board to extend behind bars. After all this is a game app,
not a document viewing app.

These decisions require a number of view controller configuration steps to make
the app look right. Here is an overview:
- To prevent the board from extending behind the status bar, Auto Layout
constraints like this have been added in various places:
[NSString stringWithFormat:@"V:|-%d-[navigationBarView]", [UiElementMetrics statusBarHeight]],
The key too look for is the UiElementMetrics class method statusBarHeight.
- UIViewController.automaticallyAdjustsScrollViewInsets = NO
- Applied to all types of PlayRootViewController
- Is required so that BoardView does not allow scrolling when not zoomed (e.g.
directly after application launch)
- Is required so that the bottom rows of the board position list table view
(which is a scroll view) remain visible after a portrait-to-landscape
interface rotation
- Although PlayRootViewController view controllers do not themselves contain
any scroll views, apparently this property is somehow propagated to those
child view controllers that *do* have scroll views. Surprisingly (and beyond
comprehension) the same propagation mechanism no longer works if
automaticallyAdjustsScrollViewInsets is set on the parent view controller
of PlayRootViewController. What is the logic behind this? I don't know :-(
- UIViewController.edgesForExtendedLayout has been set in various places
- TODO Where and why?


Working with .sgf files
-----------------------
In older versions of the app .sgf files used to be loaded and saved by the
Expand Down

0 comments on commit 76c6167

Please sign in to comment.