Search results for

column

2,047 results found

Post

Replies

Boosts

Views

Activity

Reply to Missing argument for parameter 'images' in call
Thanks so much, your first works great for me... But, how can I do the next step ? When I tapped on Landschaften that will be shows me Landschaften... That's nice. How can I do it for Maritimes? When I Tapped on Maritimes then I will that shows me Maritimes images... Can I drop more NavigationLinks in ContentView ? Have many Thanks ;) import SwiftUI struct ContentView: View { var columns = [GridItem(.adaptive(minimum: 160), spacing: 5)] var body: some View { NavigationView { ScrollView { LazyVGrid(columns: columns) { ForEach(ImagesList, id: .id) { images in NavigationLink { LandView() } label: { ImageCard(images: images) } } } .padding(10) } .navigationBarTitle(Text(Übersicht)) } .navigationViewStyle(StackNavigationViewStyle()) } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22
Missing argument for parameter 'images' in call
Dear All Hope some one can help me... Xcode Shows me 4 Elements to fix it... I will that the user tapped on one Card and goes to that Category. What is my fails ? I know that I have struggle whit the NavigationLink... Hope you can help me out please . Have a nice Weekend.... import SwiftUI struct ContentView: View { func Images(_ images : Images){} var columns = [GridItem(.adaptive(minimum: 170), spacing: 20)] var body: some View { NavigationView { ScrollView { LazyVGrid(columns: columns, spacing: 10) { ForEach(ImagesList, id: .id) {images in ImageCard(images: images) NavigationLink {LandCard()} label: { ImageCard() }) } } .padding(10) } .navigationTitle(Text(Bilder)) } .navigationViewStyle(StackNavigationViewStyle()) } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }
6
0
1.8k
Jul ’22
Reply to Missing argument for parameter 'images' in call
Have a lot of thanks.... Of Course. Here ist Code for ImageCard.... import Swift UI struct ImageCard: View { var images: Images var body: some View { NavigationView{ ZStack(alignment: .bottom) { Image(images.image) .resizable() .cornerRadius(18) .frame(width: 200) .scaledToFit() VStack(alignment: .leading) Text((images.category)) .frame(width: 200, height: 40, alignment: .center ) .background(.ultraThinMaterial) .cornerRadius(18) .bold() } .frame(width: 200, height: 200) .shadow(radius: 3) } } } struct ImageCard_Previews: PreviewProvider { static var previews: some View { ImageCard(images: ImagesList[0]) } } And here is the Code of my model import Foundation struct Images: Identifiable { var id = UUID() var name: String var category: String var image: String } var ImagesList = [Images(name: Steinkirchen, category: Landschaften, image: Uebersicht_1), Images(name: Seacloud-Spirit,category: Maritimes, image: Uebersicht_2), Images(name: Grashalm, category: Natur, image: Uebersicht_3), Images(name: Details, catego
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22
SwiftUI Table Modifying Data when Scrolling
Hey there everyone, I finally got a multicolumn table implemented with what I wanted after looking through the code sample provided here, but now I am having some issues with how the data is displayed. At first, everything displays correctly and fields update as they should, but whenever I scroll, the data does not present it itself as it should, in other words cells that should have remain one value end up changing or zeroing out, which affects the column holding a running total. The application, which is a checkbook ledger application, holds its data in an SQLite database and when I view the database, the values there have changes as well, which forces me to import a previous SQL dump to get everything back, only to experience the issue again. When I go back to an old version of the application, which has a hideous UI, however, scrolling does not modify anything. Does anybody know how to deal with this little problem? If you would like to see what I have already, here is the source code as it curre
2
0
893
Jul ’22
Reply to Back supported Navigation-View
NavigationView has only been soft deprecated, so will still function on iOS 16. As for manually back deploying, since NavigationView has been split into two parts but come with added components, such as a path and control over column visibility as well as the new NavigationLink(_:value:) and navigationDestination modifier, it would be quite difficult to accomodate all of this.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22
Reply to Html part elements not display on page in Safari
@jason Thank you for answer. The code I worked on is an internal service, so I cannot disclose it, but Similarly, I worked on codesandbox. This issue appears in webviews. https://codesandbox.io/s/still-rain-gx5b4h It is plain html and css coding, and the problematic part is the red area. main { position: relative; display: flex; flex-direction: column; align-items: center; } It is the state that flex is given to the main tag, and the child has the position property. I don't know if the css specific attribute is unstable in safari or the main tag attribute itself is the problem. In particular, only in safari (including the latest version) intermittently the area with the red border takes up space, and the elements (including children) are not rendered on the screen. like css visibility: hidden; It had the same effect as the reference. And when I scrolled, the above phenomenon suddenly disappeared. the suspicious part Safari flex, position properties ruin the layout The image of the .button1 class is n
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’22
Reply to ScrollView and prefersDefaultFocus currently incompatible?
And here is the working solution for tvOS 15: struct ContentView: View { @FocusState var focusedItem: String? @State var items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 4) var body: some View { ScrollView() { LazyVGrid(columns: columns) { ForEach(items, id: .self) { item in Button { } label: { ItemView(title: item) } .focused($focusedItem, equals: item) .onMoveCommand { moveCommandDirection in guard let index = items.firstIndex(where: {$0 == item}) else { return } if moveCommandDirection == .down, index >= items.count - columns.count { focusedItem = items.last } } .padding(.bottom, 8) } } } } } If you have any workaround for tvOS 14 I'll be appreciated it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22
Reply to ScrollView and prefersDefaultFocus currently incompatible?
Yes, seems like since you wrap up HStack to ScrollView prefersDefaultFocus won't work correctly after that. I have a similar issue and can't get it to work for tvOS 14. Nevertheless, it works well with iOS 15 using @FocusState. So if you don't need tvOS 14 support you can use that approach. Here are my observations of the issue. What I try to achieve is set focus on the last item(10) if you press down on items 7 or 8. If I'm not wrapping up LazyVGrid into ScrollView everything works as expected. But as soon as I wrap up LazyVGrid into ScrollView when I press the down button on those items it always gets focused on the first item. Here is my code example and screenshot. struct ContentView: View { @Namespace var focusNamespace @Environment(.resetFocus) var resetFocus @State private var defaultFocusIndex: Int = 0 @State var items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 4) var body: some View { ScrollView() { LazyVGrid(columns: columns
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22
ITMS-90338: Non-public API usage - The app references non-public selectors in WoundMatrixHC.iOS: accumulatorPrecisionOption
Dear Support, I'm unable to push a build to TestFlight. This is using Xamarin.Forms as the build creator. I'm getting the error I have pasted below. Please advise how to resolve. Thank you, Joshua Lowenthal Dear Developer, We identified one or more issues with a recent delivery for your app, WoundMatrix Patient 1.57 (13). Please correct the following issues, then upload again. ITMS-90338: Non-public API usage - The app references non-public selectors in WoundMatrixHC.iOS: accumulatorPrecisionOption, alignCorners, assetForIdentifier:, attackTime, batchStart, bytesPerImage, calibrationMode, checkFocusGroupTreeForEnvironment:, classesLossDescriptor, clipRect, colorTransform, columns, commissioningComplete:, computeStatistics, confidenceLossDescriptor, curveType, deactivate, determineAppInstallationAttributionWithCompletionHandler:, encodeToCommandBuffer:sourceTexture:destinationTexture:, envelope, first, forward, frontFacingWinding, gradientForWeights, initWithBuffer:offset:, initWithCoder:device:, init
5
0
3k
Jul ’22
PencilKit is throwing GPU/Metal errors (Insufficient Memory)
For context: I'm working on a score pad app, with the ability to have a column of PKCanvases, so you can just hand write things without them being scribbled into text. As part of my stress testing, I basically filled the grid with ~50 canvases, and it seems that after a certain amount of CanvasViews are added to the score pad, my M1 iPad Pro GPU is unable to keep up. Occasionally, a cell will just entirely render as magenta, and I will have dozens and dozens of Execution of the command buffer was aborted due to an error during execution. Insufficient Memory (IOAF code 8) logs thrown to the console. I honestly don't know where to go from here. I recognize that what I'm doing is almost definitely not what PencilKit was designed for, but I also know the API is relatively young. I can't tell if this is a bug that should be fixed by Apple, or entirely my fault and a sign that I need to redo the entire thing. I've attached a screenshot with the magenta cell, there's also another two cells where the pencil
6
0
3.6k
Jul ’22
Reply to connecting windows and doors to a wall.
CapturedRoom.Surface has a transform simd_float4x4 and a dimensions simd_float3. The wall length is the dimensions.x and the position can be extracted from the transform with extension matrix_float4x4 { var position:SCNVector3 { return SCNVector3(columns.3.x, columns.3.y, columns.3.z) } } The Euler angles for the wall can be extracted using extension float4x4 { var eulerAngles: simd_float3 { simd_float3( x: asin(-self[2][1]), y: atan2(self[2][0], self[2][2]), z: atan2(self[0][1], self[1][1]) ) } }
Topic: App & System Services SubTopic: General Tags:
Jul ’22
Swift: How to change DetailView depending on SideBar Selection State with SwiftUI 4?
Context I have a problem with the new SwiftUI SideBar / NavigationLink concept. I have created a simple 2 Column NavigationSplitView with a SideBar and a DetailView. Once the App is launched, the preselected Timeline RootView appears as the DetailView. However, when I select a different SideBar Item, the DetailView does not change accordingly. Code struct SideBar: View { @State private var navigationItem: NavigationItem? = .timeline var body: some View { NavigationSplitView { List(NavigationItem.allCases, id: .self, selection: $navigationItem) { navigationItem in NavigationLink(value: navigationItem) { Label(navigationItem.name, systemImage: navigationItem.symbol) } } } detail: { if let safeNavigationItem = navigationItem { safeNavigationItem.rootView } else { Text(String(localized: select.an.option, defaultValue: Select an Option)) } } } } Question Do you have any idea how I can solve this issue? Thanks a lot for your support in advance. Note: Just ran it on macOS, it is working there. However, stil
1
0
1.8k
Jul ’22
Selection disappearing in NSTableView inside SwiftUI
I have a SwiftUI view which contains an NSTableView wrapped with an NSViewControllerRepresentable struct. This has a Coordinator, which I set up as the NSTableView's delegate. There is an implementation of tableViewSelectionDidChange to pass the selected row index up to the enclosing view. The problem is that I can click and select a row, but the selection disappears, usually on the first click, and always when clicking a column header to sort. I have looked at the various delegate methods for notifying about selection changing, and they don't seem to be called. How can I find where the selection is being changed?
4
0
2.1k
Jul ’22