Skip to content

sabapathyk7/LayoutSubViewsExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Example - setNeedsLayout vs layoutIfNeeded vs layoutSubviews()

Summary :

layoutIfNeeded is a synchronous call that will let the system update the views and force the layout engine to redraw the views. setNeedsLayout is a deferred call and asynchronous call that will mark the layout has changed but it will call layoutSubViews() in the next cycle. Both layoutIfNeeded and setNeedsLayout call layoutSubViews()

Screenshots :

setNeedsLayout Example

layoutIfNeeded Example

About

Swift Application for UIKit - LayoutSubViews

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages