ikimagebrowserview

Adding an NSControl to IKImageBrowserCell

吃可爱长大的小学妹 提交于 2020-01-23 01:44:11
问题 I've built a custom IKImageBrowserCell which is displaying my images in an IKImageBrowser without any issues. I'd like to try and override the built in IKImageBrowser delete image functionality. Currently 'out of the box' you can select an image, or multiple images and press BACKSPACE to delete. I'd like to add an NSButton or similar to enable that same functionality on each image. I've added the following code to show a delete icon on the IKImageBrowserCell when it is selected: - (CALayer *)

Telling IKImageBrowserView not to schedule preloading

懵懂的女人 提交于 2020-01-01 06:51:26
问题 For our rewrite of the open-source iMedia framework project (in use currently by dozens of developers), we are switching to IKImageBrowserView, and having a troubling time with caching. It appears that IKImageBrowserView likes to preload/prefetch a cache of images, as a low-priority background task, as many not-yet-visible items that it can. This might be useful, except that we don't want to load the CPU (and network for remotely-retrieved images) if we can help it. Especially since we have

Is it possible to print IKImageBrowserView In Cocoa programmatically?

谁说我不能喝 提交于 2019-12-24 04:06:33
问题 I want to take print of IKImageBrowserView with (content) images. I tried the following code if (code == NSOKButton) { NSPrintInfo *printInfo; NSPrintInfo *sharedInfo; NSPrintOperation *printOp; NSMutableDictionary *printInfoDict; NSMutableDictionary *sharedDict; sharedInfo = [NSPrintInfo sharedPrintInfo]; sharedDict = [sharedInfo dictionary]; printInfoDict = [NSMutableDictionary dictionaryWithDictionary: sharedDict]; [printInfoDict setObject:NSPrintSaveJob forKey:NSPrintJobDisposition];

IKImageBrowserView Thumbnail Problem

点点圈 提交于 2019-12-13 05:06:04
问题 I download IKImageBrowserView sample named "IKImageKit Demo" from Apple official website. But I find a problem. For example: When I import images from folder named "A", then I delete an image. Then I import other image (name as same as the deleted image), the thumbnail in IKImageBrowser will not change. How could I resolve this problem?? Thanks! Video display: http://www.youtube.com/watch?v=f3Jue9wOdUI 回答1: Update: Wow, old post. Looks like the documentation was updated a while after I had

customizing IKImageBrowserView group appearance

☆樱花仙子☆ 提交于 2019-12-04 05:25:07
问题 I am trying to change the appearance of the group header of an IKImageBrowserView. I've seen that we can provide an custom CALayer with IKImageBrowserGroupHeaderLayer but I do not know at all how to use it (how to get the size of the layer, know if the group is selected, ....) Do you have any pointer for this? Thanks 回答1: I have had a go at this today and it appeared reasonably straightforward. It was important to note, however, that it appears to only work with IKImageGroupDisclosureStyle

Telling IKImageBrowserView not to schedule preloading

谁说我不能喝 提交于 2019-12-03 20:53:30
For our rewrite of the open-source iMedia framework project (in use currently by dozens of developers), we are switching to IKImageBrowserView, and having a troubling time with caching. It appears that IKImageBrowserView likes to preload/prefetch a cache of images, as a low-priority background task, as many not-yet-visible items that it can. This might be useful, except that we don't want to load the CPU (and network for remotely-retrieved images) if we can help it. Especially since we have our own FIFO caching mechanism (so we can share our thumbnail data with other views into the same data),

Can IKImageBrowserView display multi-line titles?

让人想犯罪 __ 提交于 2019-12-03 13:50:59
问题 I'd like my IKImageBrowserView to display long titles by wrapping them and displaying them in multiple lines, but I've been unable to achieve this. I've tried changing the size of the titleFrame returned in the ImageBrowserCell subclass and also setting the paragraph style on the title so that it should wrap ( NSLineBreakByWordWrapping ) but I only ever get a single line of text. Has anyone tried this? Any other suggestion I might try? 回答1: Not easily, I'm afraid. One way you can do it is by

customizing IKImageBrowserView group appearance

谁说胖子不能爱 提交于 2019-12-02 03:20:51
I am trying to change the appearance of the group header of an IKImageBrowserView. I've seen that we can provide an custom CALayer with IKImageBrowserGroupHeaderLayer but I do not know at all how to use it (how to get the size of the layer, know if the group is selected, ....) Do you have any pointer for this? Thanks I have had a go at this today and it appeared reasonably straightforward. It was important to note, however, that it appears to only work with IKImageGroupDisclosureStyle groups. This provided a nice pink line along the top of each group. It seems that when the view displays the

How to customize IKImageBrowserView to add a NSButton on each item?

删除回忆录丶 提交于 2019-12-02 01:49:23
问题 I want to customize IKImageBrowserView so that i can add NSButton or other control on cell of IKImageBrowserView. I tried to cutomize IKBrowserViewCell class, but i did not get how and where i add NSbutton, So that it display on IKBrowserViewItem. Here is the code i had tried till now. #import "ImageBrowserView.h" #import "ImageBrowserCell.h" - (IKImageBrowserCell *) newCellForRepresentedItem:(id) cell { return [[ImageBrowserCell alloc] init]; } In cell class - (CALayer *) layerForType:

How to customize IKImageBrowserView to add a NSButton on each item?

独自空忆成欢 提交于 2019-12-02 01:48:44
I want to customize IKImageBrowserView so that i can add NSButton or other control on cell of IKImageBrowserView. I tried to cutomize IKBrowserViewCell class, but i did not get how and where i add NSbutton, So that it display on IKBrowserViewItem. Here is the code i had tried till now. #import "ImageBrowserView.h" #import "ImageBrowserCell.h" - (IKImageBrowserCell *) newCellForRepresentedItem:(id) cell { return [[ImageBrowserCell alloc] init]; } In cell class - (CALayer *) layerForType:(NSString*) type { CGColorRef color; //retrieve some usefull rects NSRect frame = [self frame]; NSRect