Skip to content

View+endEditingOnTap#152

Open
LukasHromadnik wants to merge 4 commits intomainfrom
swiftui/endEditingOnTap
Open

View+endEditingOnTap#152
LukasHromadnik wants to merge 4 commits intomainfrom
swiftui/endEditingOnTap

Conversation

@LukasHromadnik
Copy link
Contributor

Add endEditingOnTap modifier that is used across our SwiftUI projects

Checklist

  • Added tests (if applicable)

@LukasHromadnik LukasHromadnik self-assigned this Dec 6, 2024
@@ -0,0 +1,20 @@
import SwiftUI

@available(iOS 13.0, *)
Copy link
Member

Choose a reason for hiding this comment

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

The availability should be fixed for other platforms, probably check other extensions that are SwiftUI specific. That should fix the CI build.

Copy link
Member

Choose a reason for hiding this comment

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

I would say, that having #if canImport(UIKit) && !os(watchOS) and then limit availability only to iOS feels weird, doesn't it? This would work on macOS, wouldn't it? Not sure about tvOS, but I would say so.

Copy link
Member

@olejnjak olejnjak left a comment

Choose a reason for hiding this comment

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

The availability should be fixed for other platforms, probably check other extensions that are SwiftUI specific. That should fix the CI build.

@olejnjak
Copy link
Member

olejnjak commented Apr 3, 2025

@LukasHromadnik 🙏 🙄

@LukasHromadnik LukasHromadnik force-pushed the swiftui/endEditingOnTap branch from 9c26c2c to 4075901 Compare April 14, 2025 05:54
@@ -0,0 +1,20 @@
import SwiftUI

@available(iOS 13.0, *)
Copy link
Member

Choose a reason for hiding this comment

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

I would say, that having #if canImport(UIKit) && !os(watchOS) and then limit availability only to iOS feels weird, doesn't it? This would work on macOS, wouldn't it? Not sure about tvOS, but I would say so.

@available(iOS 13.0, *)
public extension View {

@available(iOSApplicationExtension, unavailable)
Copy link
Member

Choose a reason for hiding this comment

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

We can move this availability clause to the extension itself so it is at one place.

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.

3 participants