I am trying to find the height/space occupied by an UILabel on the screen programmatically whose number of lines increases or decreases based on different devices and string internalization. So I tried to get the height of the UILable by the following method.
uiLable.bounds.size.height/ uilable.frames.size.height
This method was implemented in both viewDidAppear and viewDidLoad methods. In both methods, the height returned is same on all devices and when the number of lines increases/decreases. Please find the screenshot of the UI that I have. I have to align the switch button to the centre of both text (Remember for all meetings and These can be changed in settings).
Any help would be appreciated. Thanks in Advance