Hi, How to catch the event when details panel of a SplitView shows and get hidden, like when split is 2 columns and when its details only ? Kindest Regards
Search results for
column
2,061 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I'm using two loops, one nested in another to create and assign a subclass to the parent class. I'm using x for one loop and y for the other loop. Print statement shows the loop variables being updated correctly, however the subclass has both variables as the same value. I'm not sure if the value is being stored as the same value or being displayed as the same value. I've checked both creation and display code. I can't find the error. var body: some View { NavigationSplitView { List { ForEach(routes) { item in NavigationLink { Text(Route: (item.route_name) nSeason: (item.route_season)nCoordinates: (item.route_coordinates)nProcessed: (String(item.route_processed))nNumber of baseboards: (item.route_baseboards.count)) } label: { Text(item.route_name) } //end route nav link } //end route for each .onDelete(perform: deleteItems) //end route nav ForEach(baseboards) { item in NavigationLink { //if let test = item.baseboard_heightPoints.count { Text(Grid Size: (String(item.baseboard_grid_size))nRow:(String(item.baseb
I'm having issues with a Lazyvgrid displaying images after the screen orientation changes ( either from horizontal to portrait, or the reverse ) What happens is the images are not sized correctly. If 2 column , I see 1/3 of column 1 and the image in column 2 takes 2/3 of the screen width. Similar issues with 3 or 6 column layout. The Lazyvgrid is inside a ScrollView and thats inside a Tabview. I'v tried to trick an update by changing the column layout, the content mode (fit/fill) of the images, etc. but so far nothing has worked. Any suggestions ?, anyway to invalidate a lazyvgrid and have swiftui rebuild it ? Thanks.
We are having some trouble getting log stream to output events in real time from coreaudiod while we are in a zoom call or listening to audio. Repro steps: Open a Terminal window and execute log stream --predicate process=='coreaudiod' Create a zoom call, join it, stay for 10 seconds, leave the meeting Expected: audio events should show in log stream Terminal window Actual: no audio event shows Also, if after this test I execute log show --last 5m process=='coreaudiod' the events are showing; that is proof that coreaudiod actually emitted those events; Does anybody have any idea what could cause this? This happens on Sonoma 14.2.1, on an MBP M2 Max with 64GB memory. What we have looked at already: actually log stream does not show events from a lot of other procs on the machine; executing log stream --timeout 10s --style json | jq .[] | jq .processImagePath | sort | uniq -ic | sort --reverse yields only 3 sources (counts in the first column): 205 /kernel 10 /System/Library/CoreServices/ManagedClien
I'm running into this error, when the underlying SwiftData object changes (gets an object added to it): * A NavigationLink is presenting a value of type “Project” but there is no matching navigationDestination declaration visible from the location of the link. The link cannot be activated. Note: Links search for destinations in any surrounding NavigationStack, then within the same column of a NavigationSplitView. * For instance, when I first fire up the simulator, clicking on any existing project correctly takes me to its details page. However, as soon as I add a new project or delete a project, none of the navigation links work any more. If I reload the simulator, they all work again! Makes me suspect it's an error with not recomputing the links when the underlying data change, but I can't figure out what I need to change, as everything looks correct. Any help would be appreciated! ContentView: struct ContentView: View { @Environment(.modelContext) var modelContext @Query(sort: Project.endDate) var
On my shop and content views of my app, I have a shopping cart SF symbol that I've modified with a conditional to show the number of items in the cart if the number of items is above zero. However, whenever I change tabs and back again, that icon disappears even though there should be an item in the cart. I have a video of the error, but I have no idea how to post it. Here is some of the code, let me know if you need to see more of it: CartManager.swift import Foundation import SwiftUI @Observable class CartManager { /*private(set)*/ var products: [Product] = [] private(set) var total: Int = 0 private(set) var numberofproducts: Int = 0 func count() -> Int { numberofproducts = products.count return numberofproducts } func addToCart(product: Product) { products.append(product) total += product.price numberofproducts = products.count } func removeFromCart(product: Product) { products = products.filter { $0.id != product.id } total -= product.price numberofproducts = products.count } } ShopPage.swift import Sw
I'm reworking my app and update code and design. Because my app is one both iPhone and iPad, i'm using Splitview to handle the configurations. But my app has 4 section that I manage using a Tab bar and each tab has a SplitView. As you can see in images, the problem is that if I attach directly the UISplitViewController to UITabBarController you don't see two columns but only one (the primary or secondary view) both iPhone landscape orientation and iPad. A solution that I found is to attach the splitviewcontroller to a view that contains a ContainerViewController e connect the split view to this container. If you do this, you see the split view work correctly ma the problem is the customization of appearance (look at image 3) So may questions are: why I have to embed a split view in a container view controller and i can't connect it directly to tabbar as we done until now? Is there an other better solution then put a split view in a containerView? Thank you )
This isn't working for the Variation Selector-15 (U+FE0E) for all the characters. Can you please apply that variation selector to all your Unicode characters? I) Steps to reproduce the issue: navigate in safari to the page https://eurovot.com/vs.htm II) Expected result: as the 1st column of characters have the Variation Selector-15 (U+FE0E) applied, and the 2nd column have the Variation Selector-16 (U+FE0F) applied, the first column should always display orange characters and the second column emoji characters. III) Error result: some characters are working fine in the 1st column and displayed as text in orange colour, but some other aren't displayed as text, but displayed as emojis instead.
Topic:
Safari & Web
SubTopic:
General
Tags:
@kbista Did you ever figure out a fix to this? I am still having this problem where charts is centering points inside of the columns on the x-axis.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
I am using the following code to create a texture atlas at runtime using a single .png image sprite sheet: func createSpriteTextureAtlas(atlasNumber atlas:Int, forWorld world:Int) { //load the png file let image = UIImage(named: world(world)_spritesheet(atlas)_2048x2048.png) //create the dictonary var imageDictionary = [String: UIImage]() //iterate through all rows and columns and get the subimage var imageIndex = 0 for row in 0...7 { for column in 0...7 { let sourceRect = CGRect(x:column * 256, y:row * 256, width:256, height:256) let sourceImage = image?.cgImage!.cropping(to: sourceRect) let subImage = UIImage(cgImage: sourceImage!) //add the sub image and name to the dictionary imageDictionary[(imageIndex)] = subImage imageIndex = imageIndex + 1 } } //create the texture atlas using the dictionary spriteTextureAtlas[atlas] = SKTextureAtlas(dictionary: imageDictionary) } I have a different sprite sheet for every world. I made all the sprite sheets myself using the same tool. This code works
Hello , You have to go into your project. Click on your Bluetooth_test app and click “About”. In the Customs IOS Target table, click Plus and look for Privacy - Bluetooth Always Usage Description. In the Value column, enter your reason for wanting this permission.
Topic:
App & System Services
SubTopic:
Networking
Tags:
When I view processes in Activity Monitor's All Processes, Hierarchical view, it shows which processes launched other processes. For instance, if I have Network open inside System Preferences, then when I expand System Preferences, I see (irrelevant columns omitted):Process NamePIDSystem Preferences22033 com.apple.preference.network.remoteservice22043I.e. Activity Monitor knows that remoteservice was created by System Preferences.However, when I use 'ps' from the command line, both processes' parent PID values are 1 (launchd):$ ps -ww -o 'pid,ppid,command' -p 22033,22043PIDPPIDCOMMAND220331/Applications/System Preferences.app/Contents/MacOS/System Preferences220431/System/Library/PreferencePanes/Network.prefPane/Contents/XPCServices/com.apple.preference.network.remoteservice.xpc/Contents/MacOS/com.apple.preference.network.remoteservicesysctl(kern.proc.pid) is the same.How can I learn that remoteservice (pid 22043) was created by System Preferences (pid 22033)?This is OS X Yosemite 10.10.5, but I beli
I'm trying to use the Xcode 15.0 beta on macOS 13.4 (22F66) on a MacBook Pro 16 (2019) but whenever I try to start a new project, Xcode becomes unresponsive – seemingly indefinitely. In Activity Monitor I see Open and Save Panel Service (Xcode) (Not Responding): Even if I try to use Xcode 14.3.1 now I get the same problem. I've tried to resolve this by removing all Xcode-related files as well as the Xcode command line tools and reinstalling them but to no avail. I'd appreciate any and all help in how to fix this. EDIT: I have since found out that if I force-quit the bird process, Xcode will react again. But the bird process will start up and shoot to the top of the % CPU l column in Activity Monitor again almost instantly. It appears to be iCloud-related but I don't know what's causing it to take up so much CPU resources and make Xcode unresponsive, and how I can fix this.
Hi, I wrote the code below to demonstrate an issue I cannot handle, since I am very new to swiftui struct Cell: Identifiable { var id: UUID = UUID() var i: Int = 0 init(i: Int) { self.i = i } } struct ContentView: View { var columns: [GridItem] = [GridItem](repeating: GridItem(.fixed(40), spacing: 5), count: 60) var cells: [Cell] = [] init() { cells.removeAll() for i in 0..<180 { cells.append(Cell(i:i)) } } var body: some View { ScrollView([.horizontal, .vertical]) { LazyVGrid(columns: columns, spacing: 5) { ForEach(cells) { cell in ButtonView(cell: cell) } } } } } struct ButtonView: View { var cell: Cell @State var popOver: Bool = false var body: some View { Button { popOver.toggle() } label: { Text((cell.i)) } .popover(isPresented: $popOver, content: { Text(Information line of button (cell.i)).padding() }) } } #Preview { ContentView() } Running the code above, button clicks are not always work
I have an infinite week scroller implemented using a TabView's page styling. basically when you scroll to the next week, it pre-loads the week after so that you can scroll infinitely. Since iOS 17.4, it seems to partially scroll two pages ahead. Scrolling backwards works fine. I made a radar: FB13718482 Here is a simplified implementation that has the issue reproduced. It uses the swift ordered collections library. Video of the issue: https://youtu.be/JW8dHqawURA import Foundation import OrderedCollections import SwiftUI struct ContentView: View { private let calendar: Calendar private let dateFormatter: DateFormatter @State var weeks: OrderedDictionary @State var selectedWeek: WeekView.Week.ID init() { let calendar = Calendar.autoupdatingCurrent self.calendar = calendar let formatter = DateFormatter() formatter.calendar = calendar formatter.dateFormat = MMM d dateFormatter = formatter // Setup initial week let currentDate = Date() let weekIdentifier = Self.weekIdentifier(for: currentDate, calendar: calendar)