Post

Replies

Boosts

Views

Activity

How do you resize the gif displayed in WKWebView
I want to display a gif that it fits in WKWebView. (like Aspect fit.) gif is stored locally. This is sample code and Autolayout.↓ import UIKit import WebKit class ViewController: UIViewController {   @IBOutlet weak var webView: WKWebView!       override func viewDidLoad() {     super.viewDidLoad()           guard let url = Bundle.main.url(forResource: "sample", withExtension: "gif"),        let data = try? Data(contentsOf: url),        let baseURL = Foundation.URL(string: "about:blank") else {       return     }     webView.load(data, mimeType: "image/gif", characterEncodingName: "UTF-8", baseURL: baseURL)         } } use the gif from this link.↓ https://sozai-good.com/illust/animal/5677 When run this code, the gif is cut off. (use iPhone13 pro) How do you resize the gif?
1
0
1.8k
Aug ’22
contentMode doesn't work with Plain style for buttons
When using a Style other than Default (e.g. Plain style) with UIButton, contentMode does not work. The image becomes larger than the button size. Using contentInsets does not change this. How can I reduce the size of the image?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
0
Boosts
0
Views
503
Activity
Feb ’24
Is there a way to disable Stage Manager?
Is there a way to disable Stage Manager? Other than enabling "Requires full screen".
Replies
2
Boosts
1
Views
1.8k
Activity
Dec ’22
How do you resize the gif displayed in WKWebView
I want to display a gif that it fits in WKWebView. (like Aspect fit.) gif is stored locally. This is sample code and Autolayout.↓ import UIKit import WebKit class ViewController: UIViewController {   @IBOutlet weak var webView: WKWebView!       override func viewDidLoad() {     super.viewDidLoad()           guard let url = Bundle.main.url(forResource: "sample", withExtension: "gif"),        let data = try? Data(contentsOf: url),        let baseURL = Foundation.URL(string: "about:blank") else {       return     }     webView.load(data, mimeType: "image/gif", characterEncodingName: "UTF-8", baseURL: baseURL)         } } use the gif from this link.↓ https://sozai-good.com/illust/animal/5677 When run this code, the gif is cut off. (use iPhone13 pro) How do you resize the gif?
Replies
1
Boosts
0
Views
1.8k
Activity
Aug ’22
Can WidgetURL be used with LockScreen Widget?
Can WidgetURL be used with LockScreen Widget? I want to tap LockScreen Widget to switch to a specific screen.
Replies
1
Boosts
0
Views
1.5k
Activity
Jul ’22
customize PHPicker's Navigationbar color in iOS15
I want to change the background color of PHPicker's navigationbar in iOS15. ↓This answer did not work in PHPicker https://developer.apple.com/forums/thread/682420 How to customize?
Replies
3
Boosts
0
Views
3.2k
Activity
Apr ’22