Search results for

column

2,061 results found

Post

Replies

Boosts

Views

Activity

Reply to macos menu bar color picker not working properly
First of all, thank you for your response. Since I have just started with SwiftUI, please don't mind my beginner mistakes regarding the color selection. I have shared all my codes import SwiftUI import AppKit struct RenkSecimi: View { @Binding var renk1: Color @Binding var renk2: Color @ObservedObject var short : TimerModel @State private var renkGoster = false var body: some View { Form { VStack(alignment: .center, spacing: 20) { HStack(alignment: .center) { ColorPicker(Color 1,selection: $renk2) .padding() .background(.gray) .clipShape(RoundedRectangle(cornerRadius: 10)) .shadow(radius: 2) .onTapGesture { renkGoster.toggle() } ColorPicker(Color 2, selection: $renk1) .padding() .background(.gray) .clipShape(RoundedRectangle(cornerRadius: 10)) .shadow(radius: 2) .onTapGesture { renkGoster.toggle() } } VStack(spacing: 10){ Picker(Short Break, selection: $short.shortBreakDuration) { ForEach(5...11, id: .self) { i in Text((i) Dk).tag(i * 60) } .onChange(of: short.shortBreakDuration) { oldValue, newValue in short
Oct ’24
How can I get a tab-bar styled ornament on the trailing edge of a view controller?
I've got a UIKit app with a collapsible trailing-edge child view controller, implemented sort of like UISplitViewController but it's got a bunch of custom behavior - moving to the bottom edge in portrait orientation, etc. It exposes a couple of different app functions via a UITabBar on the bottom edge on iOS. When I run the app on visionOS, that tab bar transforms to a leading-edge ornament. This would be great, but that means it tries to overlap the trailing-edge content of its parent view controller, which isn't ideal. Is there a way to get the tab bar to lay out on the trailling edge of the child view controller? Or can I create a custom ornament that has the same auto-expand behavior as the tab bar, where it shows a vertical column of icons that expands to show titles when you're gazing at it?
1
0
484
Oct ’24
Text-shadow + column-count adds unexpected whitespace at beginning of second column
Howdy! On Safari, when using the column-count CSS property to split text into multiple columns, I've noticed that when applying a text-shadow, there is an unexpected whitespace created above all subsequent columns. I've put together a codepen demonstrating the issue and its reproducibility on Safari (using latest as of this posting: Version 17.6 (19618.3.11.11.5)) Codepen: https://codepen.io/cubepresser/pen/ExqvzjL Expected behavior: Actual: I tested this on the latest versions of Chrome, Firefox and Edge. This bug does not occur. Expected behavior is that there should not be an extra line added to the beginning of the second column, third column, etc. Here's some code if that codepen link doesn't work: HTML: 0000000000111111111122222222223333333333 CSS: #example { font-family: monospace; max-width: 20ch; column-count: 2; column-gap: 0; word-break: break-all; line-break: anywhere; text-shadow: 0 0 4px black; }
1
0
765
Oct ’24
Reply to text context with column-count value is 2 and text-shadow' blur is greater then 0, the second column will be bring down
Howdy! This bug still occurs on Safari. I've put together a codepen demonstrating the issue and its reproducibility on Safari (using latest as of this posting: Version 17.6 (19618.3.11.11.5)) Codepen: https://codepen.io/cubepresser/pen/ExqvzjL I tested this on the latest versions of Chrome, Firefox and Edge. This bug does not occur. Expected behavior is that there should not be an extra line added to the beginning of the second column, third column, etc. Here's some code if that codepen link doesn't work: HTML: 0000000000111111111122222222223333333333 CSS: #example { font-family: monospace; max-width: 20ch; column-count: 2; column-gap: 0; word-break: break-all; line-break: anywhere; text-shadow: 0 0 4px black; }
Topic: Safari & Web SubTopic: General Tags:
Oct ’24
text context with column-count value is 2 and text-shadow' blur is greater then 0, the second column will be bring down
HelloI have a problem when I use text-shadow and coumnt-count style on a span element,When I set text-shadow' blur value greater then 0 and column-count greater then 1, then you will see the second column ( also the third column) will bring down some distance, but it's not happen on Windows Chrome, Mac Chrome, etc, It's looks like only safari has this bug.Following is a online demo of this bug:link: http://jsrun.net/arfKp/editI'm looking forword for any response of this.ThanksYulong
2
0
594
Jun ’20
Reply to How SwiftUI Table sorting work with multiple KeyPathComparator ?
@cp-divyesh-v I would recommend you review Building a Great Mac App with SwiftUI sample code. It has an example that walks you through how you should create sortable columns. However here's an example : struct Plant: Identifiable { var id = UUID() var variety: String var daysToMaturity: Int var datePlanted: Date var harvestDate: Date var lastWateredOn: Date var favorite: Bool } @Observable class DetailManager { var sortOrder: [KeyPathComparator] = [ .init(.daysToMaturity, order: SortOrder.reverse), .init(.variety, order: SortOrder.reverse) ] var data = [ Plant(variety: Tomato, daysToMaturity: 80, datePlanted: Date(), harvestDate: Date(), lastWateredOn: Date(), favorite: true), Plant(variety: Carrot, daysToMaturity: 60, datePlanted: Date(), harvestDate: Date(), lastWateredOn: Date(), favorite: false), Plant(variety: Pepper, daysToMaturity: 90, datePlanted: Date(), harvestDate: Date(), lastWateredOn: Date(), favorite: false) ] var plants: [Plant] { data.sorted(using: sortOrder) } } struct GardenDetailT
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to NavigationSplitView does not properly show detail pages on macOS 15
This was release noted here: https://developer.apple.com/documentation/macos-release-notes/macos-15-release-notes (Search 127626852) Behavior was changed because the composition is undefined on iOS and was undefined on macOS, but happened to work in some cases. This change was made behind a link check, so hopefully you are only seeing this when compiling against the newest Sequoia toolchains. View-destination links (e.g. NavigationLinks that take a View as their destination) and value-destination links (e.g. NavigationLinks that take a value argument) cannot be mixed. By attaching an id to the link, you are wiring the link up to the Lists selection, and thus trying to drive navigation that way. The correct way to do this in releases including and prior to iOS 15 and macOS 18 is by switching over the selection in the NavigationSplitView's subsequent column: NavigationSplitView { List(selection: $selection) { NavigationLink(Value-destination link, value: 5) } } detail: { if let selection { SelectedDest
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to How to permanently delete Sonoma aerial wallpapers?
I want the wallpapers gone because I dislike them greatly. I have dozens of much higher quality (as wallpapers go) because they are simple and non-distracting, non-entertainment. I've been struggling to get rid of them for a long time. Additionally, the Sonoma wallpaper system is broken in many ways. The worst is that it keeps putting back that default wallpaper of some vineyard somewhere. I think I finally found an answer, although it is terribly kludgy. WARNINGS BEFORE YOU START THIS, BE AWARE OF THESE THINGS; READ THEM ALL If all you want is to delete the downloaded live wallpapers to save space THIS IS NOT THE WAY. Go find other posts for that. If you want to be rid of the downloaded wallpapers AND stupid selection thumbnails for all those stupid wallpapers, then find a different post for deleting, AND do the steps below. The Sonoma wallpaper selection pane (in Settings) might not work. Ever. Sometimes it does. Because of the above, if you can, set some wallpapers that you do like (wallpapers of your own
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’24
Reply to iOS 18 NavigationSplitView in NavigationStack not loading properly
@vladimirs NavigationSplitView is a top level navigation container and it's meant to be used without being wrapped in another navigation container. You can embed a NavigationStack in a column of a NavigationSplitView not the other way around since a navigation split view collapses into a single stack on iPhone. If you'd like to learn more about navigation structures, you could review The SwiftUI cookbook for navigation WWDC session Could you elaborate on why you have the NavigationSplitView inside stack and what you're trying to achieve ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
ShareLink not reliable, entitlement errors
I am using public struct ShareLink : View where Data : RandomAccessCollection, PreviewImage : Transferable, PreviewIcon : Transferable, Label : View, Data.Element : Transferable {} And it is generating entitlement errors and not working reliably ( will transfer 1-3 items, but not 4+ ; will not work a second time) Error is: Error acquiring assertion: Received port for identifier response: <> with error:Error Domain=RBSServiceErrorDomain Code=1 Client not entitled UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <> with error:Error Domain=RBSServiceErrorDomain Code=1 Client not entitled UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <> with er
6
0
7.5k
Sep ’24
Reply to NavigationSplitView hide sidebar toggle button
Although Apple introduced .toolbar(removing: .sidebarToggle) finally, users can still drag the divider to change the column width and hide the side bar on macOS, and since sidebar toggle button is removed, users could never get back. In Sonoma Xcode15, developers have to use something like this: .introspect(.navigationSplitView, on: .macOS(.v13,.v14,.v15)) { splitview in if let delegate = splitview.delegate as? NSSplitViewController { delegate.splitViewItems.first?.canCollapse = false } } But it fails to work on Sequoia with Xcode16. Developers have to search around again to make it work just like the built-in Settings App, it's a shame.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
Reply to Custom struct Codable for SwiftData
Ditto here. All the other advice on the subject of struct-typed model attributes asserts the struct must be Codable and it stored in a single column. The evidence shows the struct's properties are stored as individual columns, spreading the structure out and using some truly unexpected Encoder/Decoder that's not JSON. For instance, I defined struct ComplexNumber: Codable { var real: Double var imaginary: Double } and @Model final class Item { var timestamp: Date var number1: ComplexNumber var number2: ComplexNumber and got this in SQLite: This works fine when fetching the records, but in my app it fails to decode when some of the struct's properties are Optional. I can write decoder() to deal with the optionals, but apparently SwiftData's Decoder can't cope. I suppose there's some similar limitation for Dictionary properties.
Sep ’24
How do I access TestFlight feedback?
Hi allI have put my first app on TestFlight for beta testing and have approximately 20 testers who have joined anonymously. When I look at the All Testers page I can see that several of them have submitted feedback ( there is a number in the feedback column), however I have not received any of this email.I have had some peope who are known to me try sending feedback via the Send Beta Feedback button in TestFlight and these emails are coming through to me fine so I think my email is configured ok. I seem to be missing something very basic here - I was wondering if someone could tell me how I can access the feedback related to the number shown in the feedback column on the All Testers page? Is this an iOS 13 functionality??Many thanks and best wishes
26
0
20k
Oct ’22
How can I make NSToolbar on Catalyst check canPerformAction on UISplitViewController's secondary view controller instead of primary?
I have a Catalyst app that I'm adding a sidebar to via UISplitViewController. I have a toolbar on the window with buttons that I want to be enabled or disabled based on the state of the view controller in the split view's secondary column. But it seems to want to check the primary view controller instead. In the Catalyst tutorial Adding a Toolbar, this exact approach is demonstrated. The RecipeDetailViewController has methods for toggleFavorite and editRecipe, and the toolbar items are set up to reference those selectors in the ToolbarDelegate class. In the screenshots in the tutorial, the buttons are shown as enabled based on RecipeDetailViewController.canPerformAction. But when I download and run the complete project on my computer (macOS 14.4.1), the toolbar items are disabled. And if I add the methods to the RecipeListViewController (which is in the primary column of the UISplitViewController, the toolbar items get enabled. Is there a way to make the system ask the correct split view column
1
0
711
Sep ’24
Reply to Cannot enable Network Extensions - Objective-C
[quote='763281021, aynas, /thread/763281, /profile/aynas'] I wanted to get my hands dirty with objective-c [/quote] You have chosen a very difficult task for My First Objective-C Project™ (-: Specifically… [quote='763281021, aynas, /thread/763281, /profile/aynas'] I created a simple command line project with xcode and tried to load this extension [/quote] That’s not supported. In general, only the NE provider’s container app can configure the NE provider. [quote='763281021, aynas, /thread/763281, /profile/aynas'] I don't have a developer license yet [/quote] That’s a showstopper. If you’re using a Personal Team — aka free provisioning — you can only use a limited set of capabilities. See the Apple Developer column in Developer Account Help > Reference > Supported capabilities (macOS). Notably, Network Extension is not on that list. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Sep ’24