Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

Reply to NSBrowser - edit cell contents
Hi,I can't really provide any code, but what I have is a NSBrowser hooked into CoreData, with the ability to add and remove entities in the hiearchy.I've tried hooking a double click event up to an IBAction (though a single click is what I'm ultimately after), from here I can get a reference to the browser. Then I was attempting to get the selected item in the appropriate column, but on the first column I was getting an empty array back when printing the indexPath. I must be doing something wrong there. I removed the non working code so I can't post here.I have read the docs, but I'm obviously missing something.I have seen that dcandi code before but it doesn't handle editing of file names, by clicking.I'll have another go at the indexpath func, and see if I implemented my logic wrong. If I still don't have any look I'll look to post some of the code here.thanksMark
Topic: UI Frameworks SubTopic: AppKit Tags:
Jan ’20
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
Reply to Can i tracking in app purchases?
Unfortunately Search Ads does not track in-app purchase conversions.The solution that I think would work would be to follow the instructions here: https://searchads.apple.com/advanced/help/measure-results/#attribution-api to firstly track if a user has installed the app through Search Ads. Then what you can do is store this in a table in Firebase for example. This would be your first column and would say whether the app download originated from Search Ads. Then, in a second column (In-App Purchase Made), when a user makes an in-app purchase, you could update this to show True and then using that information you'd be able to see in a table which of your users originated from Search Ads and then which of those went on to buy an in-app purchase.Obviously this isn't an official method and does take a bit of work but if it is a requirement, I see this as the only solution. Shame Apple doesn't support it officially.
Topic: App & System Services SubTopic: General Tags:
Aug ’18
Reply to Swift Packages + Dependencies + SwiftUI = Fail to Preview
Update: Relevant snip of the view: public struct ListOfPosts: View { @State private var posts = [Post]() public var body: some View { return ScrollView { LazyVGrid(columns: columns, spacing: 20) { ForEach(posts, id: .self) { item in NormalView(title: item.title, excert: item.excert, thumbnail: item.thumbnail) } } .padding(.horizontal) } } } struct Posts_Previews: PreviewProvider { static var previews: some View { ListOfPosts(API().getPosts()) } } After updating the Preview, this is the current error message: LoadingError: failed to load library at path (...)/Products/Debug-iphonesimulator/PackageFrameworks/Posts.framework/Posts tReason: image not found) Diagnostic message - https://developer.apple.com/forums/content/attachment/f5608467-8566-4d10-9779-b79f484b5fff
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’20
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 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
Reply to Creating an iPadOS Project
Use the iOS project templates to make an iPadOS app.To limit your app to the iPad, select the project file on the left side of the project window to open the project editor. Select the app target from the project editor. In the Deployment Info section, deselect the iPhone checkbox in the Device column.
Oct ’19
Reply to tableview mousedown
it would be almost good, but I forgot to tell my App is for macOSX, so the table is a NSTableView and I don't see any didSelectRow functionEven if the function exists somewhere, it would not be such a good solution, because the click of the column can be only the first time the row will be selected. After, the corresponding row would be selected and the function will not be called anymore
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’17
Reply to Xcode 8 Playground results not being posted
The issue is solved.First of all, I naturally assumed that the Results column of the Playground window would spring open when there were results to display.It wasn't until I was watching a YouTube video on Swift 3.0 that the answer was presented. The instructor typed some code into the Playground window and then ......... He dragged the Results pane in toward the code and Voila! there were the results.Unbelieveable!
Sep ’16
Reply to NSBrowser - edit cell contents
Well, it would really be easier to read the code than reading paraphrase of it.I can't really provide any code, but what I have is a NSBrowser hooked into CoreData, with the ability to add and remove entities in the hiearchy.Did you kook in code ? If so, please showI've tried hooking a double click event up to an IBAction (though a single click is what I'm ultimately after), from here I can get a reference to the browser.You mean the NSBrowser ?But to get a refernce, it would be easier to declare an IBOutlet. Why not ?Then I was attempting to get the selected item in the appropriate column, Please show codebut on the first column I was getting an empty array back when printing the indexPath. I must be doing something wrong there. Please show code, with the print statementI removed the non working code so I can't post here.Why did you need to remove to post here ?Conclusion: if you still want some help, please help others to help by showing the code.Unless you have already solved the problem.
Topic: UI Frameworks SubTopic: AppKit Tags:
Jan ’20
Reply to Random "duplicate column name" crashes using SwiftData
I had the exact same problem. On the first startup everything is ok, then on the second one it crashes. It seems SwiftData doesn't see the already existing column for one-to-many relationship. This, in turn, crashes the application because of the duplicated column. The solution that I found is to explicitly create the inverse relationship in the second model. So, in your case, changing your DeskPosition model to this: @Model final class DeskPosition { let id: UUID var title: String var desk: Desk? private var heightInCm: Double @Transient var height: DeskHeight { get { DeskHeight(value: heightInCm, unit: .centimeters).localized } set { heightInCm = newValue.converted(to: .centimeters).value } } init(id: UUID, height: DeskHeight, title: String) { self.id = id self.heightInCm = height.converted(to: .centimeters).value self.title = title self.height = height } }
Oct ’23
Reply to Customizing Back Button in Column 2 "Content" in SplitView
You can remove the toggle to show and hide the column with .toolbar(removing: .sidebarToggle) - https://developer.apple.com/documentation/swiftui/view/toolbar(removing:) For the back button, if you're navigating to a detail view, you can use .navigationBarBackButtonHidden() - https://developer.apple.com/documentation/swiftui/view/navigationbarbackbuttonhidden(_:) - on the detail view to hide the back button
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’23
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