Scrolling behind transparent ActionBar


#1

I’m trying to allow my page to scroll behind a transparent action bar in iOS, but am having finding a place to start. If someone is familiar with the iOS API, could you point me in the right direction?

Right now, my code for transparency is:

var navBar = topmost().ios.controller.navigationBar as UINavigationBar;
navBar.translucent = true;
navBar.setBackgroundImageForBarMetrics(UIImage.new(), UIBarMetrics.Default);
navBar.shadowImage = UIImage.new();
navBar.backgroundColor = UIColor.colorWithRedGreenBlueAlpha(1.0, 0, 0, 0.2);

Transparent Actionbar using Nativescript Angular
#2

I found this Github issue that has some promise: https://github.com/NativeScript/NativeScript/issues/3471. I’m continuing to investigate.


Tranparent action bar
#3

Well, that post helped a ton. There’s a property on the Page object called backgroundSpanUnderStatusBar. Setting this to true on page load (or in ngOnInit()) does exactly what I was looking for.

In retrospect, I don’t like the effect, so I’ve spent a lot of time for something that I don’t want, but hopefully this will help others.

Aug-03-2017 20-16-10


closed #4

opened #5