Search results for

swiftui

16,633 results found

Post

Replies

Boosts

Views

Activity

Attempt to disable the focus ring
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
0
0
890
Sep ’19
Where and how to set up binding converters in SwiftUI?
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.
2
0
774
Sep ’19
SwiftUI Tabbed App does not work for More options
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!
2
0
1.7k
Sep ’19
Reply to How to retrieve data from CloudKit using SwiftUI
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:
Sep ’19
Reply to Cannot convert value of type 'TupleView<(Image, some View)>' to closure result type '_'
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:
Sep ’19
Reply to Where and how to set up binding converters in SwiftUI?
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:
Sep ’19
Reply to Rectangle that fills Watch face
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:
Sep ’19
How can I get SKEmitterNode to work in SwiftUI?
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
1
0
1.3k
Sep ’19
XCode 11 GM Seed - Xcode icon missing
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.
0
0
423
Sep ’19