Swift playground how to stop the frame size becomes 1024*768

Solution:

     When your viewController loads first ViewdidLoad() function will be called.That time your screen frame not yet to be updated.

So you want to wait for the time that viewWillAppear() or ViewDidLayoutSubviews() functions called.That time you can check that size of your page.

You don't want to wait for the function ViewdidAppear() will be called.


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift