-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ListVnext] Replace custom LeadingView input type to UIView #378
Conversation
@@ -204,8 +204,7 @@ extension MSFListView { | |||
Button(action: cell.onTapAction ?? {}, label: { | |||
HStack(spacing: 0) { | |||
if let leadingIcon = cell.leadingIcon { | |||
Image(uiImage: leadingIcon) | |||
.resizable() | |||
UIViewWrapper(leadingIcon) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the story for the app that is using SwiftUI fully?
I thought initially about having a modifier for the MSFListCellView where you'd pass "some View" (the AvatarVnext) in this case and it would replace the icon there.
And I believe that doesn't dismiss the current approach of supporting an instance of UIView.
I'm thinking about a path for both consumers (UIKit and SwiftUI) to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would this be translated when declaring the input type? I understand that we can assign/return a some View
type in SwiftUI but I do not think it can be represented in ObjC?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Platforms Impacted
Description of changes
List's custom LeadingView only accepted Images, but with this new change should be able to accept any UIView as its input. (#365)
Verification
Sample section was added in main List.
Pull request checklist
This PR has considered:
Microsoft Reviewers: Open in CodeFlow