Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
178 views

I am new to swift IOS development by making hello world I tried to summarize my problem. I am unable to make app in full screen need help. I even added Launch Screen. I am attaching screen shots. ...
-2 votes
0 answers
28 views

I’m working on a screen that uses a single SwiftUI List composed of: a top block (statistics, month picker, year selector, total, Entrata/Uscita picker). a list of transactions grouped by day, each ...
5 votes
2 answers
530 views

I'm writing a resizable view in SwiftUI on macOS. Drag its edge can change its size. I'd like to show according cursor when dragging different edges. So I looked up Apple NSCursor documentation, ...
0 votes
0 answers
21 views

let provider = NSItemProvider() if model.type == .rich { if let attr = NSAttributedString( with: model.data, type: model.pasteboardType ...
0 votes
0 answers
47 views

I'm building a macOS app using SwiftUI, and I want to create a draggable floating webcam preview window Right now, I have something like this: import SwiftUI import AVFoundation struct ...
1 vote
0 answers
49 views

I'm trying to show a fullScreenCover when the user taps the third tab instead of actually switching to that tab. The issue is that resetting selectedTab = oldValue in onChange breaks the ...
8 votes
3 answers
3k views

I'm trying to create a SwiftUI Picker in MacOS that looks like the ones in Xcode or other Mac Apps. To be more specific, I'm trying to add that separator line between the elements in the picker. Like ...
1 vote
0 answers
55 views

I use a custom AppTheme type and inject it via a custom EnvironmentKey. Views can access the theme using @Environment(\.appTheme) or override it explicitly. While this work fine in most cases it ...
0 votes
1 answer
71 views

I’m building a reusable custom bottom sheet component in SwiftUI because my app supports iOS 15, so I can’t use .sheet with detents yet. Functionally everything works the sheet opens and closes but I’...
1 vote
1 answer
106 views

before updating to iOS 26 my list was looking fine but now it has abnormal paddings and because I am using fixed height, I had to increase the height from 40 to 60 to fit the text. There are currently ...
3 votes
2 answers
64 views

I wanted to try out the new .presentationBackground modifier from iOS 16.4+ for a clear background in a Sheet. Stack Overflow posts like this suggest it's possible. But the presentationBackground just ...
1 vote
1 answer
50 views

I'm working on vertical paging, using TabView. I put player code in TabView and rotate it to show vertical paging, but UI breaks. Vertical Pager struct EpisodeVerticalPager: View { let episodes: ...
1 vote
1 answer
49 views

I have created a reusable ModalDialog view that presents modal content via .fullScreenCover. Inside this dialog, a button triggers a SwiftUI .alert. This works fine in many situations. However, in a ...
Advice
0 votes
2 replies
43 views

Let's use a basic todo app as an example - sharing a todo list. I have a share button (square with up arrow) that when the user taps I want the initial share sheet to appear. If I have to create and ...
3 votes
4 answers
4k views

At the end of the day, I'm trying to scale to fill an image into a height of X (439px in my case) and then clip it using a RoundedRectangle. post.picture .resizable() .aspectRatio(contentMode: ...
1 vote
2 answers
2k views

I would like to draw a circle in SwiftUI where its border has subtle rounded corners. I think the picture is worth more than a 1000 words in this case. So far I'm able to draw circles with "...
1 vote
1 answer
62 views

I want to be able to give these ends a corner radius of 5 instead of sharp square ends. lineCap only supports .round, .butt and .square How can I create a custom corner radius for the lineCap? Here is ...
1 vote
2 answers
1k views

I have the code below which I'm using in a SwiftUI view. When I compile this in Xcode 26.0.1 with iOS 26 I get this warning on the line that calls decode: Main actor-isolated conformance of 'Post' to ...
0 votes
0 answers
47 views

I am building a Kotlin Multiplatform app where I want to use shared UI with Compose for both Android and iOS. However, I need some native views with their own state for certain parts of the app, so I’...
0 votes
2 answers
95 views

I’m trying to build an image carousel similar to the one in the App Store, but I'm a facing a lay-out issue. The carousel should: Automatically adjust its height based on its content Automatically ...
2 votes
1 answer
322 views

I’m building a Files-style SwiftUI app and my primary goal is to adopt both: NavigationSplitView on wider (regular) widths (iPad/macOS), and TabView + NavigationStack on narrow (compact) widths (...
1 vote
1 answer
37 views

I have severe UI hang issues whenever my sync worker is running. The app experiences: Screen navigation freezes Scroll lag and stuttering Unresponsive UI during data synchronization The root cause is ...
2 votes
1 answer
67 views

I’m running into an issue with remote push notifications on iOS. When the app is in background or inactive, tapping a notification correctly triggers: userNotificationCenter(_:didReceive:...
3 votes
2 answers
9k views

I'm trying to dynamically size some views which end up being placed inside of a scrollview. Here is the simplest sample code I can think of: struct RootView: View { var body: some View { ...
14 votes
5 answers
23k views

Any idea on how to apply a specific background color to the bottom toolbar? NavigationView { List { .... } .toolbar { ToolbarItem(placement: .bottomBar) { ...
0 votes
0 answers
299 views

I can’t remove the Liquid Glass / translucent blur background from the TabView (iOS 15+). I want the tab bar to be fully transparent so my custom background image shows through. Instead, the tab bar ...
1 vote
1 answer
74 views

I’m integrating achievements and leaderboards into my SwiftUI app and would like to present the Game Center dashboard directly from within SwiftUI. However, it seems the only supported way to show the ...
-3 votes
0 answers
46 views

Upgraded to iOS 26.1 and now getting a white capsule behind my StyleSheet buttons: The View code is: ToolbarItem(placement: .topBarLeading) { Button { ...
25 votes
4 answers
9k views

I'm trying to create a simple struct that accepts an array of Views and returns an ordinary VStack containing those Views except they all are stacked diagonally. Code: struct LeaningTower<Content: ...
8 votes
5 answers
5k views

I need to present accurate star rating like 3.1, 4.8 using SwiftUI. The desired result should be like this:
2 votes
3 answers
2k views

I am developing a SwiftUI app that uses its own color scheme and does not use the .light or .dark schemes. Every time it launches, a white screen shows for one second or two, while the app loads, ...
Advice
1 vote
2 replies
32 views

I’m trying to learn iOS swift UI development working through some of the Apple tutorials I came across this piece of code. I don’t understand how the onDelete modifier works. This may be more of a ...
Advice
0 votes
1 replies
58 views

So in iOS 26, the search field changed a bit where it can be at the bottom. While other apps have the search in the nav bar, wallet has it in the toolbar, so when it's pressed it changes to a ...
1 vote
2 answers
61 views

I'm having a difficult time trying to figure out how to increase both the height AND the tappable area of a TextField. I've tried these three solutions, and none have worked for me. I still can't tap ...
2 votes
1 answer
91 views

I'm trying to implement a tab bar on iOS 26 like the Music or Health apps on iPhone. On a white background this is not noticeable, but when changing the background color to dark at the start of the ...
-1 votes
1 answer
70 views

When I use navigationTitle in SwiftUI, the top padding becomes too large. However, in Apple’s own apps the top area is noticeably smaller and more compact. How can I achieve the same native look with ...
0 votes
1 answer
53 views

I have the following code which shows a blue background and a persistent sheet that always shows. In the top left, I want to add a back button that floats above BOTH the blue background and sheet, and ...
1 vote
1 answer
58 views

on macOS26 / 26.1 Tahoe the Toggle stopped being colored / tinted by using modifier .tint(toggleColor()) it just remains with the current system color... e.g. blue or the tint central to the whole ...
0 votes
0 answers
66 views

I am trying to apply .glassEffect to some controls that are in a horizontal scroll view in a bottom .safeAreaBar. No matter what I try, there is a persistent pesky flickering of the background that I ...
1 vote
1 answer
226 views

I am trying to use the SignInWithAppleButton for SwiftUI to work with tvOS? I am getting an issue where the request and completion blocks are not being called and there is no error in any log that I ...
1 vote
1 answer
125 views

I created an extension on ToolbarContent in order to simplify code when using new SDKs technologies. public extension ToolbarContent { @available(iOS 17, macOS 13, *) @ToolbarContentBuilder ...
1 vote
1 answer
56 views

I'm trying to create a SwiftUI Menu containing two Picker to control content and sort. However, I cannot replicate menu appearance shown in my reference screenshot. No matter which approach I try, I ...
83 votes
7 answers
80k views

I want to manually set the frame height of a view in SwiftUI to the size of the safe area of the screen. It's easy to get the bounds of the screen (UIScreen.main.bounds), but I can't find a way to ...
1 vote
1 answer
82 views

I’m building a macOS video editor that uses AVComposition and AVVideoComposition. Initially, my renderer creates a composition with some default video/audio tracks: @Published var composition: ...
54 votes
20 answers
40k views

I've looked through the forums but I'm seeing mixed answers especially ones from an old Xcode version. I only decided to add this after already typing up the code I have in this: How could I go about ...
-3 votes
1 answer
50 views

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 ...
2 votes
1 answer
81 views

I'm working on a SwiftUI app using SwiftData, and I'm very new to both frameworks, and swift in general to be honest. I'm trying to create a webview that embeds a monaco editor that will then send the ...
0 votes
1 answer
81 views

When I put a SwifUI segmented control in a navigation bar, liquid glass seems to be making it render incorrectly. The capsule has vertical clipping and the sides show layered backgrounds. Here is my ...
2 votes
1 answer
59 views

I want to use NavigationStack with a custom navigation path array supporting multiple destination types. For example: enum A: Hashable { ... } enum B: Hashable { ... } NavigationStack(path: $...
1 vote
3 answers
2k views

When changing device settings between light mode and dark mode my Google Maps mapStyle is not updating. The other views successfully toggle to the selected mode, it's just the map that doesn't change. ...

1
2 3 4 5
836