How to add badges to a source list? - objective-c

I just wanted to know how to to implement badges like in the mail app from osx to my application without using PxSourceList : http://grab.by/nJ66
My app is developed with rubymotion for os x.
Thanks in advance.

As far as I know they are not available "out of the box"... PXSourceList has the best implementation of badges I have seen. Either use PXSourceList or look at the source code for it and be inspired to how it should be done.

Related

How can we achieve coverflow view in android titanium?

I have seen that titanium support CoverFlowView in titanium but it works only on ios, Can anyone have idea to achieve CoverFlow in android with titanium
Thanks in advance
Looks like you are in luck! Someone already built a coverflow module for Android using the Android development environment.
https://github.com/moondroid/CoverFlow
You need to be willing to write the additional code for that to turn it into a module for Titanium.
http://docs.appcelerator.com/titanium/3.0/#!/guide/Android_Module_Development_Guide
It should be possible, but I must admit I've never tried to write one myself.
Basically you cannot get Coverflow on Android. Since it is a native iOs component which is not implemented in Android at all. Frameworks like Titanium always "link" your commands to internal system APIs. When there is no API there is no way to access it. Of course you could try to build it on your own but I think this would not work that well. And its a lot of work!
Additionally cover flow is not really useful (except for holding just a few items). Have a look at my question at ux.stackexchange.

NSStatusItem reordering along Status Bar

I am trying to add a functionality to my status bar app for Mac OS X. I would like to be able to move my item along the bar, as you can do for the native OS tools like the Bluetooth or the WiFi icon.
Cheers
Update for macOS Sierra: Apple improved NSStatusItem. Items can now be reordered by ⌘-dragging. This works for all Apple’s menu items and all third party apps.
Pretty much all the reasons you could ever want to use NSMenuExtra have been removed now, which is great. So, the answer now is to just use NSStatusItem. No further action is required.
What you are looking for is NSMenuExtra and not NSMenuItem.
Apple uses NSMenuExtra for the system menu icons including Wi-Fi and Bluetooth. Although it looks similar to the regular NSMenuItem, NSMenuExtra has some special features, notably to keep their relative order after rebooting, and Command-Draggable by user.
Unfortunately, NSMenuExtra is totally undocumented, so if you are targeting the Mac App Store, it's better for you to stick with the standard NSMenuItem. Otherwise, there is a bunch of tutorials about how to create an NSMenuExtra. For example, here are two of them:
NSMenuExtra – working with undocumented APIs
Building NSMenuExtra - A Small Tutorial
Unfortunately there is no 'good' way to do that, however you can check this question for the hack which can do that:
How to drag NSStatusItems

Custom icon for each NSUserNotification?

Is there any way to provide custom icons for each NSUserNotification, instead of the default app logo? Like the iconData parameter in Growl.
I want to show "Someone has just posted something" with the photo of this "someone".
You still cannot change the (default) image showing your app's icon, but starting in OS X Mavericks you can in addition display an additional image using the new property contentImage, e.g. like this:
This new property isn't documented in the NSUserNotification class reference, but mentioned in the Foundation Release Notes for OS X 10.9.
Currently not (Mountain Lion). You should post a feature request.
I know this question has been dead for 5 years, but in case someone finds that question and is still looking for a solution, there is that one:
https://github.com/indragiek/NSUserNotificationPrivate
I've tested it in macOS Sierra and it still works. Just be warned, quoting the project creator:
This should go without saying, but using any of this will result in
your app being rejected from the MAS (Mac Apple Store) and potentially breaking if the
APIs change.
Looking for a related answer about NSUserNotifications I found your question. Officially it's not yet supported. But I wrote a little custom control you can use that may fit your needs. Take a look on this Github repository.

Showing multiple simultaneous tool tips in Cocoa

I want to add a feature to my Mac app inspired by the Help mode in iPhoto for iPad, pictured below. I would love to do this using built-in APIs, so I don't have to build my own tool-tip-like view. Is there any way for me to either show multiple tool tips at the same time, or to achieve something similar using NSHelpManager?
If you are targeting 10.7 or later you could do this fairly easily using NSPopover. You would have to create quite a few popover windows but it isn't difficult to do.

Properties of iOS messenger

I need to build an app such as "Messages" in iPhone, but easier (don't need to send messages to server, only in datebase). I was faced with some questions.
http://www.ibm.com/developerworks/library/x-ioschat/index.html
In this tutorial messages look like TableView, how can I do them such as in iPhone standard messanger (comics speach). And how can I implement bar with camera button, text box and send button (what class is responsible for this)?
You are in luck good sir, there is already a class that can fix you up with this and avoid all the work, it's called AcaniChat (screenshot provided). Or you can even see at Sam Soffle's SSMessagesViewController, he is a well known iOS developer who built this class.
It will definitely help you, if you want to mimic that behavior.