Skip to main content
Stack Overflow
  1. About
  2. For Teams
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
0 votes
1 answer
34 views

How to use custom style for macOS app ToolbarItem (the sidebar toggle button)?

This is what I want to achieve for the sidebar toggle button: When hovering: When not hovering: This is what I have now (macOS 26): When hovering: When not hovering: I want to remove the border ...
0 votes
0 answers
19 views

SwiftUI arrow key keyboard shortcuts don't function for iPad

I would like to use the arrow keys as keyboard shortcuts in an app that I am building for iOS/iPadOS, for the sake of users with a hardware keyboard. The following code works fine for iPhone, but not ...
0 votes
1 answer
35 views

Content of TabView is going beyond safe areas in the NavigationStack

import SwiftUI struct OnboardingView: View { @ObservedObject var viewModel: OnboardingViewModel var body: some View { TabView(selection: $viewModel.currentPage) ...
0 votes
0 answers
23 views

How to assign a different ModelContainer to @Query? [duplicate]

My application contains two different databases. The first contains information that does not change and will be distributed in the app's bundle. The second contains information that can be edited and ...
-3 votes
1 answer
34 views

Text Layout Inconsistency with maxHeight and fixedSize

I'm experiencing inconsistent layout behavior with SwiftUI Text when using maxHeight constraints combined with fixedSize(). I have a long text string that behaves differently depending on the ...
1 vote
2 answers
49 views

How do I extend the background of child views to their parent without using GeometryReader and without affecting the natural height in SwiftUI

As you can see in the image below, I want the left (star) and right (sun) views’ backgrounds to fill their parent (HStack) without using GeometryReader or altering the HStack’s natural height. struct ...
0 votes
0 answers
27 views

Reloading another iOS widget's timeline from an AppIntent

I’m working with two iOS widgets (WidgetA and WidgetB) that both display the value of a flag stored in SwiftData. Each widget can update the flag by triggering an AppIntent when a button is pressed. ...
1 vote
1 answer
70 views

How to dynamically size TextEditor like TextField in SwiftUI

In SwiftUI, you can dynamically size a TextField like this which expands vertically as the user types. TextField("Enter text", text: $text, axis: .vertical) I would like to do the same thing ...
1 vote
1 answer
60 views

How to structure SwiftUI so that pages keep their state when switching between different UI layouts?

I have a SwiftUI view that switches between two completely different container layouts: a TabView layout (for compact width) a sidebar + content layout using HStack (for regular width). I am using a ...
0 votes
0 answers
22 views

How to add multiple device-only xcframeworks to enable simulator run too in SwiftUI?

So, I have SwiftUI project, which is multi-modular project. All the modules are included in the form of SPM. Everything works fine until now when we are required to integrate third party sdks which ...
1 vote
2 answers
48 views

Automatic Grammar Agreement with an In-line If Statement

Normally in Swift 5.5+, Automatic Grammar Agreement allows you to inflect a word based on the quantity of an associated numerical variable, such as the following: Text("I have ^[\(dogCount) dogs](...
0 votes
0 answers
66 views

How to make the ToolbarItemGroup in the toolbar group background clear and with glass effect? [closed]

How can I make the background of a ToolbarItemGroup clear with a glass (blur) effect in iOS 26? Is there a supported way to achieve this? I have tried to make the background clear but it didn't work ...
-1 votes
0 answers
65 views

How to implement native Tab Bar search (.searchable) for a Dictionary view in SwiftUI? [closed]

I'm trying to implement native SwiftUI search for my Dictionary screen. The goal is simply to make .searchable show the system search UI (either the expanding tab-bar search, or the regular navigation ...
-4 votes
1 answer
56 views

How to move window control buttons (traffic light) in macOS SwiftUI [closed]

How to make it possible to place the buttons slightly below and to the right of a regular window without using (toolbar, navigationSpitView, etc) like in the Chrome or FireFox browsers the image ...
Advice
0 votes
0 replies
32 views

Implementation of view that covers predictive text panel

I am trying to place a custom view so that it will cover, partially, predictive text panel from the iOS keyboard. However i can't seem to manage implementing it, the predictive text panel is always ...

15 30 50 per page
1
2 3 4 5
...
2784

AltStyle によって変換されたページ (->オリジナル) /