Post
Replies
Boosts
Views
Activity
Are you going to tell us what the warning is?
And what version of Xcode you are using (compared to the one Paul Hegarty is using, in the Demo you are working from)?
SwiftUI can only handle 10 views at a time.
Your VStack contains more than 10 views, hence the error.
Try gathering your views into two or more Groups.
Like...
Group { /// gather up to 10 views...
Text ("Monday daily Routine")
Text ("*")
Text ("Wake up")
Text ("6:20AM")
}
You're welcome.
Best to mark this question as answered, and post two new questions.
Bad link.
Let's look at this...
Apple Maps shows a certain view.
When using MKMapView, your app shows the same view.
That seems entirely consistent.
Google Maps shows a different view.
Okay.
Google Maps is an entirely different system, nothing to do with Apple Maps, or MKMapView.
If you want to use Google Maps data in your app, you can do that (but not in MKMapView... they use a "GMSMapView").
"Another app" shows a different view.
You think it is using Apple Maps (you spotted an Apple logo).
You think it is using MKMapView (how would you know that?).
Who knows what it is doing, or using?
You would have to ask the app developer.
Your app is consistent with Apple Maps.
When your local Apple Maps data is updated, your MKMapView will reflect that.
Not wanting to know "how", just wanting to know "if".
Can a users data be retained...
Yes.
Your post is tagged with iOS, but you refer to "turn off the App Sanbox".
Can you clarify what platform you are working on?
Yes, I am seeing this.
It's kind of flaky...
if doesn't offer auto-complete
for does
I tried:
Product > Clean Build Folder
...which temporarily fixed the issue, but soon after, it started happening again.
I also tried deleting the Derived Data folder, with no effect.
Xcode Version 14.0.1 (14A400), Objective-C.
it is frustrating that the result is always full screen.
I wonder why they just let it behave like that in the iPhone
??
Perhaps you could share your code?
I think you just have to supply it with some alternative sizes.
Try something like this:
struct BottomSheetView: View {
@State private var showSettings = false
var body: some View {
Button("View Settings") {
showSettings = true
}
.sheet(isPresented: $showSettings) {
Text("Settings")
.presentationDetents([.fraction(0.1), .medium, .large])
}
}
}
detents:
A set of supported detents for the sheet. If you provide more that one detent, people can drag the sheet to resize it
Read up on:
large
medium
custom
fraction
height
Context
Duplicate of https://developer.apple.com/forums/thread/717581
Disappointingly, you have not added the extra information I asked for, on the original post.
You can separate your cases with commas, like this:
if let var1 = optionalVar1,
let var2 = optionalVar2,
let var3 = optionalVar3 {
}
...or use the new (Xcode 14) shorthand, like this:
if let optionalVar1,
let optionalVar2,
let optionalVar3 {
}
Try:
setting the locale immediately after creating the formatter (before applying the format)
using Locale.autoupdatingCurrent
let formatter = DateFormatter()
formatter.locale = Locale.autoupdatingCurrent /// automatically updates with the user's configuration settings:
formatter.dateStyle = .long
return formatter.string(from: date)
You might find it useful to read @eskimo's recent comment on this thread:
https://developer.apple.com/forums/thread/717503