2016-03-04 27 views
-2

enter image description here如何從約束中獲取當前常量值?

我設置了兩個不同類的約束常量,當我嘗試在wRhR(ipads)上打印常量時。

總是我得到

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

輸出:

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

幫助我獲得的電流恆定值謝謝:)

+0

是否爲iPad打印? – techloverr

+0

@techloverr是兄弟:( –

+0

@Hima但爲iPad其返回240?什麼做 –

回答

0

打印在viewDidAppear

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

給予好評,請,如果你覺得它是富有成果的 – techloverr

+0

我已經給這對主持人那爲什麼downvote沒有理由? – techloverr

+0

他們會調查這個 – techloverr

相關問題