I am attempting to implement a ControlWidgetButton on iOS 26, and can’t appear to have a customized image seem.
As a easy take a look at in SFSymbols, I first duplicated the viewfinder icon as a customized image named customized.viewfinder and exported it utilizing the Export Image… menu possibility.
I then created a brand new Picture Image Set in Xcode and dragged within the exported image to import it into Xcode.
I attempted two totally different strategies for displaying an icon within the management.
Picture(systemName: "customized.viewfinder")
Picture("customized.viewfinder")
I additionally tried the in-built SF image method
Picture(systemName: "viewfinder")
The outcomes of those three checks will be seen right here:
Solely the in-built system symbols appear to seem. I can not get my customized image to be displayed within the management, despite the fact that it does show in my predominant SwiftUI app when importing the identical customized asset file.
Here is a snippet of the code I’m utilizing the show the icons.
struct LaunchScanControl: ControlWidget {
static let form: String = "com.instance.web site.management"
var physique: some ControlWidgetConfiguration {
StaticControlConfiguration(
form: Self.form,
) {
ControlWidgetButton("Scan", motion: LaunchScanIntent()) {_ in
Label {
Textual content("Scan")
} icon: {
Picture(systemName: "customized.viewfinder")
}
}
}
.displayName("Title")
.description("Seize a product.")
}
}
Has anybody had success with including a customized icon to their management, particularly with iOS 26? What method labored for you?