VFParallaxController icon indicating copy to clipboard operation
VFParallaxController copied to clipboard

Constants for view sizes are based on screen size and won't respect controller settings

Open xavbart opened this issue 7 years ago • 0 comments

Great implementation ! Thanks ! One issue : kScreenHeightWithoutStatusBar and kYDownTableView are based on UIScreen.main.bounds.size.height So the views' sizes are based on the screen size, which creates an issue when loading within a tabbar controller (for instance)

The created and resized views will never respect the automaticallyAdjustsScrollViewInsets = true as they are absolutely sized. Hence, when openShutter() is called, the header cell gets hidden under the TabBar and cannot be called.

Suggested solution : do not declare those 2 as fixed constants, but inside the class definition, and set them on viewDidLoad() to size up to the superview ? EDIT : suggested solution is missing a step… as in VDL no autolayout has been applied, and AL is what constrains to the tabbar. I guess one has to find out if we embed in controller and then gets the size of bottom tab, and reduce size of kScreenHeightWithoutStatusBar and kYDownTableView by this

xavbart avatar Apr 07 '17 13:04 xavbart