7.1 C
Canberra
Monday, July 27, 2026

swift – Xcode iOS UIToolbar not sending IBActions after replace to make use of SceneDelegate


I added the brand new SceneDelegate and my toolbar clicks not make it by the IBActions. I even recreated the IBActions and verified the protected space (which I didn’t change). All different GUI actions work fantastic. The Toolbar merchandise Retailers work fantastic too, as a few buttons are UIImages I set within the code. I attempted all the same old issues steered. The buttons behave visually as if pressed, simply nothing occurs in my fundamental UIViewController.

My SceneDelegate.swift has the next (and solely this), and I verified it does get known as:

   func scene(_ scene: UIScene, willConnectTo session: UISceneSession, choices connectionOptions: UIScene.ConnectionOptions)
    {
        guard let windowScene = (scene as? UIWindowScene) else { return }
        
        // Create the window
        let window = UIWindow(windowScene: windowScene)
        
        // 1. Instantiate the storyboard
        let storyboard = UIStoryboard(identify: "Predominant", bundle: nil)
        
        // 2. Instantiate your Preliminary View Controller utilizing its Storyboard ID
        let rootViewController = storyboard.instantiateViewController(withIdentifier: "Predominant")
        
        // 3. Set the basis view controller
        window.rootViewController = rootViewController
        self.window = window
        window.makeKeyAndVisible()
    }

I didn’t make any adjustments to my AppDelegate.

Any ideas?

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