in native.showWebPopup we can use transparency on CSS to make the background transparent and see whats behind the webview but if i use native.newWebView the background is not transparent is there a way to make it transparent just like the showWebPopup
Try webView.hasBackground = false
Related
I am running into a problem in xcode storyboard to setup the graphics of an app.
Nothing complicated, but I seriously don't understand the logic.
Import an image view that will be the background. It is set as opaque, alpha = 1, it uses an image found on internet and the background is "default". It covers the whole iphone surface
Import a text view. Now I am trying to have the background colour of the text view white.
To do that, on the "Text Field" section, I have tried to use an image of white, found on the internet, no success. I have also tried in the "View" section to set the "Background" to white colour with alpha=1 and opaque activated, no success, the text view background looks exactly like the background picture, it does not stand out.
Does anyone know how to do this ?
In case anyone wonders, I have been able to solve this programmatically using code lines like :
myTextField.backgroundColor = UIColor.white
Still not sure why it does not work on the interface builder though.
My tableViews are working fine with Background = Default, but the rest of my views always display as Dark. What am I doing wrong? I am new to this...
I think the default background color of a view transparent. Probably Xcode is just showing it as black when it's actually transparent.
If you want an actual, adaptive background color, use System Background Color instead (this will be white or black). If you need different shades, there are also the Secondary and Tertiary options.
I would try hardcoding it in, like background = #fff(for hex0 or background = rgb(255,255,255). Sorry if it doesnt work, Im usually a flutter dev, not swift.
I am attempting to add a dark mode to my app and I have it almost done but I am having trouble with this one piece. When I call
self.present(vc, animated: true, completion: nil)
my image below pops up in front of my previous view. However, the top coloring is white still instead of dark. I have tried numerous different background color changes but can't seem to find the correct layer to change the background on. Does anyone know what layer this is to so I can change it to black to complete my dark mode?
Although that should be black by default, it's window's background view. So you can change it to any color you want:
view.window?.backgroundColor = .yellow
Note that you can use .systemBackground as color. so it's automatically the correct color in either light or dark mode.
And also note that the window color only needs to be set once (per window). Set it in the App/Scene delegate and be done
All views have access to their window
Thanks to #rmaddy for the notes
I need a help with webView in swift 3.
I'm making a reader that read books in the html format - the problem is with the webView background colour.
I'm setting webView to break content on pages, like this:
webView.paginationBreakingMode = .page
I'm setting the background in CSS, like this:
* {background-color: red;}
But I'm still getting a white background. This is not webView background, this is something else.
View screenshot
It can be done by setting in IB the webview's opaque property to NO.
And set the background of the underneath view to desired colour.
How can I copy the actual UINagivationBar background appearance? I would like to have the exact background appearance to use on another view.
I don't think there's a direct way to access the gradient background of the UINavigationBar. You can, however, play around with mockup versions of the background here and create your own version using Photoshop.