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

[SR-10051] Impossible to override insetsLayoutMarginsFromSafeArea on a project whose IPHONEOS_DEPLOYMENT_TARGET = 10.0 #52454

Closed
layoutSubviews opened this issue Mar 6, 2019 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@layoutSubviews
Copy link

Previous ID SR-10051
Radar rdar://problem/48702551
Original Reporter @layoutSubviews
Type Bug
Status Resolved
Resolution Duplicate
Environment

Xcode 10.2 beta 4 (10P107d)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 6a9c985b70ee10b9e5f5dd792f3523f8

duplicates:

Issue Description:

This simple bit of code:

class MyView: UIView {
    override var insetsLayoutMarginsFromSafeArea: Bool
    {
        didSet { print(insetsLayoutMarginsFromSafeArea) }
    }
}

written in a project whose IPHONEOS_DEPLOYMENT_TARGET is less than 11.0 makes the Swift compiler return <unknown>:0: error: 'insetsLayoutMarginsFromSafeArea' is only available on iOS 11.0 or newer.
Adding an @available(iOS 11, *) decorator to the override doesn't help.

AFAICT, there is no workaround to make the compiler happy.

@layoutSubviews
Copy link
Author

Thanks to vlas (JIRA User) who found a potential dupe: https://bugs.swift.org/browse/SR-1486.

@beccadax
Copy link
Contributor

I agree, this looks like a duplicate of SR-1486.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants