Is there a UIImagePicker for the Mac Desktop - cocoa

I have found Apple's example app ImagePicker that uses IKImagePicker, but it appears that in Lion it has been removed. Is there an alternative to this - or how would I prompt users to select an image to use within my app.

You want IKPictureTaker.
The IKPictureTaker class represents a panel that allows users to choose images by browsing the file system. The picture taker panel provides an Open Recent menu, supports image cropping, and supports taking snapshots from an iSight or other digital camera.

Related

No option for Landscape in iPhone Launch Images

Is landscape splash screen supported in iPhone? I don't see the option like I do with iPad, as such:
That's Visual Studio?
Because I am able to see the iPhone Landscape option in Xamarin Studio.
Try switching on and off the "Assets Catalog" dropdown to see if that helps.
Also if that doesn't work you could change at anytime from Launch image to Launch screen and there you can configure your Storyboard for all different sizes and orientations.
Note: will check later in VS.
You could add them to your assets. I don't think image assets are rendered properly in VS. It doesn't show specialized image for iPhone, iPad, watch etc. Only the generic one.
Another thing you might want to consider is using launch story board and not launch images. That's the new way of doing it or the suggested way by Apple. You have far more control on it.
Customizing launch images - Manual approach
Open LaunchImage.launchimage and change the default launch images with your own using the proper resolution for each image (e.g., Default-568h#2x.png should be 640px x 1136px). If your images have different file names then open Contents.json and change the key filename for each image.
Xcode WYSIWYG approach
Drag and drop your Assets.xcassets into Xcode (7.1 or newer version). In the opened window choose LaunchImage and add the proper image for each iOS version and device. Close Xcode and rebuild your Xamarin app to use the new launch images.
Further info : Human guidelines reference

How to make preferences menu item in the menu to display user preferences in os-x application? [duplicate]

I would like to create a preferences window like in the standard Mac OS X apps (Safari etc.). I have found resources like DBPrefsWindowController from back in 2008 that matches the Apple HIG.
Just wondering if there is a new way to accomplish this? I can't locate any standard windows in Interface Builder so I assume Apple doesn't provide those, nor can I locate a official Apple sample code for providing this standard UI.
Thank you
It seems DBPrefsWindowController is no longer available.
For now, I would recommend the up to date RHPreferences framework.
Available on GitHub. BSD Licensed.
It’s a simple and easy Preferences window controller with multiple tabs for your next Mac application.
It also provides:
Auto resizing between different sized tab views (With animation)
Custom NSToolbarItem support
Persistence of the last used tab
Support for placeholder NSToolbarItems (eg NSToolbarFlexibleSpaceItemIdentifier & NSToolbarShowFontsItemIdentifier)

How to test what a webpage/web app will look like with Firefox on a specific screen resolution

I have the task of testing a web application where it is given that this app should fit a screen with the resolution of 1280*1024.
My work monitor is, however, a 20 inch screen with resolution 1680*1050.
Will resizing the Firefox window to 1280*1024 meet the test criteria or should I always change the resolution of my monitor? (Obviously, the second option is not preferred).
And also: Is there a Firefox plugin which will help me to set the window size appropriately?
Sometimes asking the question out loud helps to realise what you really want :)
There is Firefox addon called More Display Resolutions which helps to show the page in given resolution, even in 1280*1024
After you install it, just go to Tools -> Web Developer- > Responsive Design View and here you can turn on the preffered resolution:
Ok, the above died. What now?
Since time of writing this answer I changed jobs and do not have to test specific resolutions. But I did quick google search and this site seems to be working: http://quirktools.com/screenfly/
Responsive Design Mode is a stock part of Firefox which is available from the Menu Bar: Tools -> Web Developer -> Responsive Design View in all Firefox versions (keyboard shortcut: Ctrl + Shift + M, (or Cmd + Opt + M on OS X)). No extension is needed to access this mode.
Within Responsive Design Mode, you can set the exact display area used for the webpage. There are several preset dimensions. Alternately, custom display dimensions can be used by either directly typing the dimensions in, or dragging the display to the size desired. What is being set is the pixel dimensions used for the area containing the display of the webpage.
These dimensions are not the same as setting the pixel dimensions used for the entire screen, which would include the Firefox user interface. If you set it to the dimensions of a specific physical display size it is the same as would be displayed using Full Screen mode (on desktop versions, keyboard shortcut F11). If you want to see what your page will look like including the Firefox user interface, you will need to determine how many pixels the user interface consumes at the screen resolution you are interested in and on the platform you are intending to use (e.g. desktop, Android, iOS). You will then need to use a custom display size. Note that the amount of room used for the Firefox user interface will depend on many factors which include—in addition to the OS and resolution of the physical display—any theme the user has installed, which toolbars the user has chosen to display, and, potentially, which add-ons the user has installed.
This is what Responsive Design Mode looks like:

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

Selecting iPhoto images within a cocoa application

I was wondering what the best way of selecting photos from iPhoto within a cocoa application? Right now, the open file dialogue doesn't allow me to go into the iPhoto library. How can I allow the user to go into that folder? IKPictureTaker was one option, but it appears that it allows the selection of one picture at a time. I'd like a user to be able to select 1 picture, or many.
Just use NSOpenPanel and set the allowed file types to the public.image UTI:
[panel setAllowedFileTypes:[NSArray arrayWithObject:#"public.image"]];
This will automatically add a Media section and Photos item to the sidebar in the open panel that allows the user to select from their iPhoto library.
Alternatively, you can use Karelia's open-source iMedia Browser.
There is a private API of Apple that contains exactly the control you want; this control is an ILMediaBrowserView and provides the exact same view than the one in NSOpenDialog.
If you are planning an AppStore release of your app don't use it but it can be useful.
The framework to integrate to your project to get that view is iLifeMediaBrowser.framework in /System/Library/PrivateFrameworks.
Let's all hope Apple brings the same view in the documented IK.

Resources