Post

Replies

Boosts

Views

Activity

Allocate WKWebViewConfiguration to IBOutlet WKWebView
Is it possible to add WKWebViewConfiguration() manually to my WKWebView without instantiation? I ask this because I have an IBOutlet WKWebView from Storyboard(with constrains).This works (not from Storyboard - manually instantiate):var myWebView: WKWebView! let webConfiguration = WKWebViewConfiguration() myWebView = WKWebView(frame: view.bounds, configuration: webConfiguration)What I want to do is something like this:@IBOutlet weak var myWebView: WKWebView! let webConfiguration = WKWebViewConfiguration() myWebView.configuration = webConfiguration //this line does not workAll other stuff is working with an IBOutlet WKWebView, just the configuration are not passing through for JS Bridge e.g.Someone an idea how to allocate the WKWebViewConfiguration() to my IBOutlet WKWebView?
4
0
7.4k
Aug ’18
UIProgressView progressTintColor bug
Hello,in my current iOS Project I change the UIProgressView tintColor at runtime.When I use the same color it works great, but if I use 2 different colors e.g."progress is less than 20 percent it becomes red else it stays in init color" it does not work.The bug is that when I change at runtime the progressTintColor the progress bar becomes rounded corners and the actual progress does not match the current progress value. As I discribed by using the same logic and do not use a different color than the initial one it works.Is this a known bug in iOS?Code example:func setBatteryProgress(value: Int) { batteryProgress.progress = Float(value) / 100 if (batteryProgress.progress <= 0.2) { self.batteryProgress.progressTintColor = UIColor.red //when I use here same color as in the else block it works } else { batteryProgress.progressTintColor = primaryColor //when I use here same color as in the if block it works } }Strange behavior -> the progress is at a random value, and the left corner of the progress bar is rounded.Some has an idea about this?GreetingsTobias
16
0
8.4k
Jan ’19