Reusing Mac OS X checkmark icon - objective-c

I've been looking at the possibility of reusing some icons of Mac OS X, most notably the green checkmark (similar to the one in Automator).
However, I could not find that icon in any of the application packages or on Apple's documentation.
While I can create the image myself, I'd rather reuse something that's supposed to be already there (if it really is there).
Is there a struct/class that'll help me reuse that particular icon?

The only system-defined icons you can use are available in Interface Builder. There are no other APIs to get those icons. And you cannot simply take icons from other apps, they are copyrighted. If you want that icon you’ll have to make it yourself or license it from someone.

Related

Codenameone Camera Component Customizing

all!
Is there any way to build custom camera component in codename one?
I googled and got about PeerComponents, however don't know how to use it.
I just would like to use it as Label component with 2 buttons (Taking picture button and retaking picture button)
Kindly provide some small sample code for me. Best regards.
[UPDATE]
I need this because of following reason.
First of all, I need square Image taken by camera, and user should be able to know how the picture will be taken.
2 resolutions here:
First, if I have to use full screen camera, it will be better to draw or overlay square rectangle on camera view so that user can know which area will be taken.
Second, if overlaying and drawing is difficult (or should use native code for that), I need some custom components for camera area such like PeerComponent. So I would like to place it anywhere of screen area as square rectangle. Then, users won't need any overlay or drawing something on it because it is already square.
That's all what I need.
Regards.
Yes, it's certainly possible to create a component like this, and we do intend to create one at some point in the future. You can beat us to the punch.
First, you should familiarize yourself with how native interfaces work. This video is a good start:
https://www.codenameone.com/how-do-i---access-native-device-functionality-invoke-native-interfaces.html
This series of blog posts demonstrates how to wrap 3rd party SDKs into codename one on Android and iOS.
https://www.codenameone.com/blog/integrating-3rd-party-native-sdks-part-1.html
https://www.codenameone.com/blog/integrating-3rd-party-native-sdks-part-2.html
https://www.codenameone.com/blog/integrating-3rd-party-native-sdks-part-3.html
Although it doesn't include an example with PeerComponent, it is helpful for getting a grasp on the process. Adding peer components into the mix is really just a matter of returning the corresponding "View" type from a native interface. On Android, that is an android.view.View, on iOS it is a UIView, in Javascript it is an DOM element, in UWP it is a FrameworkElement, and in the simulator, it is a javax.swing.JComponent.
This blog post does include an example of a peer component, but it is targeting UWP:
https://www.codenameone.com/blog/uwp-native-interfaces-mix-c-java.html
Once you have a grasp of the material, you should look at relevant examples. Currently the most complete example I'm aware of of a cn1lib that implements a native peer is the Google Maps lib:
https://github.com/codenameone/codenameone-google-maps
You can see the Android native implementation here, and the iOS native implementation here
You may want to refer to the existing code for image capture in Codename One as well.
Android: https://github.com/codenameone/CodenameOne/blob/master/Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java#L5788-L5811
https://github.com/codenameone/CodenameOne/blob/master/Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java#L5701-L5714
Though it uses intent to open the native capture dialog, so it may not be too relevant.
IOS: https://github.com/codenameone/CodenameOne/blob/master/Ports/iOSPort/nativeSources/IOSNative.m#L2879-L2927

Tab Pages Control Type used in IPad Apps

What kind of controls are used in the photo in the link below i pointed to them with red arrows, its outline+ App, couldn't find any equivalent to it in Xcode.
Kindest Regards
https://dl.dropbox.com/u/49071490/onenote_note_app_outline_plus_for_ipad_1.jpg
The longer arrow left below most probably points to an UITableViewCell which represents one cell in the UITableView, used as a menu. It is customized, though. No control in Xcode that looks like that out of the box.
Concerning the other arrow, iOS does not provide tab bar controls like in a browser. They are custom built from the ground with what you see in Xcode. A lot of thinkable possibilities to achieve that.

Objective-C Lion Fullscreen use all monitors

We have 4 monitors on a wall for graphing. Looking to put them all into use in fullscreen mode. Right now if I do it it just uses one. Just looking to see if it is possible to create an app that allows me to use all 4 with like a simple uiwebview for each monitor.
Should of mentioned this.. Looking for a simple code sample of how to do this or pointers on where to get answers.
Yes, it is possible.
Standard Lion fullscreen mode allows for one "primary window", which is sized to take up the entire main screen, and as many "auxiliary windows" (inspector panels, etc.) as you want, which are not automatically sized in any way.
Go into Xcode, create a simple project, and edit the xib. For the existing window, go to the Attributes Inspector and make sure that Full Screen is set to "Primary Window". Now in the object browser, drag three Panels into the app. Go through them and make sure each one has "Utility Panel" for Style, "Auxiliary Window" for Full Screen, and either "Inferred Behavior" or "Transient Behavior" for Exposé. Now, when the first window goes into full screen mode (e.g., when you get the appropriate notification or NSWindowDelegate method), size and move the other three windows to take over the other three screens.
This is all documented pretty well in the Implementing the Full-Screen Experience section of the "Mac App Programming Guide" in the 10.7 Core Library.
If you're just looking to put a web view on each screen, it may be easier to use -[NSView enterFullScreenMode:withOptions:]. This isn't Lion's new full-screen mode, it's the earlier technique. It has different behavior in terms of whether the app is in a separate space, etc.

How do I change the color of TableView and Button controls in iOS?

I designed a web app for iPhone and am now trying my hands at a native Objective-C version, and I'd like to retain some continuity with my original design. Since my web version uses CSS, I was able to customize the color palette, even though the UI was designed to imitate a native iPhone UI. I'd like to use a similar color scheme for my native app, but it doesn't seem so easy out of the box. I've gone through a couple tutorials and played around a bit with Interface Builder, inspecting the individual settings available for each control. My biggest questions are:
Is it possible to (or how do I) change the color of a Round Rect Button?
Is it possible to (or how do I) change the color of cells in a Table View?
Where in the Cocoa Touch Library can I find the standard iOS UI buttons, e.g. the green "Call Back" and red "Delete" buttons in the native voice mail?
Thanks
Nope, I don't think so. And you probably shouldn't anyways. In my opinion it's better to rather stay consistent with the OS and not the web... What you can do is to use a custom image.
UITableViewCell has a property named backgroundView, which is only present if you have a grouped style. This view has -- just like every other view -- a background color. If you don't have this and want to color individual cells, build a custom cell where you put in a view as background view.
As far as I know, they are not publicly available. However, you may find a lot of template images etc on the web that you can use.

How would I make a draggable Menubar icon for Mac OS X

I am in the process of writing a menubar icon for an app i'm developing. However the NSStatusBar class does not have a method which would make the icon draggable, via cmd+left mouse drag.
How do you make your menubar icon draggable with Objective-C code?
Thank you :)
You can't currently do it with NSStatusBar. NSMenuExtra will behave the the way you want, but unfortunately it's not part of the part of the public Cocoa API, and from what I understand (I haven't used it myself) takes a bit of a hack to even get it working. Also NSStatusBar will be easier to integrate into an existing application, NSMenuExtra is more of a separate bundle that's loaded by the system.
In my opinion it's not a good idea to depend on private APIs to add major functionality like this to your app. I would stick with NSStatusBar, most users will be used to the behavior from other applications, and with any luck a future version of Mac OS X will allow dragging the icon the same way NSMenuExtra works.