You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing macOS or iOS programming, a common use-case I have for interspersed is to insert a separator or divider view in-between a bunch of other views.
Example, given an array of views, I'd like to insert a separator view in-between each one:
let views = [view1, view2, view3]
let allViews = views.interspersed(using: { SeparatorView() })
Expected:
[view1, separator1, view2, separator2, view3]
Because these are NSView, the inserted element needs to be a new instance each time, which the existing implementation does not appear to offer.
The text was updated successfully, but these errors were encountered:
When doing macOS or iOS programming, a common use-case I have for
interspersed
is to insert a separator or divider view in-between a bunch of other views.Example, given an array of views, I'd like to insert a separator view in-between each one:
Expected:
[view1, separator1, view2, separator2, view3]
Because these are NSView, the inserted element needs to be a new instance each time, which the existing implementation does not appear to offer.
The text was updated successfully, but these errors were encountered: