Forum Xamarin.iOS
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to get layout constraint programmatically

I'm trying to access a constraint in code.
I added a Name property "ButtonBottomConstraint" to the constraint so that I could access it in the ViewController class
But at runtime ButtonBottomConstraint is always null

    public override void ViewDidLoad()
    {
        var contraintConstantValue = ButtonBottomConstraint.Constant
    }

Am I trying to access it at the wrong time?
I've tried ViewDidAppear()and ViewWillAppear()but still it's null

Sign In or Register to comment.