I\'m trying to make a view that will act as a sort of \"panel\", attached to the right side of the view controller.
That is, it is bound to the trailing, top, and b
There seems to be some ambiguity in your code, you are creating a UIView as myView but adding view to self.view and even constraint also to view itself. So correct your code and replace view with myView. Secondly setTranslayesAutoresizingMaskIntoConstraints to false. Then add all the constraints to self.view. This should solve your problem.
myView.setTranslatesAutoresizingMaskIntoConstraints(false)
self.view.addConstraints([trailingConstraint, bottomConstraint, widthConstraint])
VFL is also a better and clean approach. It actually gives a visualization of how constraint are setup.