Extract image resources from Mac's builtin applications - xcode

Just an example, Apple's Mail, Notes and Messages use the same image for their "Edit" button. However, I cannot find that image in any of the resources folder in their app bundles. I guess the image might be in a system folder that is used by these applications. There are many "common used images" like this one that are not in Xcode's media library. Since they are already familiar to the users, it makes sense to use the same image set in my own app.
My question is, where can I find those images? A side question, is it legal to use them?

Related

Where do thumbnail pictures come from on Mac?

As the picture shows above, when we use Pages, and open several pages, then on the "Show Recents" menu from the app icon on the dock, you can see the thumbnail. I designed my own app, which when I register a customised suffix file into the recent files, then my thumbnail will be like this.
How to make it more native like Pages?
I just want to get that static picture.
Implement a Quick Look generator. That's a loadable code bundle that various OS components use to get thumbnails and previews for custom document types.

Sharing images between iOS8 containing app and Custom Keyboard

What is the best way to send images between the containing app and a custom keyboard?
is there a best practice that apple talk about?
is there a hacky way that apple will hate?
is there a framework already that somebody built in github that helps this?
thanks!
You can save images in NSUserDefaults, see Save images in NSUserDefaults? . And since you have access to NSUserDefaults from the keyboard and the app, it works. See my answer in Can a custom keyboard extension identify a user of my companion application in any way? .
Note that in order to enable the sharing of a defaults container you have to follow Apple's docs in the App Extensions programming guide.
It's a very simple and effective solution, but I would only recommend it for a few very small images like icons, etc... Don't make NSUserDefaults a repository for your camera photos!
If you want to do more complex data sharing, I would contend that a custom keyboard is probably not the correct structure.

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).

How to make or use a standard Image Viewer for WP7

I want to make an app that shows pictures. But I want to be able to zoom in and out with gestures. I fixed this by including a toolkit into my project. But my actual question is, can I use or is there a control that's already created for me to show pictures like the picture library of the WP7 phone itself. I thought there wasn't but the Facebook app has a similar way of showing the pictures. Did Facebook rewrite the whole thing or is there a control somewhere that someone made?
The SlideView control in Telerik's RadControls for Windows Phone sounds like what you're looking for.
Have you tried a MultiScaleImage control? It's designed to work with multiple layers, but if you only specify one layer, it might suit what you're trying to do.

Is it possible to add custom Data Detectors to OSX Cocoa applications? (such as Mail.app / Safari)

As the title suggests...
Is it possible to add custom Data Detectors to Cocoa apps?
If so, a gentle nudge in the right direction would be great.
Note: To be clear. I want to add new detectors to currents apps. I am not writing a new app.
Thankyou
W
It's not even possible to build a custom data detector on anything but iOS 4. NSDataDetector is only available on iOS 4 and above.
If they existed on OS X and were a plug-in class like Spotlight importers, that'd be a nice feature. Perhaps filing a request at bugreport.apple.com would help it along?
Later update
I think the reason this hasn't been opened up with an API is because they're only meant to find common data (contact info, dates, URLs) for which there is only one (or just a few) uses. That is, contact info can be stored or used in "the" system-designated app. URLs can be auto-highlighted so they're linkable (clicks invoke the system-designated handler - Safari, an app registered to a protocol, etc.). But there's only one direction to funnel those actions and the endpoint is always a major "convenience app" meant to manage this common information (contacts, calendar, browser, email app, phone app...)
On the other hand, consider app-specific information. Data formatted a certain way for use with one app or platform might mean something else entirely to another application. In fact, this is rather common. So what happens when a string like %%SOMESTRING%% is detected? To one app, it might be a placeholder token. To another, it might be a user name. To another still, it might be interpreted as %%USERNAME followed by %%. Suddenly the simple system-wide UI for handling basic data types has to account for multiple actions and/or multiple "data detector plugins" claiming all or part of a format.
I'm not sure we'll ever see custom data detector APIs on iOS or Mac for this reason alone.
While custom data detectors aren't available at the OS level, there is a mechanism that will get you almost there. One possibility is to create a Workflow in Automator and save it in the Services menu.
It can be configured to be active when text is highlighted. You'd either go to the current app's main menu and select the Workflow under "Services", or else right click on the text and go to the "Services" menu from there. Not as easy as clicking on the text as you would a URL, but pretty close.
Create a workflow in Automator on Mac

Resources