swift - What's the difference between a UIStackView And A UICollectionView in Xcode 7? -


what's difference between uihorizontalstackview , collection view(also vertical stackview)?

can't collectionview horizontal , vertical? why people use both?

what uistackview collection view can't?

  1. uicollectionview grid, uistackview 1 dimension: vertical or horizontal.

uicollectionview uitableview, supports more single-column layouts.

collection views provide same general function table views except collection view able support more single-column layouts. collection views support customizable layouts can used implement multi-column grids, tiled layouts, circular layouts, , many more. can change layout of collection view dynamically if want.

vs

the uistackview class provides streamlined interface laying out collection of views in either column or row

  1. me, stackview, benefit "autolayout" feature, example: put 4 views in stack, component decide how views presented on screen, depending on size.

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -