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

Swift 4.1 Cannot override with a stored property '...Constraint' #21

Closed
NikKovIos opened this issue Apr 19, 2018 · 4 comments
Closed

Swift 4.1 Cannot override with a stored property '...Constraint' #21

NikKovIos opened this issue Apr 19, 2018 · 4 comments

Comments

@NikKovIos
Copy link
Collaborator

NikKovIos commented Apr 19, 2018

class AssetVideoScrollView: UIScrollView {
    private var widthConstraint: NSLayoutConstraint?

and the same error with

  @IBDesignable public class TrimmerView: AVAssetTimeSelector {
    private var leftConstraint: NSLayoutConstraint?
    private var rightConstraint: NSLayoutConstraint?

You can check it in Yummypets/YPImagePicker@4fea39d

@HHK1
Copy link
Owner

HHK1 commented Apr 19, 2018

Those are stored properties, private moreover, you are not supposed to override them.

@HHK1 HHK1 closed this as completed Apr 19, 2018
@NikKovIos
Copy link
Collaborator Author

But they are in your library https://github.com/prynt/PryntTrimmerView/blob/master/PryntTrimmerView/Classes/Trimmer/PryntTrimmerView.swift
The compiler warning on them.

@HHK1
Copy link
Owner

HHK1 commented Apr 19, 2018

But they are in your library https://github.com/prynt/PryntTrimmerView/blob/master/PryntTrimmerView/Classes/Trimmer/PryntTrimmerView.swift

The only thing I'm overriding in this class are the methods to setup the subviews and the constraints:
setupSubviews and constrainAssetPreview.

The compiler warning on them.

Where ? In your project or in this library ?

@calsmith
Copy link

+1 importing the raw source files into a project (i.e. without cocoapods) causes the following build errors:
"Cannot override with a stored property 'widthConstraint'" AssetVideoScrollView.swift line 12 for each of the constraints in Swift 5 Xcode 12.5. Is there a workaround for this?

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

No branches or pull requests

3 participants