IKImageBrowserView images won't show in OS X 10.5 - cocoa

The Apple Demo IKImageViewDemo does not seem to work correctly in 10.5.
The control is there, but there are no visible images. The images are there because when you click and drag where an image is supposed to be, the ghost of the image appears and drags.
Is there an alternative to using the IKImageBrowserView for users on Leopard 10.5-10.5.8, or is there an alternative "gallery" style control?
Anything I need to do special in Interface Builder? Any option that needs to be / not be checked?

IKImageBrowserView is available in OSX 10.5 and later:
http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/IKImageBrowserView/IKImageBrowserView_Reference.html
Sample projects that work on OSX 10.5:
http://developer.apple.com/library/mac/#samplecode/ImageBrowser/Introduction/Intro.html
http://developer.apple.com/library/mac/#samplecode/IKImageBrowserViewWithCoreData/Introduction/Intro.html

Related

PDFThumbnailView: Not able to select thumbnails in Sierra for MAC OSx App

I am using PDFKit. Please refer here
PDFThumbnailView does not allow to drag or select the thumbnail after I have updated my Mac OS x to Sierra.
Have already set
[_pdfThumbnailView setPDFView:_pdfView];
and _pdfThumbnailView outlet from xib too.
If works well for previous OS x version.
Any help will be appreciated.
Thanks!!
Apple really screwed PDFKit in MacOS 10.12, among the many other bugs in it, PDFThumbnailView is unusable for the most part, it doesn't do anything except displaying a list of pdf pages (with glitches).
I've spent much time into this but I couldn't find any workaround. I'm afraid your options are either waiting for Apple to fix this (hopefully) or rolling out your own thumbnail view replacement.
Creating your own thumbnail view shouldn't be overly complicated. I'd use NSCollectionView and render the thumbnails into its grid. Then wire all the selection and drag and drop with the PDFView. I'm planning to do exactly this if Apple doesn't fix PDFThumbnailView anytime soon.
(ps: there is a nice tutorial on NSCollectionView on raywenderlich.com )

Blank NSComboBox on OS X Yosemite

I have a set of NSComboBox elements shown within the toolbar of an NSPanel, all created with XCode/Interface Builder. When I click on them on Yosemite, all I can see is a black box where the combo box items should be. On earlier versions of OS X this works just fine. No exceptions are logged at all. Here's a screen capture:
Any idea of what could be broken? I can't see any relevant release notes from Apple.
Bypassed this by using a NSPopup instead.

NSSegmentedControl image behavior different on snow leopard and lion

Why do images placed in NSSegmentedControls on snow leopard appear in a different position from that of Lion?
Lion:
Snow Leopard:
They are textured square buttons with the EXACT same png files.
EDIT: I need a work around for this. The images are 19x19 (recommended by the HIG)
Any ideas?
Lion introduced some changes in the Aqua framework and the UI and this is part of it.
Why not create a duplicate with a couple empty pixels to the top of your image files and do a version check in code?
The answer turned out to be subclassing NSSegmentedCell and hooking into the method that draws the images. It's a rather manual process, but does the trick.

Which controls to use for a Mac OS X application?

I developed some app for iPhone/iPad, so I know the basic concepts of Cocoa programming. Now I need to write a Mac OS X application. If you help me to choose the right controls to use, I'll study the Apple documentation reference for them.
I need:
a control to show a grid of thumbnails (png images); I'll be able to change the order of the thumbnails by dragging and dropping them;
a control to show a single image (e.g. UIImageView of Cocoa Touch) with the possibility to drag and drop another image over the first one; besides I need to move and resize the second image by dragging its corners (as if corners were "anchors");
a control to browse the media files on the Mac (possibly iPhoto images, iTunes DRM-free songs, or simply the content of a given folder), like the media browser of iMovie.
I use Xcode 4.2.
You can use NSCollectionView and co. for this. Xcode has a sample application somewhere in documentation (browsing various images) as well as tutorial on how to setup NSCollectionView yourself.
Check NSImageView. You can basically find any Cocoa control alternative to Cocoa Touch just by changing UI prefix to NS.
There is no such control per-se (unless IKImageBrowser for backgrounds), but using aforementioned NSCollectionView and some API for media files you should get around pretty quickly.
Also check ImageKit framework for images (for browsing, viewing and modifying).

#2x images do not display in XCode4 interface builder designer

I'm trying to design a xib using XCode4, but when I put down an image view that displays an #2x image xcode doesn't preview it correctly (it displays a missing image icon).
It works correctly when the app is run though.
As an example: I add a UIImageView to my view and set the image property to test.png.
In my project I add a file named test#2x.png.
In XCode 3.2 this image would have correctly displayed in IB, and the #2x version would have automatically half-sized on non-retina devices.
However in IB in XCode4 the image does not display.
Is anyone else experiencing this? If they are, it's a pretty massive issue.
Why not just add both images? AFAIK UIImage isn’t guaranteed to work like that.
I always use both sizes, having the #2x ones first, and unretining them using the free app unretiner from app store, and drop both sizes to the project. When referring to an image, instead of writing test.png or test#2x.png, I write test and xCode finds sizes to the corresponding devices, but YES! in IB, the image won't be displayed in this way, just a question marked blue screen; but that works fine when running the app.

Resources