These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding.
Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Post
Replies
Boosts
Views
Activity
Hang on, maybe I misunderstood this. Can you use something like the respondsToSelector? I have no idea if it's there in Swift 5/6, but this SO page gives an example of how to use it: https://stackoverflow.com/questions/24167791/what-is-the-swift-equivalent-of-respondstoselector
Raise this in the usual way, as a Feedback report, then post the FB number here.
SwiftUI draws the button as wide as it needs to be for the title. It's up to you to tell it how wide the button should be. I do this by creating and applying a new ButtonStyle, like this:
import SwiftUI
struct ContentView: View {
var body: some View {
VStack(alignment: .center) {
Button("Short", action: {})
.buttonStyle(MyButtonStyle(bgColor: .gray, fgColor: .white))
Button("Long title", action: {})
.buttonStyle(MyButtonStyle(bgColor: .yellow, fgColor: .black))
Button("A longer button title", action: {})
.buttonStyle(MyButtonStyle(bgColor: .green, fgColor: .white))
Button("A much, much, much longer button title", action: {})
.buttonStyle(MyButtonStyle(bgColor: .blue, fgColor: .white))
}
}
}
struct MyButtonStyle: ButtonStyle {
var bgColor: Color?
var fgColor: Color?
func makeBody(configuration: Configuration) -> some View {
configuration.label
.font(.headline)
.bold()
.allowsTightening(true)
.lineLimit(2)
.frame(width: 200, height: 60)
.background(bgColor ?? .gray)
.foregroundStyle(fgColor ?? .white)
.clipShape(RoundedRectangle(cornerRadius: 16))
}
}
#Preview {
ContentView()
}
That example gives you this:
Note that you can change the number of lines in the button by changing .lineLimit().
Sadly, that's the state of things. You're using an almost 10 year old laptop.
Do you know anyone with a Mac with macOS 14.5 or later?
Or, you can go down the usual route of refurbished machines or an auction site, or a trade-in.
Xcode 15 doesn't support the iOS 18 SDK, so you cannot build iOS 18 apps with an Xcode earlier than version 16.
There is no workaround for that.
I suppose you should be asking how to fix the non-trivial issue with building your app in Xcode 16?
It would help to see your code as you might be doing something wrong in there.
You haven't actually told us why the ColorPicker isn't working properly...
Show us your code, and explain exactly what you want to happen, and what it's actually doing. Maybe a screenshot would help too?
To write code you need to use three backticks, i.e.: ```
Because you used only one, the code isn't formatted correctly.
And, because you didn't edit your post within an hour to correct this, you would now have to add a new reply with the fixed code. You can do this if you like. I doubt many people will reformat your code themselves.
now I just have to have the same lock screen and home screen background?
No. Just customise the Lock Screen as usual, and when you see the two screens (the Lock Screen and Home Screen with darkened squares for the app icons), tap the Home Screen one, and at the bottom tap "Photo".
I have my phone in darkmode so now I just have to deal with the ugly black thumbnails for the app? I can’t revert them to normal colors while keeping dark mode?
Yes, I think you can. Customise the Home Screen by holding a finger down in a space on the screen, then in the top left tap "Edit" then "Customize". In the panel that appears at the bottom of the screen choose "Light", then press the little sun icon in the top left of that panel. That will change the background to dark, but leave the icons light.
Does that work for you?
By the way, these are the Developer Forums where third party developers of apps for Apple;s operating systems talk about code and ask for help on how to write some code. This isn't the place for product support questions. For that, go to the Apple Support Forums. Thanks.
Well, since iOS 18.1 isn't out yet, I'd say you should report any bugs with WhatsApp to the maker of that app. Get in touch with Meta.
You can either pay someone to do it - but, please don't solicit for it here; or you can learn to write it yourself. There are lots of Swift and SwiftUI tutorials, and the Apple Developer pages have sample code that will help you along.
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding.
Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding.
Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding.
Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.