I am currently creating a settings page for my Mac Application in OS X. I want to present a few predetermined options to the user that they can select. For example, for their region ID they can either select North, South, East, or West. Is there I way I could present these options to the user and then determine what they selected? I tried searching for "predetermined options", "radio button for OS X", "scroll wheel", but I didn't come up with much. I am also not sure if there is some sort of name that everyone calls a predetermined list. If there is just let me know. I am kind of new to the Objective C game and this is my first OS X app. Just looking for a nudge in the right direction here.
"Radio button(s)" is the term used, although it may help to search with "Cocoa" rather than "OS X". Using radio buttons in Cocoa is slightly more complicated than you might expect as a novice, since the radio buttons are usually organized within a matrix (NSMatrix). You could also use a pop-menu, a list (which is a simple table view), or some other UI.
A good place to start when deciding how to design your UI is Apple's OS X Human Interface Guidelines document. There's a whole chapter on controls. There's also a separate document about buttons: Button Programming Topics.
Related
I have searched google/stackoverflow etc. for answer to my question, but I didn't quite manage to find the right one. I believe I just don't know, how to set the question properly, and thus I cannot find solution.
Is there any way, how to create grid like I drawed in following image (with red colour):
I need to add this red grid to several images, which look very simmilar. The grid field (the one selected) have rolling menu, prescribed position, and a field for additional text. Black lines in background are image in background, and the red supposed to be grid above the image. I thought of creating a lot of buttons alined to each other, but i think that is very bad way to do so.
I would like a pop-up menu from selected field, but opening new activity with same fields is usable aswell. Is there any "simple" solution for creating such grid/menu ?
Btw, I am not programmer with many experience with coding, let's say, I know basics only.
Thanks in advance.
I am learning French. Every time I use the Force Click on my Mac on a word I don't know, I get a dictionary entry and a translation to English.
But when I want to translate a whole sentence, I have to open Google Translate to do so. (1. Open Google Translate. 2. Copy sentence 3. Paste Sentence) It is pretty annoying to do that 20-30 times a day.
So is there a way to expand the capabilities of Force Click in Safari (or in the best case, in every application which allows "Look Up")?
Let me worry about how I can translate the sentences.
I am open for any kind of creative solution.
Here is the standard pop-up when I force touch
I don't think there is a documented way to achieve this on a force click, but you may want to look at Services.
Basically, you can create an application that provides a service, select some text, and then choose your application's Service menu item from the Services submenu in your Application Name menu (the one in bold where "Hide" etc. are).
The service will then receive a copy of the selection (in an NSPasteboard) and can do whatever it wants with that, or even change it.
I've seen in some applications the control in these shots that is used to enter key shortcuts. I'd like to know if these are standard (available to everyone) or if these were built by the application's developer. I don't think it is the latter because I've seen this in many apps from different developers. Here are the images:
To give one example of an app try Bowtie, though I know there's more that use this.
If this control is standard, could you tell me how to use it (what class, etc)?
The first one appears to be Shortcut Recorder from Waffle Software.
Note that the use of a rounded text field for this, while somewhat established, the HIG reserves the rounded appearance for search fields.
I need to have multiple windows on main window. same as MDIForms. That means having parent and child relationship between main window and other windows.
But I am not getting how to implement this. can anyone help me for this...
Have you read the Window Programming Guide for Cocoa?
In essence, Apple's opinion of MDI is...
"The MDI tendency directly contradicts
Mac OS X, in which windows are
document-centric rather than
application-centric. No parent
application "main window" exists--the
menubar and other interface elements,
like palettes, are used to constantly
indicate which application is active.
Document windows are only constrained
by the user's desktop size (which
might span single screen or multiple
monitors)."
Taken from Apple's Switch to Mac OS X developer document (see the "Mac OS X Doesn't Use MDI" section). Whilst this is quite an old document, nothing has changed in this respect.
I am a newbie in Mac application development. I want to write a GUI application in Cocoa using Interface Builder. I want multiple screens i.e. when one button on a screen is clicked, another screen should be displayed. How can I activate a new screen at button click event?
I would heartily recommend Aaron Hilegass's book Cocoa Programming for Mac OS X. It took me from feeling like everything was impossible to being relatively competent in the space of a few short weeks. I was very impressed with it.
Apple's documentation is amazingly good, but it takes a while to get used to the style, and you will need to know which objects actually exist before you can look up how to use them, which is where Aaron's book comes in.
Your library may have a copy of it, or be able to order one for you if they don't.
I think you mean windows, not screens. Screens are the displays (monitors) on which all the user's windows from all the user's applications appear.
And I second Jonathan's recommendation of the Hillegass book.
The button has a target. That should link to the new window. As its action you can tell the window to show itself.
Take a look at:
http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/WinPanel/WinPanel.html
I think what you want is the type of interface like that seen in Coda, or System Preferences where there is a toolbar on the top of the screen that can be used to select between the content of the window.
The simplest method I have found is to use BWToolkit.
Another method is to use a series of views, and switch between them when the toolbar is clicked. I've found one description here, but that's not the one I used first (which may have been originally in Ruby Cocoa, IIRC).
NSTabView.