Search results for

column

2,061 results found

Post

Replies

Boosts

Views

Activity

Reply to Applescript seems to run in Rosetta on M2
Try this: In Script Editor, create a new script like so: display dialog Hello Cruel World! buttons {OK} default button OK Save it as an application. Launch it from the Finder. Run Activity Monitor and, in the CPU tab, look for the value in the Kind column. It should show Apple (for Apple silicon). What do you see? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Programming Languages SubTopic: General Tags:
Sep ’24
iOS 18 beta - .onAppear in NavSplitView creates an infinite loop
Bug in iOS 18 beta? .onAppear of a NavSplitView-DetailView is called repeatedly after dismissing the view. The app gets unresponsive and can only be killed and cold-restartet. What happens: I update a Binding property in .onAppear of a NavigationSplitView-DetailView. Whenever I leave the DetailView going back to the ListView (the NavSplitView’s first column), the DetailView's .onAppear get’s triggered in an endless loop. This blocks the main thread and freezes the app. This behaviour is only appearing in iOS 18 betas (simulators and devices) and not on iOS 17.x releases. If I remove the code updating the Binding, the .onAppear loop does not happen. Another way of triggering the same unexpected behaviour is by updating an OberservedObject appState.shared singleton, e.g. by a timer. Has anybody come across this type of behaviour? Is this a know change of iOS 18 behaviour or a bug even?
2
0
606
Sep ’24
iPadOS in iOS18 with new UITabBarController ... UIBarButtonItems disappear
I have an iPad app using the new UITabBarController on iPadOS18, which is suffering from a new issue from the new layout. Within my tabs, I have a UISplitViewController, with a 2 column layout. If I load the app, it works ok, but if I put the app in the background, and then bring it to foreground, the navigation bar buttons and title just disappear from the splitView controller’s primary view controller. Before going to background: After coming back from background: I also get the following layout issues posted in the debugger consoler: Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( , , , = UILayoutGuide:0x600003b00a80'TabBarGuide(0x103d18810)'.trailing (active)>, , ) Will attempt to recover by breaking constraint Make a symbolic breakpoint at UIVie
1
0
1.4k
Aug ’24
Failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs)
Xcode prompts the error at var body: some View. I cannot understand what's wrong here because there was no changes after the last successful build. To solve I have already done: Clean Build Folder for several times Restart Xcode Nothing worked. import SwiftUI struct HomeView: View { @StateObject private var viewModel = HomeViewModel() @State var tabSelection: Int = 0 var body: some View { TabView { NavigationStack { Group { if viewModel.entries.isEmpty { EmptyStateView() } else { EntriesGridView(entries: viewModel.entries, tags: viewModel.tags, selectedTag: $viewModel.selectedTags) } } } .tabItem { Label(Saved, systemImage: bookmark) } SettingsView() .tabItem { Label(Settings, systemImage: gear) } } .onAppear { viewModel.fetchTags() viewModel.fetchEntries() } } } #Preview { HomeView() } Other related parts without any errors: HomeViewModel.swift import SwiftUI import Firebase import FirebaseFirestore import FirebaseFirestoreSwift import os.log @MainActor class HomeViewModel: ObservableObject { @Published var
2
0
507
Aug ’24
Reply to Unexpected Transparency in .fullScreenCover(isPresented:) Background in SwiftUI iOS 18 Beta
@marudavid I am not able to reproduce your issue using the following sample code. There is a default background color always on both Xcode 15 and Xcode 16.1 Beta. It is possible you are using some type of ViewModifier that is causing this. The following works fine. import SwiftUI struct Icon: Identifiable { var id: String var color: Color } struct ContentView: View { let icons = [ Icon(id: figure.badminton, color: .red), Icon(id: figure.fencing, color: .orange), Icon(id: figure.gymnastics, color: .green), Icon(id: figure.indoor.cycle, color: .blue), Icon(id: figure.outdoor.cycle, color: .purple), Icon(id: figure.rower, color: .indigo), ] @State private var selected: Icon? var body: some View { LazyVGrid(columns: [.init(.adaptive(minimum: 100, maximum: 300))]) { ForEach(icons) { icon in Button { selected = icon } label: { Image(systemName: icon.id) } .foregroundStyle(icon.color.gradient) .font(.system(size: 100)) } } .fullScreenCover(item: $selected, content: { icon in DestinationView(icon: icon, anim
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’24
Swiftui Table statement conditional table columns
Is it possible to have conditional table columns for a swifui Table statement? Like for this code TableColumn(Image) { artPiece in if let imageData = artPiece.artImage.first, let image = UIImage(data: imageData!) { Image(uiImage: image) .resizable() .frame(width: 50, height: 50) } else { Image(systemName: photo) .resizable() .frame(width: 50, height: 50) } } .customizationID(Image) TableColumn(Name, value: .artName) .customizationID(Name) TableColumn (Art ID, value: .artPieceID) { artPiece in Text(String(artPiece.artPieceID)) } .customizationID(Art ID) have a conditional TableColumn for this part of my SWIFTDATA model var artDefinedFields: [ArtDefinedFields] = [] or if I change the variable string array to this var artDefinedFields: [ArtDefinedFields] = Array(repeating: ArtDefinedFields(), count: 10), initialize the array with None and only create a TableColumn when there is aArtDeginedFields value other than None
3
0
646
Aug ’24
Reply to Swiftui Table statement conditional table columns
So here is all the code Table(artViewModel.filteredArtPieces, selection: $selection, sortOrder: $sortOrder, columnCustomization: $columnCustomization) { TableColumn(Image) { artPiece in if let imageData = artPiece.artImage.first, let image = UIImage(data: imageData!) { Image(uiImage: image) .resizable() .frame(width: 50, height: 50) } else { Image(systemName: photo) .resizable() .frame(width: 50, height: 50) } } .customizationID(Image) TableColumn(Name, value: .artName) .customizationID(Name) TableColumn (Art ID, value: .artPieceID) { artPiece in Text(String(artPiece.artPieceID)) } .customizationID(Art ID) TableColumn (Price, value: .artPrice) { artPiece in Text (formatMoneyDouble(artPiece.artPrice)) } .customizationID(Price) TableColumn (Date, value: .artcreateDate) { artPiece in Text (artPiece.artcreateDate, style: .date) } // .resizable() .customizationID(Date) TableColumn(Artist, value: .artistName) .customizationID(Artist) TableColumn(Meduim, value: .artMedium) .customizationID(Meduim) TableColumn(Type,
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’24
supplementarySidebarTrackingSeparatorItemIdentifier
I'm developing an iOS 14 Catalyst app and I'm trying to setup the window toolbar. I created a NSToolbar and assigned to the scene window titlebar property. var toolbarDelegate = ToolbarDelegate() func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { #if targetEnvironment(macCatalyst) guard let windowScene = scene as? UIWindowScene else { return } let toolbar = NSToolbar(identifier: main) toolbar.delegate = toolbarDelegate toolbar.displayMode = .iconOnly if let titlebar = windowScene.titlebar { titlebar.toolbar = toolbar titlebar.toolbarStyle = .unified titlebar.titleVisibility = .hidden } #endif } I then assigned some items to the toolbar via the toolbarDefaultItemIdentifiers delegate method. func toolbarDefaultItemIdentifiers(_ toolbar: NSToolbar) -> [NSToolbarItem.Identifier] { let identifiers: [NSToolbarItem.Identifier] = [ .toggleSidebar, .print, .flexibleSpace, .print ] return identifiers } This work as expected. Now, let's say that
1
0
1.5k
Aug ’24
NavigationLink double click on List for MacOS
I need the whole row (including space without content) within the NavigationLink to accept a double click gesture as well as the standard single click that will activate the row and display in the Detail View. If I use an onTapGesture(count:2) or simultaneousGesture(TapGesture(count:2) it doesn't quite work as expected. The content of the row will trigger the double click action but not the normal single click behaviour of the NavigationLink and requires clicking in an unpopulated area of the row. I have tried another onTapGesture with count:1 after the first to explicitly tell it to display the detail view which works but does not highlight the now selected row. I'd like to be able to double or single click anywhere in the list row, with a single click highlighting the row and displaying the detail view and a double click should do the same as the single click plus trigger an action. Similar to how Finder's column view works. If anyone could help with this it would be greatly appreciated.
3
0
1.3k
Apr ’22
UICollectionViewLayout unexpected animations when cells contain AutoLayout views with custom height
The code for the issue is attached below. Hello, I am trying to implement a custom UICollectionViewLayout that does the following: Everything works great for the most part, however I have encountered some unexpected animations when applying a new snapshot: As you can see, any cell that contains a custom view with a height set with AutoLayout is scaled vertically before animating to it's intended height. Here is a simple Xcode project that demonstrates the issue. Tap on the plus sign in the top right corner and watch the cells. Example project: https://we.tl/t-9Y25NHzxiI Custom UICollectionViewLayout code: final class CustomLayout: UICollectionViewLayout { struct PMCardContainerLayoutCell: Equatable { var column: Int var row: Int } // Configurable properties public var numberOfColumns: Int = 6 public var cellHeight: Double = 100 public var cellSpacing: Double = 20 public var rowSpacing: Double = 20 public var sectionInsets: NSDirectionalEdgeInsets = .zero public var layoutAttributes: [IndexPath: UICol
Topic: UI Frameworks SubTopic: UIKit Tags:
1
0
433
Aug ’24
iOS18 beta enterprise certificate trust issue
When I trusted my certificate in 'Setting'->'VPN & Device Management', my device reboot automatically. After reboot, it showed that developer of My Team is not trusted in this iPhone, but the app is verified in the second column. The UI looks like: iOS18 beta: First Col: Trust My Team Second Col: MyApp Verified Other versions: First Col: Delete App Second Col: MyApp Verified What's more, my app has plugins(extensions), my app can run normally while the extension is not able to be pulled up on iOS18 beta.
2
0
1.7k
Aug ’24
Reply to VoIP push notifications may not be received
I tried grep apsd[131:, 15:45:11.000+0900,15:34:22.998+0900, and 09:06:19.991+0900 for *.txt *.log in all sysdiagnoses, but there were no hits. How can I read sysdiagnose? Do I need to do any further processing on the resulting files after decompress tar? Also, is it OK for developers to read sysdiagnose? A sysdiagnose archive is a standard zip archive with a bunch of files it. Of those files, the largest and most useful file is by FAR the file named system_logs.logarchive. In the vast majority of cases, sysdiagnose analysis actually means open the console logarchive and try to figure out what happened. The post Your Friend the System Log has some good background on how else that file can be processed and manipulated but most of the time you'll be opening an viewing the file with Console.app. That's what will open it by default if you just double click on the archive. The actual analysis process isn't easy to quickly summarize, as it relies as much on becoming familiar with how the system operates and logs, a
Jul ’24
SwiftUI Scrollview with both axes enabled produces layout mess
The Problem In our brand new SwiftUI project (Multiplatform app for iPhone, iPad and Mac) we are using a ScrollView with both .horizontal and .vertical axes enabled. In the end it all looks like a spreadsheet. Inside of ScrollView we are using LazyVStack with pinnedViews: [.sectionHeaders, .sectionFooters]. All Footer, Header and the content cells are wrapped into a LazyHStack each. The lazy stacks are needed due to performance reasones when rows and columns are growing. And this exactly seems to be the problem. ScrollView produces a real layout mess when scrolling in both axes at the same time. Tested Remedies I tried several workarounds with no success. We built our own lazy loading horizontal stack view which shows only the cells whose indexes are in the visible frame of the scrollview, and which sets dynamic calculated leading and trailing padding. I tried the Introspect for SwiftUI packacke to set usesPredominantAxisScrolling for macOS and isDirectionalLockEnabled for iOS. None of this works as
5
0
5.5k
Jul ’24