CustomizableActionSheet icon indicating copy to clipboard operation
CustomizableActionSheet copied to clipboard

Proposal to remove ActionSheetItemView

Open yccheok opened this issue 3 years ago • 0 comments

Hi,

I can understand why ActionSheetItemView is required throughout the code.

With ActionSheetItemView, this enables us to perform itemContainerView.addSubview, even before we initialise itemContainerView.frame.

I was wondering, is it possible that we can eliminate the usage of ActionSheetItemView. The reasons are

  1. Less code, less chance of having bug
  2. Eliminate an extra layer (ActionSheetItemView layer), will improve execution speed

I post proof of concept in the code patch. The only thing I am not sure is, after removing ActionSheetItemView, do we still need to perform view.clipsToBounds = true at line 157?

Thank you for paying attention to this. If you need any further clarification, I am happy to answer.

Thanks.

yccheok avatar Jan 13 '21 09:01 yccheok