Skip to content

Instantly share code, notes, and snippets.

@mikebranstein
Created August 4, 2017 16:51
Show Gist options
  • Save mikebranstein/15736ae774bef9bc70b16fd6dcd5f899 to your computer and use it in GitHub Desktop.
Save mikebranstein/15736ae774bef9bc70b16fd6dcd5f899 to your computer and use it in GitHub Desktop.
iOS UINavigationBar transparency in NativeScript
private initNavBarTransparency() {
if (topmost().ios) {
let navigationBar = topmost().ios.controller.navigationBar as UINavigationBar;
navigationBar.translucent = true;
navigationBar.setBackgroundImageForBarMetrics(UIImage.new(), UIBarMetrics.Default);
navigationBar.shadowImage = UIImage.new();
navigationBar.backgroundColor = UIColor.colorWithRedGreenBlueAlpha(0, 0, 0, 0.5);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment