BLACK FRIDAY SALE: Save big on all my Swift books and bundles! >>

About the macOS forum

Forums > macOS

@twostraws  Site AdminHWS+

This forum is for general discussion, questions, and answers about macOS develoment. If you have questions about SwiftUI, you might find it better to ask on the SwiftUI forum instead.

2      

I have a little problem with the project one de "Hacking with MacOS" ; two problems indeed, but i've fixed th first. I have Catalina, and Xcode, and IB in Xcode, does'nt behave as expected. The tableview would'nt display, nothing to do, but with some "print(this), print(that)", i coul verify all was good. It was in IB just a little manip to make not hidden the tableView because the text in cells was'nt justified by default but it is mandatory a justification be marked, hidden text by default.

Now, the image says "I do'nt exist, you can't find me" and don't want to display. Same problem, many print are showing all is good, but nothing in the window ; an idea ?

Sorry for my very bad english ; i read much better i write.

1      

I have fixed my issue with this code for "imageSelected(name)", but I do'nt know why.

func imageSelected(name: String){ var nomen: String let path = Bundle.main.path(forResource: "images", ofType: "bundle")! + "/" nomen = path + name let image = NSImage(byReferencingFile: nomen) imageView.image = image }

1      

Hacking with Swift is sponsored by RevenueCat

SPONSORED In-app subscriptions are a pain to implement, hard to test, and full of edge cases. RevenueCat makes it straightforward and reliable so you can get back to building your app. Oh, and it's free if your app makes less than $10k/mo.

Learn more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.