21.7 C
Canberra
Tuesday, October 21, 2025

Customized ControlWidgetButton SFSymbol Icon on iOS 26


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.

  1. Picture(systemName: "customized.viewfinder")
  2. Picture("customized.viewfinder")

I additionally tried the in-built SF image method

  1. Picture(systemName: "viewfinder")

The outcomes of those three checks will be seen right here:
Customized ControlWidgetButton SFSymbol Icon on iOS 26

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?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

[td_block_social_counter facebook="tagdiv" twitter="tagdivofficial" youtube="tagdiv" style="style8 td-social-boxed td-social-font-icons" tdc_css="eyJhbGwiOnsibWFyZ2luLWJvdHRvbSI6IjM4IiwiZGlzcGxheSI6IiJ9LCJwb3J0cmFpdCI6eyJtYXJnaW4tYm90dG9tIjoiMzAiLCJkaXNwbGF5IjoiIn0sInBvcnRyYWl0X21heF93aWR0aCI6MTAxOCwicG9ydHJhaXRfbWluX3dpZHRoIjo3Njh9" custom_title="Stay Connected" block_template_id="td_block_template_8" f_header_font_family="712" f_header_font_transform="uppercase" f_header_font_weight="500" f_header_font_size="17" border_color="#dd3333"]
- Advertisement -spot_img

Latest Articles