I try to diable the Focus/Ring status of some button on my SwiftUI project... but I fail !The focus ring appeared with the Beta 7 and persist by default with the last revision.I use the obvious modifier : Button(action: { withAnimation(.easeOut) { self.hcal.toThisYearAndMonth() } }) { Text(♢) } .focusable(false)Any clues ?Best Regards Gerard
Search results for
swiftui
16,633 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
To convert between source and destination in a binding scenario there is a need for binding converters.I used binding converters a lot in Cocoa applications, but now a couple of months within the beta-test program of SwiftUI, I have not figured out yet where they hide in the framework and how to set them up.I hope that some can see, what I am seeing wrong or guide me to a solution to the problem.
I was hoping that the options under the More button in a SwiftUI TabView app would be fixed in Xcode 11 GM. Unfortunately it still does not work!Tapping a More button option shows nothing under portrait device orientation. However, in landscape orientation when all my 7 tab bar items are visible the More options show their views.Other views in landscape orientation do not show until I swipe right to reveal it. Selecting an option does not completely show the view on right hand side.The default ContentView auto generated for a Tabbed App still shows the old code with selection @State var tags. No need for those any more. No need for VStack since it is the default. Why wasn't it updated to reflect the clean code in Xcode 11 GM?It seems to me that the Tabbed App is still work-in-progress. Why? It used to work very well under the UIKit! Tabbed apps are very commonly used and I am shocked that it does not work!
To follow up on this with a bit more detail, when your CloudKit code finishes, and has all the venue data, it needs to modify the venues property of your ObservedData. Because that’s an ObservableObject and the property is @Published, SwiftUI can subscribe to that property. It will then receive the new value and update the UI accordingly. Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic:
Programming Languages
SubTopic:
Swift
Tags:
I plugged that code into a new watchOS app (creating from the watchOS > iOS App with Watch App template) and it compiled just fine. Here’s what the final ContentView.swift looks like: import SwiftUI struct ContentView: View { var body: some View { HStack { Image(systemName: rectangle.on.rectangle.angled) Text(verbatim: Study) .listRowPlatterColor(Color.gray) .frame(height:50) } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }You may have some wreckage left over from one of the Xcode betas. To rule that out, do a clean build (Product > Clean Build Folder then rebuild).Share and Enjoy — Quinn “The Eskimo!” Apple Developer Relations, Developer Technical Support, Core OS/Hardware let myEmail = eskimo + 1 + @apple.com
Topic:
Programming Languages
SubTopic:
Swift
Tags:
So the error was not on line 2.SwiftUI evolves so much rapidly at this time, taht code sample are very rapidly outdated.
Topic:
Programming Languages
SubTopic:
Swift
Tags:
Hard to guess what you did what you did not do.have you read and followed this ? (not for SwiftUI, but principle should be the same)https://developer.apple.com/documentation/clockkit/clkcomplicationdatasource
Topic:
App & System Services
SubTopic:
General
Tags:
Thanks for the answer.I may have realized that my need for converters is not as high as first thought.I used them a lot in Cocoa applications, but only seldom, I used two-way bindings and two-way converters.In the concrete case, I was intending to (two-way) bind a Core Data property having a binary data type (NSAttributedString) to a SwiftUI text field. But this was not possible. Instead I will embed a UITextView into SwiftUI and add computed properties to my Core Data object that converts binary data to NSAttributed strings and vice versa.Furthermore I now think that SwiftUI, because it is so fast and easy to construct new views, will make the need for converters less than previous.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Did you try to:- create a group of the size of screen and open the Attributes Inspector- set color of background- set its radius to its custom value- set size relative to containerThen include what you need inside the group.Note: why did you post this question in SwiftUI and not Watchkit ?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
What's the problem ?have you looked at the API:https://developer.apple.com/documentation/swiftui/scrollviewOr read this tutorialh ttps://medium.com/ios-os-x-development/swiftui-nesting-scroll-views-without-tearing-your-hair-out-604b5894324dNote: should move this question to SwiftUI section.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
I already have the APIs and keys in, but how do I put in the permission popup on a SwiftUI view? I'd really love it if somebody could help, because the only thing I see is a documentation about the whole thing, but it's telling me where to put the code. Everywhere I put it, it just gives me an error.
In the InterfacingWithUIKit Landmarks tutorial there is an example of how to implement a UIPageViewController in SwiftUI. This example doesn't allow for using different types of views as pages. Is it possible to modify this code to allow for different view types?
I'm trying to update the colour of an SKEmitterNode within a UIViewRepresentable. The hue value is passed in from the state on the parent View, and the emitter colour should update when the hue value in the parent state updates.It initially displays, and although it updates on the first call to updateUIView it does not respond to any subsequent calls, even though the function definitely gets called with the new value of hue each time.Has anyone any idea why the emitter won't update? I'm at the hair-tearing-out stage... I'd be grateful for any help with this.Here's what I've got. I just can't see what's wrong with this... I'm using the latest XCode GM Seed.import SwiftUI import UIKit import SpriteKit struct EmitterView: UIViewRepresentable { private let view = SKView() let scene = SKScene(fileNamed: myScene)! var emitter: SKEmitterNode = SKEmitterNode() var hue: Double func makeUIView(context: UIViewRepresentableContext) -> SKView { // Lets make it manually emitter.particleTexture = SKTexture(image
In work im stuck with older mac. I left the Xcode 11 GM seed unXIP running over the weekend. (because it takes hours)Came in today to find the 16GB app unzipped but the XCode.app icon was missing.I'd upload pic but this forum seems to be the only one on the planet that doesn't let you upload image!!I can run the app and it starts installing additional components. And ran my first SwiftUI app in Xcode 11 simulator.This is my second attempt to unXip it. I cancelled the first so I'm worried its not a clean unXIP.Where is it unXipped to? Does it go into a /tmp folder first then moved to Xcode.app - ill clean the directory and try unzip again.or is it unXipped straight into Xcode.app.if so then somethings wrong because missing Icon file.
We are all in the same boat I believe! Apple just released XCode GM Seed 2 a few hours ago. My guess is that things should start moving in a day or two! Let's wait and see... .BTW, in case you're using SwiftUI, how do you come around the `.onDisappear(perform:)` not working using NavigationLinks?!
Topic:
App & System Services
SubTopic:
General
Tags: