How to show file thumbnails? - objective-c

I got a TableView with a list of files in a directory. Now i want to add a colum with the file-thumbnails. How do i do this?

The icon of the file can be obtained by NSWorkspace's iconForFile:, see Apple doc on NSWorkspace.
To get the thumbnail, one uses one of the public function of the client side of QuickLook called QLThumbnailImageCreate, see Apple doc on QuickLook. Note that this is a CoreFoundation-type call, not a Cocoa method. If you're not used to CoreFoundation, read here.

Related

What Framework and Header file contain the constant for kAudioUnitSubType_RemoteIO

I keep seeing samples that use kAudioUnitSubType_RemoteIO for the Apple audio unit api. I am wondering however what framework/header file contains this constant.
The kAudioUnitSubType_RemoteIO file is in the header AUComponent.h. It is in the AudioUnit.framework.
As the comment says, open Xcode and click Help menu in the top bar, select Documentation and API Reference, search kAudioUnitSubType_RemoteIO and you'll see the results.
That's the way to find the sample usage and document for official resource.

QML Component Screen Rendering

Is it possible to capture the screen rendering of a QML Component and save it to an image file? I would like to drive a Component through several different states, and capture its visual appearance for documentation purposes, without having to do screen/window captures.
Yes, you could set up your state transitions to call QWidget::grab then save it to a file through QPixmap.
If you need an example of how to set up your code to call QWidget::grab take a look at this answer: How to take ScreenShot Qt/QML
It's important to replace QPixmap::grabWidget with QWidget::grab because QPixmap::grabWidget is now obsolete. Once you have the QPixmap from QWidget::grab follow the documentation in QPixmap to save to the format you'd like such as jpeg, png, gif.
Here are some links to the documentation to help you out.
QWidget::grab
QPixmap
QPixmap::save
With Qt 5.4 it is now made easier with grabToImage - this method resides on all QQuickItem objects.
EDIT
It's worth mentioning that the item you call grabToImage() on must be a child of a top-level Window item container

Quick Help for user defined function in ios

How to show Quick Help for the methods which we wrote ...?
Like for inbuilt function when we right click on it & Click Quick Help then we get all info about that method like that I want to do for user defined methods so that any one come to know that method takes which parameter and each parameter for which purpose?
For more explanation, see these two images:
Here is a solution for that. Also check apple documentation. You might have to create document set and install it in Xcode.
Edit: Here is another similar post, How do you populate the Xcode 4 "Option+Click" popover?
There is an open source tool called appledoc which helps with this. You can provide your own documentation in the header files and then run the appledoc script which will (depending on your settings) generate the docsets, install them into Xcode, create a HTML for the documentation as well as rss feeds so that changes to the documentation can be published.

How to perform apprequest using native dialogs

We are living confusing times were documentation from the past merges with documentation from the present.
I am trying to make an app request, I have FB SDK 3.1 and iOS6.
I am checking code from the address:
https://developers.facebook.com/docs/howtos/send-requests-using-ios-sdk/
I can not make it work, takes my attention the next paragraph:
In your app delegate import the Facebook.h header file and replace the Facebook framework
"FacebookSDK/FacebookSDK.h" import declaration: #import "Facebook.h"
I don't have Facebook class anymore in my libraries.
Facebook class had to be initialized with app id, delegate, etc... I don't know how it is supposed to work now, specialy having FBSession in place.
My question is, how to make a modern apprequest? And... what is with the documentation?
You can only get the requests dialog with the previous API, it's not available for the current one.
Make sure you follow this step from the docs -
The headers can be found here ~Documents/FacebookSDK/FacebookSDK.framework/Versions/A/DeprecatedHeaders. Drag the whole DeprecatedHeaders folder and deselect the ''Copy items into destination group's folder (if needed)'' option to add the headers as a reference.
Add those headers to your project and you'll have access to the Facebook class.

How can I pass values from obj-C to a quartz composer view?

In a .xib for an application I'm working on, I have a quartz composer viewer object (QCView) in the window. I also have a patch controller (QCPatchController). The patch controller has its own class files in xCode, but they aren't doing anything right now. Following the apple docs, I was able to bind some values within the .nib file so if I edited a text field, it would pass this value to a published input on the QC document. Unfortunately, these docs say nothing about how to pass values programatically. How can I pass values (in code) to a QC patch?
Thanks in advance!
You should be able to use -setValue:forKeyPath:. For example:
[patchController setValue:#"foo" forKeyPath:#"patch.stringinput.value"];