Post

Replies

Boosts

Views

Activity

Reply to VStack adds a space when I have a ZStack with multiple items inside
The vertical spacing is set by the VStack. If the VStack's "spacing" is nil, then the stack will "choose a default distance for each pair of subviews". As you are seeing, this distance is not necessarily the same for every pair of views. It's not possible to specify the spacing within the VStack. The only way to enforce the VStack spacing of 0 is to use: VStack(alignment:.leading, spacing: 0) { ...which you can't do. So I think you are stuck.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’22
Reply to How to create a DetailView in SwiftUI?
You have defined "viewAllArtwork" in "ArtworkDetailView" You are trying to reference it in "ArtworkDetailView_Previews", which is a completely different thing. Hence the error message. In ArtworkDetailView_Previews, you need to create a single Artwork, and pass it to the ArtworkDetailView. You have not included the code for Artwork, so I can't suggest how you create that. Typically, it would be something like: ArtworkDetailView(artwork: Artwork())
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’22
Reply to Button That Changes Label on Click
Try this: import SwiftUI struct ButtonTest: View { @State private var isOn = false var body: some View { Button { isOn.toggle() } label: { Image(systemName: isOn ? "star" : "star.fill") } } } struct ButtonTest_Previews: PreviewProvider { static var previews: some View { ButtonTest() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’22
Reply to Guideline 3.2.2 - Business - Other Business Model Issues - Unacceptable
review your app concept and incorporate different content and features
Replies
Boosts
Views
Activity
May ’22
Reply to VStack adds a space when I have a ZStack with multiple items inside
The vertical spacing is set by the VStack. If the VStack's "spacing" is nil, then the stack will "choose a default distance for each pair of subviews". As you are seeing, this distance is not necessarily the same for every pair of views. It's not possible to specify the spacing within the VStack. The only way to enforce the VStack spacing of 0 is to use: VStack(alignment:.leading, spacing: 0) { ...which you can't do. So I think you are stuck.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to what's single view app in xcode13.3.1?
Just "App".
Replies
Boosts
Views
Activity
May ’22
Reply to "NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds"
Your attributedString is "Link" You are referencing location 19, length 55 of attributedString... ...isn't that way beyond the end of attributedString? I suggest you check the documentation for addAttribute(_:value:range:) Apple say: Raises... rangeException if any part of aRange lies beyond the end of the receiver’s characters.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to How to create a DetailView in SwiftUI?
You have defined "viewAllArtwork" in "ArtworkDetailView" You are trying to reference it in "ArtworkDetailView_Previews", which is a completely different thing. Hence the error message. In ArtworkDetailView_Previews, you need to create a single Artwork, and pass it to the ArtworkDetailView. You have not included the code for Artwork, so I can't suggest how you create that. Typically, it would be something like: ArtworkDetailView(artwork: Artwork())
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Cannot Archive in Xcode
Can you re-format your message, to make it more readable?
Replies
Boosts
Views
Activity
May ’22
Reply to Xcode app and website synchronised
RSS?
Replies
Boosts
Views
Activity
May ’22
Reply to Does a beta version need a user agreement and privacy policy for beta testing on TestFlight?
No, not required.
Replies
Boosts
Views
Activity
May ’22
Reply to Can I approve my app after Apple?
Yes. On App Store Connect, under "Version Release", you can mark your app as "Manually release this version" Then, after approval, the app's state will be "Pending Developer Release", and you can release it when you are ready.
Replies
Boosts
Views
Activity
May ’22
Reply to xcode13.3.1. Where can I find interface builder? I want to add a text column.
In your screenshot, you are looking at interface builder! Perhaps you mean that you want to see the Document Outline, to the left of your View Controller? If so, click the icon at the bottom-left... ...or perhaps you mean that you want to see the Object Library, in which case click the "+" icon (at the top-right).
Replies
Boosts
Views
Activity
May ’22
Reply to How to distribute a private Xcode app to a few friends
TestFlight might be a good option? That would give you 90 days. For an app for a 2-yr-old, that might be long enough!
Replies
Boosts
Views
Activity
May ’22
Reply to What would be the proper Syntax
func isPassingGrade(for scores: [Int]) -> Bool { var total = 0 for score in scores { total += score } return total >= 500 }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Button That Changes Label on Click
Try this: import SwiftUI struct ButtonTest: View { @State private var isOn = false var body: some View { Button { isOn.toggle() } label: { Image(systemName: isOn ? "star" : "star.fill") } } } struct ButtonTest_Previews: PreviewProvider { static var previews: some View { ButtonTest() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Baby boomer needing help please
It looks like the file "preloader.html" does not exist at the specified location, "htmlPath". htmlPath is nil, so by force-unwrapping it (using htmlPath!), your app crashes.
Replies
Boosts
Views
Activity
Jun ’22
Reply to What happens to app permissions after transfer?
There are no changes to these permissions, after app transfer.
Topic: Code Signing SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’22