Search code examples
iosobjective-cconstraintsnslayoutconstraint

How to get the current constant value from different constants value?


enter image description here

I set constraint constant for two different classes ,when i try to print the constant on wRhR(ipads) the first constant value is coming .

Always i am getting

  NSLog(@"this is constant %f",_txtbottomconstraints.constant);

output :

 this is constant 240.000000  //this output is am getting in ipad.

help me to get the current constant value thanks :)


Solution

  • Print in viewDidAppear

    override func viewDidAppear(animated: Bool) {
            print("constraint  : \(_txtbottomconstraints.constant)");
        }