Post

Replies

Boosts

Views

Activity

Reply to Looking for recommendation for s/w development machine
If you want your Mac to last for several years, and you take the longer view, then M-series chips are clearly the future. It seems likely that Apple (and other) software will become increasingly optimised for the M-series. I wouldn't consider any Intel Mac now. If you are pushed for cash, consider an Apple refurbished model? M-series chips have clear battery-life advantages. If you ever intend to use it unplugged, then that is a factor. If you're always plugged-in, then consider a Mac Mini instead.
Jun ’22
Reply to Text Alignment in SwiftUI
Use a VStack to position your content below your heading... ...then add a Spacer, to force everything to the top. struct HomeScreen: View { var body: some View { VStack { HStack{ Text("Tasks") .font(.largeTitle) .fontWeight(.bold) .frame(maxWidth: .infinity, alignment: .leading) .padding() } // TODO: your content goes here... Text("content...") Spacer() /// forces content to top } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’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 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 Looking for recommendation for s/w development machine
If you want your Mac to last for several years, and you take the longer view, then M-series chips are clearly the future. It seems likely that Apple (and other) software will become increasingly optimised for the M-series. I wouldn't consider any Intel Mac now. If you are pushed for cash, consider an Apple refurbished model? M-series chips have clear battery-life advantages. If you ever intend to use it unplugged, then that is a factor. If you're always plugged-in, then consider a Mac Mini instead.
Replies
Boosts
Views
Activity
Jun ’22
Reply to Text Alignment in SwiftUI
Use a VStack to position your content below your heading... ...then add a Spacer, to force everything to the top. struct HomeScreen: View { var body: some View { VStack { HStack{ Text("Tasks") .font(.largeTitle) .fontWeight(.bold) .frame(maxWidth: .infinity, alignment: .leading) .padding() } // TODO: your content goes here... Text("content...") Spacer() /// forces content to top } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Help with two errors on .trim(from: 0, to: 1 - CGFloat(self.sliceSize)) * CGFloat(self.progress)) line
Yes... what are the errors? Where do they appear?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
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
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 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 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 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 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 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 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 Xcode app and website synchronised
RSS?
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 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 "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