I have a UITextView added programmatically in a tableview. I would like to add constraint to it so it will look same in portrait and landscape mode. I have following code(C#, MonoTouch) but it doesnot work. titleTxt is the simple textfield added to the cell.
var rightSpaceConstraint = NSLayoutConstraint.Create (titleTxt, NSLayoutAttribute.Trailing, NSLayoutRelation.Equal, null, NSLayoutAttribute.Right, 1.0f, 20f); var leftSpaceConstraint = NSLayoutConstraint.Create (titleTxt, NSLayoutAttribute.Leading, NSLayoutRelation.Equal, null, NSLayoutAttribute.Left, 1.0f, 20f); titleTxt.AddConstraints (new NSLayoutConstraint[] {rightSpaceConstraint, leftSpaceConstraint}); How should i add constraint to set left and right spaces. -- View this message in context: http://monotouch.2284126.n4.nabble.com/Add-constraint-to-UITextField-programmatically-tp4658505.html Sent from the MonoTouch mailing list archive at Nabble.com. _______________________________________________ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch