QuickBirdEng / XCoordinator

🎌 Powerful navigation library for iOS based on the coordinator pattern
MIT License
2.27k stars 179 forks source link

Conflict `view` property when import XCoordinator #118

Closed hsleedevelop closed 5 years ago

hsleedevelop commented 5 years ago

Conflict view property when import XCoordinator

below is my custom codes

import Foundation

// http://stackoverflow.com/a/36424842/3898055
@IBDesignable
class NibLoadingView: UIView {

    @IBOutlet weak var view: UIView!    //1. Cannot override 'strong' property with 'weak' property
    //@IBOutlet weak var view: UIView!  //2. Cannot assign to property: 'view' is a get-only property
}

I guess UIView Extension has view property somewhere in your sources. ex) UIView+Store (using CoordinatorPreviewingDelegateObject), or gesture extension,,

How could I resolve this issue, I hope to keep 'view' property 'cause my predecessor using this property in a hundred XIBs and codes.

pauljohanneskraft commented 5 years ago

Do you have the import XCoordinator somewhere in your code or exactly in those files? If the import statement needs to be in that file to produce errors, try to keep XCoordinator out of these files, if not, you will probably have to rename these outlets.

view is actually a pretty indescriptive name for a child/subview, so we chose it to refer to itself to have a common protocol for UIView and UIViewController called Container.

Maybe you can use XCode's refactoring tools and/or find-&-replace to help with the work?