Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

35127134: setNeedsUpdateOfHomeIndicatorAutoHidden not implemented in iOS 11 #18762

Open
openradar-mirror opened this issue Oct 26, 2017 · 0 comments

Comments

@openradar-mirror
Copy link

Description

Area:
UIKit

Summary:

Calls to setNeedsUpdateOfHomeIndicatorAutoHidden result in doesNotRecognizeSelector crash.

The crash only occurs in iOS 11 as the call is wrapped within an #available scope:

override func viewDidAppear(_ animated: Bool) {
    super.viewDidAppear(animated)
    
    if #available(iOS 11, *) {
        setNeedsUpdateOfHomeIndicatorAutoHidden()   // crash on iOS 11 with doesNotRecognizeSelector
    }
    
    setNeedsStatusBarAppearanceUpdate()
}

This works, but we shouldn't need to make the additional "responds" check:

    if #available(iOS 11, *) {
        if responds(to: #selector(setNeedsUpdateOfHomeIndicatorAutoHidden)) {
            setNeedsUpdateOfHomeIndicatorAutoHidden()
        }
    }

Steps to Reproduce:

  1. Subclass UIViewController.
  2. Call setNeedsUpdateOfHomeIndicatorAutoHidden in viewDidAppear within an #available scope.

Expected Results:

No crash.

Actual Results:

Crash.

Version/Build:

Xcode 9.0.1. Swift 4.0

Product Version: Xcode 9.0.1 (9A1004)
Created: 2017-10-26T18:20:39.280030
Originated: 2017-10-23T00:00:00
Open Radar Link: http://www.openradar.me/35127134

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant