My idea:
I select a string/text and drop it on my app's icon.
My app comes up and does fancy things with the string.
Now my question is how I can do it that I can drop it on the app, how I can notify my app and how my app gets the string.
Any suggestions?
I guess that you have already looked at official Drag and Drop Programming Topics for Cocoa .
There is a blog article dealing exactly with your issue: Cocoa Drag and Drop text into the Dock Icon.
Related
i'm trying to implement new "quick menu widget" in iOS 10 available with 3dtouch.
My app has multiple today extension and apple guidelines report
If your app has multiple widgets, pick one to appear in the quick action menu that appears when someone applies pressure to your app icon on the Home screen using 3D Touch.
I don't understand where i can "change" that!
With only one widget all works as well.
There is a new Info.plist key UIApplicationShortcutWidget which you need to set to the bundle identifier of your widget.
See the documentation at: https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW32
After many hours searching for a solution to this I'm still stuck, I would be very grateful for your help.
Here is my situation: I would like to know the source application for the (drag and ) drop of a document/file on my app's dock icon (it accepts anything as specified in the .plist). In fact the final goal is to know the url of the dropped document/file if it's a browser drop. For now, knowing the application name should be enough. I simply cannot manage to get the source for a drop, it cannot reliably be found/deduced from the Drag Clipboard as it seems that some applications do not use this (such as Chrome).
Does anyone have a clue about this?
Thank you,
chocozor.
If you're dropping file icons on your app icon in the doc, have you tried the
application:openfile:
or
application:openfiles:
methods in your app delegate?
NSApplicationDelegate documentation: https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSApplicationDelegate_Protocol/Reference/Reference.html
I am doing a minimal port of a simple iPhone/iPad app (think 2D casual game with a single view) to the Mac (almost nothing has changed in the UI, except swapping touchable Cocoa Touch UI elements for mouse-clickable Cocoa UI elements). In the iPhone app, a little "i" button brings up a text view containing basic instructions, followed by all the required (possibly lengthy) BSD/MIT/Apache/Artistic/et.al. copyright notices and their associated disclaimers for any random borrowed code.
The ported Mac app is intended to be distributed from the Mac App store, so additional README files outside the app bundle/sandbox can't be used. I note that many Mac App store apps do not put this text in the About... box, or use a little "i" button like iPhone apps.
So where do I put the equivalent README text in a Mac App Store app?
I would like this text to be included with the Mac app so that it's viewable from within the app even when the Mac is completely off-line.
ADDED:
I see recommendations for putting all this text in the About... dialog, but, if so, my guess is that many apps are skimping on all the required text that seems to go with many of these licenses (I've seen a few with a page or two of required disclaimers. Which Mac app has all that in the About... dialog?)
Just put a Credits.html or Credits.rtf file in your bundle, it'll automatically be displayed in the dialog that's shown after clicking the "About MyApp" item in the main menu.
Usually, a Mac app includes an «About» window, with the application's icon, name, version number and author.
If you have credits to display, you may display them on that window, if it's only a few lines.
If you have a long text, you should add a «credits» button on the «About» window, that eventually opens a specific credits window, with the text you want.
I want inside my app to create new "shortcut icon" in the same iPhone, where every icon has a dynamic image that I create. Is it possible using iOS?
According to my searches (see this answer) the only possible way is to launch safari from my app and there ask the user to press "+" button inserting your url scheme.
Don't believe this is possible. To do this, you would have to, at least change the icon in your app bundle (Naïvely assuming iOS doesn't cache the icons).
Your app only has access to the "Documents" directory.
You can set a numerical badge on an icon - might this work for you? If so, take a look at local notifications in the notifications guide: http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html
I'm currently working on my first iOS application to run on the iPad, and I've come across a problem. I have been asked to implement menu's similar to the ones in the default applications such as when you click on the "Calendars" button in the top left of the calendars app.
Only issue is, I cant seem to find a standard UI object that looks like these, with the arrow connecting the menu to the button etc. Is this a standard UI component that I should be able to use, or will I have to imitate them by creating a custom object?
Thanks for any help.
That is a UIPopoverController. There isn't an Interface Builder control for this. You need to create one programmatically:
UIPopoverController *popover = [[UIPopoverController alloc]initWithContentViewController:someTableViewController];
See the documentation for more information and sample projects, specifically ToolbarSearch: