I have been using ScrollView with SwiftUI to develop a Custom Table Structure due to certain Customisation limitations with ListView. As soon I as I add NavigationLink for each item in scrollView. The icons or Images in the items are highlighted to blue color. Is this an already reported bug or is it something which I should avoid doing?
Search results for
swiftui
16,617 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I grouped a number of sections together, using Group. in another SwiftUI view, and that helped things considerably.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Hey this Image Instance is on SwiftUI and not with UIKit
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Hi. I'm running XCode 11 Beta and macOS Catalina Beta yet the Swift UI framework, doesn't seem to work:// // ContentView.swift // SwiftUIByExample // // Created by servant777 on 7/11/19. // Copyright © 2019 servant777. All rights reserved. // import SwiftUI struct ContentView : View { var body: some View { Text(Hello World Hello // error here says Cannot invoke initializer for type 'Test' with no arguments World Hello World Hello // error here says: Unterminated string literal World Hello World Hello World Hello World) // error here says: Unterminated string literal } } #if DEBUG struct ContentView_Previews : PreviewProvider { static var previews: some View { ContentView() } } #endifErroYet this works on this tutorial:https://www.youtube.com/watch?v=XF_euKrEB8c&list=PLuoeXyslFTubw4NtepDCis5tTqK37zT3Q&index=2What setting did I forget to enable?Thank you. God bless, Proverbs 31(by the way, how do you attach files here, files like screenshots, a brief video, etc.?)
I've got a DocumentTextViewController that I want to use inside some swiftUI. I've created a UIViewControllerRepresentable wrapper as seen here:// make this representable so it can be hosted in SwiftUI struct DocumentTextView: UIViewControllerRepresentable { @ObjectBinding var textModel:TextModel @ObjectBinding var viewModel:DocumentViewModel // textview needs to know about this because it changes how it's rendered (performance) func makeUIViewController(context: UIViewControllerRepresentableContext<DocumentTextView>) -> DocumentTextViewController { return DocumentTextViewController(textModel: textModel, viewModel: viewModel) } func updateUIViewController(_ uiViewController: DocumentTextViewController, context: UIViewControllerRepresentableContext<DocumentTextView>) { uiViewController.viewModelUpdated(viewModel: uiViewController.viewModel) } }Unfortunatly this doesn't seem to be working. What I'd like to do is be able to create this in swiftUI using a line like: Docum
SwiftUI is a good UI design language, and the SpriteKit/SceneKit designer are hard to reuse and customize for now.Is there any plan introducing swiftUI to SpriteKit in the future?
I'm trying to compile one of the SwiftUI tutorials (Working with UI Controls) but it's not working because UserData is not conforming to BindableObjectThe compiler is complaining about PublisherType not being declared, but after reading the non existant documentation I have no idea what to do to make it work.
In Xcode 11 Beta 4, I'm no longer able to pass `Binding`s down a view hierarchy. For example, imagine I have a list view called `CoolListView`, which renders multiple `CoolListRow` subviews, and the user is able to change a value from the list superview level that I'd like to percolate down to and update the row subviews:public struct CoolListRow : View { @Binding var currentStep: Int public var body: some View { // ... } public init(currentStep: Binding<Int>) { self.$currentStep = currentStep } }In Beta 3 and earlier, I would be able to pass this `Binding` as an argument to my subviews, but now in Beta 4, Xcode complains `Cannot assign to property: '$currentStep' is immutable`. Any ideas on how to resolve this?
Xcode 11 Beta 4 Crashes when clicking on the Swift file from the left panel(For SwiftUI or NonSwiftUI projects Both). It happens in both cases(Creating a new project or using the existing one).Example:1. Open a New or existing Xcode Swift Project(SwiftUI or Non-SwiftUI)2. Click on the. Swift file on the left panel3. Boom!! Xcode Crashes(Every Time)Current OS: Mac Os Catalina 10.15 BetaBug Report:Process: Xcode [1625]Path: /Applications/Xcode-beta.app/Contents/MacOS/XcodeIdentifier: com.apple.dt.XcodeVersion: 11.0 (14897.4)Build Info: IDEFrameworks-14897004000000000~13 (11M374r)Code Type: X86-64 (Native)Parent Process: ??? [1]Responsible: Xcode [1625]User ID: 501Date/Time: 2019-07-18 15:40:30.514 +0530OS Version: Mac OS X 10.15 (19A501i)Report Version: 12Anonymous UUID: F064230D-D10D-E773-35A0-293859994D86Time Awake Since Boot: 1400 secondsSystem Integrity Protection: enabledCrashed Thread: 0 Dispatch queue: com.apple.main-threadException Type: EXC_CRASH (SIGABRT)Exception Codes: 0x0
Hello!Has anyone been able to hook into the completion of a SwiftUI animation? I have an animation and after it completes I need to update my state and trigger another animation. Any ideas or different approaches?Thanks!-matt
I have just installed Catalina Beta 4 and Xcode Beta 4..All went well.Now when i try and test my Apps, not matter the size or even if it's a new one just created in eiither Swift or SwiftUI, the Simulator give me an Error.DetailsCould not attach to pid : “724”Domain: IDEDebugSessionErrorDomainCode: 3Failure Reason: Error 1--Error 1Domain: IDEDebugSessionErrorDomainCode: 3--Any suggestions?Running on a Macbook Air 2015, all was well with Beta 3 versions.Cheers.Craig.
It seems odd that for a lot of SwiftUI controls, the init method is waaaaay down the list of methods. it seems to me that it should be the first method discussed.
How do I change the root view of my SwiftUI app? For example, normally in the SceneDelegate I'd display my ContentView() as the root view to the hosting controller. But depending on conditions I might want to display something else first, like a LoginView, and then when that view goes away show the normal ContentView.
I have been using Reality Composer on both iPhone, iPad and MacOS for a few weeks now. I got a hang of it. It is very intuitive and powerful even at this stage with limited interactivity but great because we can easily publish the AR Experience as USDZ / Reality --> if they don't freeze or crash on iPad / iPhone when viewed.Anyways, I want to use some features of RealityKit that is not available inside Reality Composer. I use Apple XCode template to start with and so far I did manage to bring in my own RealityComposer project. But I seem to lose all the interactive setup like tap and animate etc. So I am wondering if I am doing this correctly?I can see in the template that Reality Project loads perfectly. That's a file *.rcproject inside XCode. Now could I actually bring in *.reality files and keep all interactions as it is, but adding more into it?I have to watch some WWDC videos a couple of times, but still even the sun planets projects seem slightly difficult to follow.Eventually I would like to be able
After spending way too much time on this issue, I happend upon a stackoverflow post on twitter that showed the new syntax for beta 4.https://stackoverflow.com/questions/56973959/swiftui-how-to-implement-a-custom-init-with-binding-variablesWhen initializing a binding variable, the syntax has changed from a $ to an underscore.Using the example you gave in the original post, here's the corrected code for beta 4:public struct CoolListRow : View { @Binding var currentStep: Int public var body: some View { // ... } public init(currentStep: Binding<Int>) { self._currentStep = currentStep } } Hope this helps.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: