iphoto

How to access Media section (Photo & Movies) directly from NSOpenPanel in Mac OS X application?

拈花ヽ惹草 提交于 2019-12-12 05:38:59
问题 I already refered this link iMedia Now i am using NSOpenPanel to open iPhoto library folder. Here is the code which allow to open. int i = 0; NSOpenPanel* openDlg = [NSOpenPanel openPanel]; [openDlg setCanChooseFiles:YES]; [openDlg setAllowedFileTypes:[NSArray arrayWithObjects:@"public.image",@"public.video",nil]]; [openDlg setAllowsMultipleSelection:TRUE]; [openDlg setAllowsOtherFileTypes:NO]; if ( [openDlg runModal] == NSOKButton ) { NSArray *files = [openDlg URLs]; for( i = 0; i < [files

XPC error when using MLMediaLibrary from command line daemon

╄→尐↘猪︶ㄣ 提交于 2019-12-09 13:03:06
问题 I'm writing a command-line daemon to read images from iPhoto. I can init and load an MLMediaLibrary fine from a full-blown Cocoa application, created using the Xcode project creation tools. However, when I try and do the same from a command-line tool (also created in Xcode), the following error appears in Xcode console window: MLMediaLibrary error obtaining remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application." How can I access

XPC error when using MLMediaLibrary from command line daemon

柔情痞子 提交于 2019-12-03 15:24:16
I'm writing a command-line daemon to read images from iPhoto. I can init and load an MLMediaLibrary fine from a full-blown Cocoa application, created using the Xcode project creation tools. However, when I try and do the same from a command-line tool (also created in Xcode), the following error appears in Xcode console window: MLMediaLibrary error obtaining remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "Couldn’t communicate with a helper application." How can I access MLMediaLibrary from a command-line tool? In order to access MLMediaLibrary your application has to be

NSCollectionView with sections - like in iPhoto

血红的双手。 提交于 2019-11-30 13:20:58
问题 I'd like to build a NSCollectionView similar to the one in iPhoto '11. I want to group several pictures in section, and create a section header as well. The section header of a specific section is always visible until the last element of that section is visible. You can take a look at the picture to see what I mean. EDIT: I should add that the contents are not images. Thanks in advance 回答1: You're probably going to have to look at using CALayers directly. NSCollectionView gets most of its