ios - UIView in NSLayoutContraint does not conform to AnyObject in swift -
i have found question , answer here error
type 'uiview!' not conform protocol 'anyobject'
for
... @iboutlet var mainview: uiview! @iboutlet weak var contentview: uiview! ... nslayoutconstraint(item: self.contentview, ...`
is there somthing happening dereferencing view object?
i getting same error after copy-pasting , trying modify objective-c code swift project. realized had left relatedby 0 instead of nslayoutrelation.equal. after fixing error went away. weird compiler show error on first parameter when issue relatedby. hope helps.
Comments
Post a Comment