Skip to content

[example/CustomCollectionView] Implement MosaicCollectionLayoutDelegate#28

Merged
Adlai-Holler merged 4 commits into
TextureGroup:masterfrom
nguyenhuy:HNPagerLayoutDelegate
May 14, 2017
Merged

[example/CustomCollectionView] Implement MosaicCollectionLayoutDelegate#28
Adlai-Holler merged 4 commits into
TextureGroup:masterfrom
nguyenhuy:HNPagerLayoutDelegate

Conversation

@nguyenhuy

@nguyenhuy nguyenhuy commented Apr 18, 2017

Copy link
Copy Markdown
Member

This is the first step in turning CustomCollectionView example into a playground for the coming async pager layout. It also helps identify components in the current system that don't play well with ASCollectionLayout and need to be improved/by-passed, such as ASRangeController, layout inspector, etc.

Ticket: #186

@nguyenhuy
nguyenhuy force-pushed the HNPagerLayoutDelegate branch from b5e49fb to 0c74571 Compare April 18, 2017 17:36

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new file uses many logics from MosaicCollectionViewLayout.m, hence this version of Copyright Notice.

@nguyenhuy
nguyenhuy force-pushed the HNPagerLayoutDelegate branch 4 times, most recently from 881d2db to 1b84899 Compare April 19, 2017 17:39
@nguyenhuy
nguyenhuy force-pushed the HNPagerLayoutDelegate branch 3 times, most recently from d8df6ab to 20d2198 Compare April 26, 2017 17:48

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to demonstrate best practice, might be worth having a CGSize imageSize = at the top

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit complex for sample code -- add a comment above for why it isn't just a dictionary?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vector might be worthwhile to avoid boxing - try profiling this first and look for object retain / release overhead. Apps will probably borrow this sample code and ship it :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! Since this method is only called once for each data set, and in many cases on a background thread, I left a TODO instead of optimizing now.

@appleguy appleguy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nguyenhuy this is so exciting! I can't wait to try running it locally.

I think it would be worth a couple more performance optimizations for demonstrating best practices in core code, but this is subjective and not a correctness issue.

@ghost

ghost commented May 3, 2017

Copy link
Copy Markdown

🚫 CI failed with log

@garrettmoon

Copy link
Copy Markdown
Member

Looks like this needs a rebase.

@nguyenhuy
nguyenhuy force-pushed the HNPagerLayoutDelegate branch from 9350049 to 994a35c Compare May 4, 2017 11:26
@ghost

ghost commented May 4, 2017

Copy link
Copy Markdown
1 Warning
⚠️ This is a big PR, please consider splitting it up to ease code review.

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants