Skip to main content
4 votes
Accepted

Using .presentationBackground(_: Style), but default sheet background is still visible

Liquid Glass gives sheets a translucent appearance when they are presented at partial height. When the sheet expands to the large detent, its background becomes fully opaque. With ....
slip_def's user avatar
3 votes
Accepted

Remote notification tap not handled when app is killed

You can also try adding these two AppDelegate methods. First one: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication....
slip_def's user avatar
2 votes

How to reduce top padding of NavigationBar to match native Apple apps?

Here’s the working code that reduces the top padding and makes the navigation look like native Apple apps: // NEW: fixed top padding NavigationStack(path: $projectRouter.path) { ProjectContentView(...
Shakhzod's user avatar
2 votes

How to add separators between the elements in a Picker?

I believe the best (and intended) way to implement this is using Section. Picker("Pick an option", selection: $selection) { Section { Text("Option 1").tag(0) } ...
Alexander Sandberg's user avatar
1 vote

Increase height AND tappable area of TextField?

You could associate the TextField with a FocusState variable, then set focus when the background is tapped: struct ContentView: View { @State private var emailAddress = "" @...
Benzy Neez's user avatar
  • 29.6k
1 vote

Increase height AND tappable area of TextField?

The reason your TextField doesn’t become fully tappable is that SwiftUI only stretches the visual area with padding and frame, the actual tappable area of the underlying UIKit UITextField stays small. ...
slip_def's user avatar
Advice
1 vote
0 replies
0 views

SwiftUI onDelete() modifier

I see. Thank you. I guess now that you explained it I sort of knew that. Thank you again.
JJF's user avatar
  • 2,776
1 vote

How to present accurate star rating using SwiftUI?

Only one geometryReader is used, and it calculates the colorized start using .tint. struct StarsStripView: View { private let rating: Double private let range: ClosedRange<Double> ...
Codelaby's user avatar
  • 3,108
1 vote

Changing the color of the starting screen

To successfully set the background color when using image as a launch screen: create a Color Set in Assets.xcassets, name it, eg. splash-background-color add in Info.plist "Launch Screen" &...
Heps's user avatar
  • 993
1 vote

How to create an image carousel that auto-sizes based on it's content?

I think I’ve found a possible way to approach the requirement. It’s inspired by this answer (https://stackoverflow.com/a/73672263/13050251 ). Although it produces a warning when running, and I know ...
Hozen's user avatar
  • 89
1 vote

Using .presentationBackground(_: Style), but default sheet background is still visible

Using .presentationBackground(.clear) does work for sheets when running with iOS versions before iOS 26. However, with iOS 26, the background is always opaque when the sheet is the default .large ...
Benzy Neez's user avatar
  • 29.6k
Advice
1 vote
0 replies
0 views

CloudKit data initial share sheet in Swift UI and iOS 26

First, your question should be posted a regular question. The solution is to use NSItemProvider registerCKShare(container:allowedSharingOptions:preparationHandler:) and then pass that to the ...
HangarRash's user avatar
  • 16.6k
1 vote

Custom strokeStyle lineCap with corner radius

If you want to keep using Circle().stroke() but just want smoother corners, you can overlay small circles at the endpoints: ZStack { Circle() .trim(from: CGFloat(start + offset), to: ...
cohen72's user avatar
  • 3,030

Only top scored, non community-wiki answers of a minimum length are eligible