Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
1 answer
103 views

I know this is somewhat of a strange thing to do, however because of our apps mix of SwiftUI and UIKit I have found myself writing views that on iPad are technically greedy but center a white ...
CalebK's user avatar
  • 747
0 votes
1 answer
111 views

I am still struggling to understand how view modifiers work in SwiftUI. As far as I know modifiers do not directly change the corresponding view but instead embed the view within a new view which ...
0 votes
0 answers
54 views

I've created a custom navigation bar modifier CustomNavigationBarModifier in SwiftUI, which implements the ViewModifier protocol to standardize the navigation bar style throughout the app. However, I'...
0 votes
1 answer
123 views

While trying to learn about how ViewModifiers can be used, I wonder if it possible to access the properties of the underlying view within the modifier: For example, I would like to create an ....
1 vote
1 answer
153 views

I am working on a SwiftUI project where I need to limit the number of characters a user can input in a TextField. I have implemented a custom ViewModifier to enforce this character limit. The limit is ...
vigdora's user avatar
  • 433
-2 votes
1 answer
95 views

I am new in SwiftUI, and now I am investigating ViewModifiers. All tutorials are very simple, just create new Struct, and body function + extension. But what does Apple say about it: From developer....
0 votes
0 answers
104 views

I am confused by the onChange modifier behaviour inside NavigationStack with single EnvironmentObject. I created this simple setup: struct ContentView: View { var body: some View { ...
0 votes
1 answer
394 views

struct Item: Identifiable { let id = UUID() let title: String } struct ContentView: View { let items = [Item(title: "One"), Item(title: "Two"), Item(title: "...
2 votes
1 answer
205 views

I've make a custom ViewModifier like "Progress bar" (but in code below, for example, I use just different background color. I have a function to download data from API (in code below, for ...
1 vote
1 answer
154 views

I would like to do something like this: struct HandleUrlDropModifier<Content>: ViewModifier where Content: DynamicViewContent { @Environment(\.modelContext) var modelContext var content:...
fer0n's user avatar
  • 1,363
1 vote
1 answer
148 views

I want to add the iOS16 API for 'contextMenu forSelectionType: menu:', but I also need to support iOS15, so I need a conditional ViewModifier for this. I'm struggling with the correct syntax for it. ...
Z S's user avatar
  • 7,577
2 votes
2 answers
220 views

I have a custom view: public struct CustomView: View { var text1: String var text2: String public var body: some View { VStack { Text(text1).tag(0) Text(...
Jim's user avatar
  • 9,294
-1 votes
1 answer
243 views

SwiftUI modifiers don't allow passing optional values, and I'd really like to handle them in a clean way. E.g. struct MyView: View { let accessibilityValue: String? var body: some View { ...
0 votes
0 answers
217 views

There is very poor performance when pulling scroll bar indicator to bottom and scrolling cells with big ordinal numbers. But if we comment empty ViewModifier applied to cell, everything became ok. ...
1 vote
2 answers
516 views

I'm trying to write a custom ViewModifier where my implementation needs to detect if the content it is modifying is visible or not. This is not an ordinary ViewModifier where it's irrelevant if the ...
Daniel's user avatar
  • 9,088

15 30 50 per page
1
2 3 4 5

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