Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ceonn

macrumors newbie
Original poster
Jul 27, 2016
4
0
This is my error, " Argument type 'AnyObject.Protocol' does not conform to expected type 'AnyObject'." I get this error when I insert the following code:

Code:
var constraint = NSLayoutConstraint(item: AnyObject, attribute: NSLayoutAttribute, relatedBy: NSLayoutRelation, toItem: AnyObject?, attribute: NSLayoutAttribute, multiplier: CGFloat, constant: CGFloat)

What am I doing wrong?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.