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?
Post
Replies
Boosts
Views
Activity
Is there a way to disable Stage Manager?
Other than enabling "Requires full screen".
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?
Can WidgetURL be used with LockScreen Widget?
I want to tap LockScreen Widget to switch to a specific screen.
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?