Search results for

column

2,061 results found

Post

Replies

Boosts

Views

Activity

Trouble with new XCode 15 Preview Macro for Widgets
I'm trying to get rid of the auto-padding added recently by iOS 17, and I found out that you can use the WidgetConfigurations properly with the new Preview Macro, but I'm having trouble getting it to work, and some help would be much appreciated. Here's my code: struct ChartEntry: TimelineEntry { let date: Date let configuration: ConfigurationIntent ... static func getSampleEntry() -> ChartEntry { let sample = ChartEntry(date: Date(), configuration: WidgetUtils.getSampleConfiguration()) return sample } } struct PreviewTimelineProvider: TimelineProvider { typealias Entry = ChartEntry func placeholder(in context: Context) -> ChartEntry { ChartEntry.getSampleEntry() } func getSnapshot(in context: Context, completion: @escaping (ChartEntry) -> Void) { completion(ChartEntry.getSampleEntry()) } func getTimeline(in context: Context, completion: @escaping (Timeline) -> Void) { var entries: [ChartEntry] = [] let currentDate = Date() for hourOffset in 0 ..< 5 { let entryDate = Calendar.current.date(byAdd
2
0
2.5k
Sep ’23
Installing PyQt5 on `arm64` stopped working all of a sudden (some `sip` issue)
Hey everyone, I have an Python script that uses PyQt5. Unfortunately there is no wheel for pyqt5 to install it with pip so you have to build from source, if you are on arm64. This is how I successfully did it till today: It requires qmake, which I installed via brew (brew install qt5). After adding this to my path I can execute it (which qmake shows the correct path). Then I install pyqt5 via pip with this command: pip install pyqt5 --config-settings --confirm-license= --verbose (pyqt5 asks for license agreement, but pip install is not interactive, hence the long command). As I said, till last week I could do this successfully. When I tried this today I got the error: The dbus-python package does not seem to be installed. These bindings will be built: Qt, pylupdate, pyrcc. Generating the Qt bindings... Generating the pylupdate bindings... _in_process.py: /private/var/folders/ws/vdb_nvyj35g9ck_srpvqpccm0000gn/T/pip-install-jr3725ba/pyqt5_7d0f0bcc5a7241bd8afa726e0fa5e8d1/sip/QtCore/qprocess.sip: line 99: column
5
0
3.4k
Sep ’23
NavigationSplitView and Lists in Child views
I'm trying to make a three column Split View where the sidebar determines the type of content, so I was hoping to have separate views drive the Lists for each content type, but I'm getting an issue where the selections get out of sync / don't highlight. For simplicity, I tested using a sidebar/detail Split View, as follows: struct StringItem : Identifiable, Hashable { let id = UUID() let item : String } struct SimpleSplitView: View { @State private var selString : StringItem? let content = [StringItem(item: Here), StringItem(item: There), StringItem(item: Everywhere) ] var body: some View { NavigationSplitView { // This List(content, selection: $selString) { c in NavigationLink(value: c) { Text(c.item) } } // or this ContentStringX(selection: $selString) } detail: { if let s = selString { DetailStringX(item: s) } else { Text(Empty) } } } } struct ContentStringX: View { let content = [StringItem(item: Here), StringItem(item: There), StringItem(item: Everywhere) ] @Binding var selection : StringItem? v
3
0
791
Sep ’23
Reply to Error when loading (some) Audio Units on macOS 12
Looks like you’re making great progress here. but I have no prove that this version is sandboxed There are two ways to do that: Run the app, run Activity Monitor, find the app in the process list, and check the Sandbox column. You might need to control click on the list headers to enable that column. Check for the entitlement with codesign. I don’t have Logic installed, but here’s an example with GarageBand: % codesign -d --entitlements - /Applications/GarageBand.app … [Dict] … [Key] com.apple.security.app-sandbox [Value] [Bool] true … Having said that, working with GarageBand seems like the acid test to me. If an audio unit fails there, it’s worth reporting that as a bug against the audio unit. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Code Signing SubTopic: Entitlements Tags:
Sep ’23
Reply to Custom Initializer Binding Problems
@Claude31 thank you for taking time to help me out, I really appreciate it. You're absolutely right, my code was much more complicated than it needed to be; having the columns in the original view makes much more sense. I'm new to coding, so sorry for the confusing and messy code haha. Thanks again for the help!
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’23
Reply to ToolbarItem has a bug in XCode 15 beta 8.
Please file a bug report at https://feedbackassistant.apple.com with this and post the feedback number here! In the meantime, try using a NavigationStack in the detail column. For example: } detail: { NavigationStack { ZStack { Text(Select : (selection ?? -1)) } .toolbar { ToolbarItem(placement: .topBarTrailing){ Button { } label: { Text(ToolbarItem) } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’23
Custom Initializer Binding Problems
I'm trying to add sodas from ListView to ContentView and have that data passed on and update the view in AisleView. I'm having a lot of trouble getting my columnOne and columnTwo properties to update the AisleView correctly. I know the data is being passed to AisleView, but it isn't updating the actual view. I believe the issue is when I'm trying to initialize my columns. Any help would be appreciated. Thank you! class Inventory { var inventory: [Product] = [ Product(name: Coke, price: 2.99, aisle: 1, location: 10), Product(name: Pepsi, price: 3.99, aisle: 1, location: 6), Product(name: Dr. Pepper, price: 1.99, aisle: 2, location: 8), Product(name: Pibb, price: 1.50, aisle: 2, location: 1) ] } struct ListView: View { @State var base = Inventory() @State var sodas: [Product] = [] var body: some View { VStack { ContentView(sodas: $sodas) List { ForEach(base.inventory) { product in HStack { Text(product.name) Spacer() Text((product.price, specifier: %.2f)) Button { sodas.append(product) } label: { Image
5
0
582
Sep ’23
Reply to Xcode add header search path
The best way in Xcode to do this is: (using your example) Open Preferences Click Locations then the Custom Paths tab Click the + sign at the bottom left enter gst as the Name (no quotes) enter GST Headers as the Display Name (no quotes) enter the path name* to your gst folder as the Path In the Finder, right-click / option click / two-finger click the GST folder, then hold the option and you will see Copy change to Copy GST as Pathname. Do that and use paste it in for step 6 Ok no you have the first part. You created an Xcode system variable. The next part is to reference the Xcode variable in your project build settings by: Open the project Click on the folder button under the window close button Click on the blue project button/icon under the folder button In the column that appears to the right, click on another blue project button/icon In the row of tabs/buttons slightly higher and to the right, click on the Build Settings button/tab in the Filter text entry slightly lower than the tabs to the fa
Sep ’23
argsort stable flag not respected
For a tensorflow layer I need a multi column argsort. So I implemented the following function: import tensorflow as tf def multi_column_argsort(tensor, columns_order): sorted_indices = tf.range(start=0, limit=tf.shape(tensor)[0], dtype=tf.int32) for col in reversed(columns_order): col_vals = tf.gather(tensor[:, col], sorted_indices) col_argsort = tf.argsort(col_vals, stable=True) print(Column:, col) print(Column Values:, col_vals.numpy()) print(Col Argsort:, col_argsort.numpy()) print(Sorted Indices Before:, sorted_indices.numpy()) sorted_indices = tf.gather(sorted_indices, col_argsort) print(Sorted Indices After:, sorted_indices.numpy()) print(---) return sorted_indices After debugging this function for a while I found out that it was not sorting the 3 columns as expected because the argsort were not stable i.e. did not respect the previous sorting. To test this I used the following example: points = tf.constant([[1.1, 2.0, 0.1], [1.1, 1.0, 0.2], [2.2, 1.0, 0.1], [1.1, 2.0
0
0
427
Aug ’23
Query encountered an error: SwiftData.SwiftDataError(_error: SwiftData.SwiftDataError._Error.unsupportedPredicate) swiftdata
I am working on a SwiftData app, and when I query any of the ones with the Predicate (NOT Predicate) I get Query encountered an error: SwiftData.SwiftDataError(_error: SwiftData.SwiftDataError._Error.unsupportedPredicate). The code for my file is below. import SwiftData import SwiftUI struct timeListView: View { @Environment(.modelContext) var modelContext @Query(sort: Time.date, order: .reverse) var times: [Time] @Query(filter: #Predicate { time in time.unfortime! < 6000 }, sort: Time.date, order: .reverse) var timesSub60: [Time] @Query(filter: #Predicate { time in time.unfortime! < 3000 }, sort: Time.date, order: .reverse) var timesSub30: [Time] @Query(filter: #Predicate { time in time.unfortime! < 2000 }, sort: Time.date, order: .reverse) var timesSub20: [Time] @Query(filter: #Predicate { time in time.unfortime! < 1000 }, sort: Time.date, order: .reverse) var timesSub10: [Time] @Query(filter: #Predicate { time in time.unfortime! < 500 }, sort: .date, order: .reverse) var timesSub5: [Time] @Q
0
0
999
Aug ’23
Reply to TestFlight testers status is blank
Yesterday, half of my testers showed status of - and had lost the count of sessions. Now, that External Testers group has completely disappeared. In fact there is no longer an External Testers section in the left column of the screen. However I do have All Testers under General Information where I can see everyone, with the correct status and number of sessions etc. Possibly related: initially I didn't have External Testers. A random stack-overflow post told me that External Testers only appears once you have created an Internal Testers group. So I created an empty internal testers group, then created an external testers group, then removed the internal group. I reported this as bug FB12769342, but Apple say it is the intended behaviour (*). That was all about three weeks ago. It was OK until today; now I can't see External Testers again. Maybe I shouldn't have deleted the empty internal testers group. Do others whose status is showing - find that the correct info is shown in All Testers? (*) I'm a o
Aug ’23