Posts

Post not yet marked as solved
2 Replies
401 Views
Hi, I am struggling with a design change in watchOS 10. I have a TextField next to an Image in an HStack inside a List The following code produces another (correct looking view) when using watchOS9. With watchOS10 a strange background is added that I can not remove. struct ContentView: View { @State private var searchFieldInput: String = "" var body: some View { List { HStack{ Image(systemName: "magnifyingglass").foregroundColor(.accentColor) TextField("Search", text: $searchFieldInput) } } } } This picture shows the difference: (watchOS 9 on the left; watchOS 10 on the right Does anybody know how to remove this background or if this intentionally? I already filed a Feedback (FB12293618) but haven't heard back yet
Posted
by arno_app.
Last updated
.
Post marked as solved
2 Replies
2.2k Views
Hi, It seems that the Link Object in SwiftUI is dedicated to link to a webpage like this: Link(destination: policyURL!) { Text("Link") } Unfortunately it is not functional on watchOS. If I provide a weburl to it, it says the operation is not supported. Best regards, Arno
Posted
by arno_app.
Last updated
.
Post marked as solved
2 Replies
1.9k Views
Hi, I'm trying to Display a MapView like the sytem Maps app does in a Widget. I thought the best way would be to encapsulate the Mapview in a UIViewRepresentable like this: struct MapView: UIViewRepresentable {   func makeUIView(context: UIViewRepresentableContext<MapView>) -> MKMapView {     let mapView = MKMapView()     return mapView   }   func updateUIView(_ view: MKMapView, context: UIViewRepresentableContext<MapView>) {   } } And show it like this in my Widget: struct MapWidgetEntryView : View {   var entry: Provider.Entry   var body: some View {     VStack {       MapView()     }   } } Unfortunately this leads to this error: RemoteHumanReadableError: The operation couldn’t be completed. (BSServiceConnectionErrorDomain error 3.) BSServiceConnectionErrorDomain (3): ==BSErrorCodeDescription: OperationFailed I also tested this with other UIKit classes and it leads to the same error
Posted
by arno_app.
Last updated
.
Post not yet marked as solved
1 Replies
1.6k Views
Hi I have an app that acts similar to the Apple News Widget (Outside the US,UK and Canada it just shows some headlines from across the web). The News widget opens Safari if I press a headline and leads me to the article. How can I achieve the same? Providing a web URL with widgetUrl stills opens the main app
Posted
by arno_app.
Last updated
.
Post marked as solved
2 Replies
2k Views
Hi, In my previous post it was suggested to use MKMapSnapshotter to create Widgets containing map data. Now I wonder how I can create the right screenshot for the rect defined by MKMapSnapshotter size according to the current Widget size. It seems that the size differs by device and by widget size.
Posted
by arno_app.
Last updated
.