ios - traitCollectionDidChange: Called even I dont have any changes -


do know why traitcollectiondidchange called no size class changes.

selecting uilabel, have in storyboard attribute inspector / installed check uilabel. no special cases installing according size class.

therefore dont understand why traitcollectiondidchange called when rotate device?

yes, called after viewdidlod, every time rotate device/ emulator.

if wanted react rotation use viewwilltransitiontosize.

update: hmm, re-thinking this. guess size class changing when rotate iphone.

can think of traitcollectiondidchange specialised method of viewwilltransitiontosize - facilitating thresholds telling when crossing size class boundaries?

the size class change if rotate iphone, won't change if rotate ipad (which has regular size class both horizontally , vertically).

rotation considered change in interface environment, therefore traitcollectiondidchange called.


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

android - CoordinatorLayout, FAB and container layout conflict -