๊ณต๋ถ€/iOS

[UICollectionView] ๋‚ด๊ฐ€ ๋ณด๋ ค๊ณ  ๋ชจ์•„๋‘๋Š” UICollectionView Custom CollectionViewLayout ๊ณต๋ถ€์šฉ ๋งํฌ ๋ชจ์Œ

๋ ˆ๋ชฌํ‚ด๐Ÿ‹ 2020. 2. 1. 11:32

์•ˆ๋…•ํ•˜์„ธ์š”, Lemon Kim ์ž…๋‹ˆ๋‹ค.

 

์ œ๊ฐ€ Collection View๋ฅผ ๊ณต๋ถ€ํ•˜๋Š”๋ฐ... ์ด๊ฒŒ ์ฐธ ์ •๋ฆฌํ•˜๊ธฐ๊ฐ€ ์–ด๋ ต๋”๋ผ๊ตฌ์š” :(

 

๊ทธ๋ž˜์„œ ๋„๋Œ€์ฒด ์–ด๋–ป๊ฒŒ ํ•ด์•ผํ• ๊นŒ ๊ณ ๋ฏผํ•˜๋‹ค๊ฐ€, ์šฐ์„  ์ œ๊ฐ€ ๊ณต๋ถ€ํ•˜๊ณ  ์žˆ๋Š”, ํ˜น์€ ํ–ˆ๋˜ ๋งํฌ๋“ค์„ ์ •๋ฆฌํ•ด์„œ ์˜ฌ๋ฆฝ๋‹ˆ๋‹ค. 

์ฝœ๋ ‰์…˜ ๋ทฐ๋ž‘ ์Šคํฌ๋กค ๋ทฐ๋งŒ ์ž˜ ์จ๋„ ๋งŽ์€ ๋ฌธ์ œ๋Š” ์ž˜ ํ•ด๊ฒฐ๋  ๊ฑฐ ๊ฐ™์€๋ฐ ๋ง์ด์ฃ ...! ์กฐ๊ธˆ์”ฉ์ด๋ผ๋„ ๋” ๊ณต๋ถ€ํ•ด์•ผ๊ฒ ์Šต๋‹ˆ๋‹ค ใ… .ใ… 

Custom LayoutUICollectionViewLayout ์„ ๊ณต๋ถ€ํ•˜๋Š”๋ฐ ์ฐธ์กฐํ•œ ๋งํฌ

๊ธฐ๋ณธํŽธ

collectionViewLayout์„ ์ปค์Šคํ…€ํ•ด์„œ ๋™์  ๋†’์ด์˜ ์…€์„ ์ง€์›ํ•˜๊ฒŒ ํ•ด์ค€๋‹ค. ์ „๋ฐ˜์ ์ธ ๊ทธ๋ฆผ์„ ๊ทธ๋ฆฌ๊ธฐ ์ข‹์Œ!

 

https://www.raywenderlich.com/107439/uicollectionview-custom-layout-tutorial-pinterest

 

UICollectionView Custom Layout Tutorial: Pinterest

Build a UICollectionView custom layout inspired by the Pinterest app, and learn how to cache attributes and dynamically size cells.

www.raywenderlich.com

 

์• ํ”Œ์˜ Custom Collecetion View Layout ๊ฐ€์ด๋“œ.

layoutAttributesForElementsInRect์—์„œ ์ ˆ๋Œ€ visibleCells๋ฅผ ๋ถ€๋ฅด์ง€ ๋ง๋ผ๋ผ๋Š” ๋“ฑ์˜ ํŒ๋“ค์ด ์žˆ๊ณ , decorationView ๋“ฑ cell ๋ง๊ณ  ๋‹ค๋ฅธ ๊ตฌ์„ฑ ์š”์†Œ๋“ค๋„ ์„ค๋ช…๋˜์–ด ์žˆ๋‹ค. 

 

https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/CollectionViewPGforIOS/CreatingCustomLayouts/CreatingCustomLayouts.html

 

Creating Custom Layouts

Creating Custom Layouts Before you start building custom layouts, consider whether doing so is really necessary. The UICollectionViewFlowLayout class provides a significant amount of behavior that has already been optimized for efficiency and that can be a

developer.apple.com

 

 

 

parallaxing Scrolling 

์กฐ๊ธˆ ๋” ๋ณต์žกํ•œ ์˜ˆ์ œ. ์ด๊ฑธ ๋ณด๋ฉด์„œ parallaxing Scrolling๊ณผ sticky header ๊ฐ™์€ ๊ฒƒ์„ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ๋‹ค.

 

https://www.raywenderlich.com/527-custom-uicollectionviewlayout-tutorial-with-parallax

 

Custom UICollectionViewLayout Tutorial With Parallax

Introduced in iOS6, UICollectionView is a first-class choice for advanced customization and animation. Learn more in this UICollectionViewLayout tutorial.

www.raywenderlich.com

 

 

iOS 13 ๋ถ€ํ„ฐ ์ง€์›ํ•˜๋Š” ์กฐ๊ธˆ ๋” ์‰ฌ์šด Collection View Layout ๋งŒ๋“ค๊ธฐ.

๊ฐ•์˜, ์˜ˆ์ œ ๋‘˜ ๋‹ค ์ข‹์•˜๋‹ค. 

https://developer.apple.com/videos/play/wwdc2019/215/

 

Advances in Collection View Layout - WWDC 2019 - Videos - Apple Developer

Collection View Layouts make it easy to build rich interactive collections. Learn how to make dynamic and responsive layouts that range...

developer.apple.com