All Questions
Tagged with drag-and-drop objective-c
228
questions
-1
votes
1
answer
26
views
Is there a way to be notified any time a drag-and-drop operation begins in the current application?
I'm working on a framework that's intended to be added to a native macOS application so that it can post events into the application's event queue in response to touch-screen events. In order to ...
0
votes
1
answer
95
views
The methods for Drag and Drop in NSOutlineView are not getting called
I'm trying to enable drag and drop functionality for NSOutlineView in my MacOS app. I want to drag a child from a folder to another folder within the outline view.
I want test asset 1 to be dragged ...
0
votes
0
answers
51
views
Setting text color of cells in outline view while dragging
I have a split view window with an outline view on the left and a table view on the right. I want to be able to drag items from the table view and drop them onto items in the outline view. The ...
0
votes
0
answers
37
views
How can I add a border to NSWindow for a drag operation?
I'm trying to add a border to an NSWindow for a drag operation (in the same way that dragging into a Finder window puts a blue border around it). The problem I'm experiencing is that the border is ...
0
votes
0
answers
150
views
Swift - Notify when the user is starting to drag an object outside my app
I have an App that handles files dropped into the window using the Swift Drag-and-Drop mechanism.
I would like to implement whenever the user starts dragging an object outside my app, that my UI will ...
0
votes
1
answer
132
views
iOS 11 DropInteraction Session from Photos returns invalid file path
When dropping images from the Photos app into my custom application, at - (void)dropInteraction:(UIDropInteraction *)interaction performDrop:(id<UIDropSession>)session I receive an NSURL* whose ...
0
votes
1
answer
112
views
Cocoa: drag and drop inconsistency
In my cocoa code, I’ve implemented a drag & drop for a file path. It is triggered not by a mouseDown, but as a result of a callback I receive from javascript code (after click-dragging an HTML ...
3
votes
1
answer
1k
views
iOS Drag & Drop. How to replace a cell with a custom view while dragging
Is it possible to completely replace an element from draggable UITableViewCell to custom UIView?
For example, I drag a cell, and I want to display a circle when I click on the cell, and in the ...
0
votes
1
answer
132
views
Can't access property sourceIndexPath on UIDragItem
I'm creating a viewcontroller that contains two separate UICollectionViews. I'm allowing for cells to be dragged from one UICollectionView to another.
In the method
-(void)collectionView:(...
0
votes
1
answer
48
views
Can't Drag from NSTableView with more than one row
I'm writing an app that should allow me to drag items from an NSTableView to another view (custom timeline view).
This works perfectly as long as there is only one item in my NSTableView. The fist ...
0
votes
1
answer
240
views
NSOutlineView drag-n-drop multiple items to single xml file Finder
I have a NSOutlineView with drag and drop support to reorder rows. Now I would like to add an export of the selected rows to a opml file in Finder. I've managed to set up NSFilePromiseProvider during ...
2
votes
2
answers
812
views
OSX - Get File Path from FileURL from Drag and Drop with Sandboxed application
I am Using Drag and Drop to drop a File onto my APP.
Apple deprecated NSFilenamesPboardType in OSX 10.14 and suggests using NSPasteboardTypeFileURL.
The URL(String) I get is:
file:///.file/id=...
2
votes
2
answers
1k
views
UICollectionView drag and drop remove translucent cell
I'm using iOS 11 drag and drop API for reordering and want to remove translucent cell which appears on start dragging. Is it possible? For dragging I use only required method of ...
1
vote
0
answers
303
views
Drag & drop issue of invisible collection view cell
Updated description
Please find image here.
here i have used two collection view.one for question and second for option and i want to fill in the blank with option by using drag and drop.
but there ...
0
votes
1
answer
280
views
NSOutlineView drag&drop (next to an item) doesn't work for complex items
My basic sample works well for item represented by standard ObjC classes.
See initialisation of self.list in sample below:
- (void) updateViews;
{
NSDictionary *firstParent = [NSDictionary ...
0
votes
0
answers
70
views
iOS - Choose picture from gallery or camera then crop, drag, delete or resize the picture
I'm working on an drawing project. I need to choose picture from gallery or take a picture from camera. Then user can crop the image. After that user can add the cropped picture to current DrawingView....
0
votes
0
answers
147
views
OS X objective c Drag and Drop text inside textfield to change the order
I wanted separation and drag and drop of text inside NSTextfield or NSTextview. Please find sample of this in Mac System Preferences-> Language & Region -> Advanced ->Dates
Screenshot attached.
2
votes
0
answers
276
views
NSFilePromiseReceiver returns NSURLErrorDomain -1001 "(null)" when receiving files
I've been working to update the performDragOperation method to use NSFilePromiseReceiver. However, any time I drag a file, the reader returns
Error Domain=NSURLErrorDomain Code=-1001 "(null)"
Here'...
9
votes
0
answers
2k
views
UICollectionView cells appear duplicated in place after cancelled drag sessions
I’m having trouble with an obscure problem implementing local drag and drop in a UICollectionViewController. The collection view allows dragging of items into and out of folders. All looks and works ...
0
votes
1
answer
1k
views
How to register NSItemProvider for drag and drop in Objective-C?
I’m trying to implement drag and drop functionality in an Objective-C project for the iPad. The principles seem to be straight forward enough, but the examples are all in Swift and I'm simply unable ...
3
votes
0
answers
324
views
IOS 11 Drag'n'Drop How to drop custom file
I need to copy dropped data to my custom path. With images it's working fine. Here is the code:
- (UIDropProposal *)dropInteraction:(UIDropInteraction *)interaction sessionDidUpdate:(id<...
1
vote
1
answer
216
views
Remove blue line while drag drop in NSTableView mac app objective c
I have implemented drag drop feature in tableview. When doing drag drop, the blue line appears by default, I want to customise/remove this blue line.
This may be a possible duplicate but I could not ...
0
votes
0
answers
124
views
Drag and Drop Custom TableViewCell of NSTableView
#define MyPrivateTableViewDataType @"MyPrivateTableViewDataType"
//add line in your awakeFormNib method
[self.tableView registerForDraggedTypes:[NSArray arrayWithObject:...
1
vote
1
answer
1k
views
Cannot get drag and drop to work onto NSCollectionView
There is probably a simple mistake that I'm making, but I simply cannot get dropping of files onto an NSCollectionView to work even in the most basic way.
In a test project, I have an ...
0
votes
0
answers
358
views
NSView based NSTableView – strange bouncing rows for Drag and Drop with NSTableViewDraggingDestinationFeedbackStyleGap
I have a view-based instance of NSTableView for which I’ve been changing the draggingDestinationFeedbackStyle, as most NSTableView Drag and Drop questions have been updated with reference to this ...
3
votes
0
answers
678
views
Implement drag and drop in nsviewcontroller
I'm trying to catch drag and drop event in nsviewcontroller, but
draggingEntered
is not called .
here is my code :
- (void)viewDidLoad {
[self.view registerForDraggedTypes:[NSArray ...
0
votes
0
answers
212
views
How to get subview with on NSEvent like mouse up on NSView?
I have multiple NSview with multiple subviews respectively within each NSView. I want to perform action on Drag & Drop. I could Drag view. but on Drop I want to get on exact subview dropping is ...
0
votes
0
answers
56
views
NSPasteboard ops working but not DnD
I have a document-based Cocoa application with bindings enabled; it's supposed to be a text-snippet manager. I'm developing in system version 10.9 with Xcode 6.2. The main document window has a split ...
0
votes
1
answer
786
views
Reordering NSCollectionView with (Flow Layout)
I have a NSCollectionView, which I want to reorder. I´m using a Flow Layout, Delegate and Datasource is set to my ViewController.
I have also registered my drag type but I only get the delegate call ...
0
votes
1
answer
69
views
I can't connect an object class file to a uitableview? ios objective-c
Hi I am trying to integrate http://www.scott-sherwood.com/tutorial/ios-5-drag-and-drop-between-uitableviews/ tutorial's function that we can drag and drop objects between two UITableViews located in a ...
1
vote
1
answer
1k
views
Dragging files into other applications in cocoa OSX
I'm trying to convert a windows application into OSX, everything is working now, except this small feature, the drag&drop of files from my app into any other window that supports drops. Receiving ...
0
votes
0
answers
475
views
objective c Drag And Drop IN OS X Sierra 10.12
In OS X sierra 10.12 Drag and drop is not working properly with NSTabView....
Drag and drop seems to only work in label of TabView not the entire tab ..you can see in the following project sample......
0
votes
1
answer
566
views
How to get the UIView object at the location of UITouch from - (void)touchesEnded:withEvent:?
I want to get the object at the location of where the touch is lifted (off the screen).
This will be used to implement a drag-and-drop and I have these methods for overriding:
- (void)touchesBegan:(...
0
votes
1
answer
418
views
How to recognize one finger drag on trackpad on mac OS X
I'm having some troubles reading trackpad events. I need to catch a single tap and a drag of one finder on trackpad. And also to distinguish them. Catching a single tap is working like this:
- (void)...
0
votes
1
answer
106
views
Drag swap NSViews
Because you never know, it might be useful, I've been trying to write a flexible NSSplitView experimental app where views can be added, and removed, on the fly in any way that the user wants. That ...
0
votes
1
answer
237
views
UIGestureRecognizer not called after setting UIViews frame inside UIScrollView
i am having some very strange issue. Basically i am implementing a drag and drop view with a snap to the horizontal 1D grid. Well, so when i drag a view and its center coordinate X is bigger or ...
1
vote
1
answer
437
views
draggingEntered: called but performDragOperation: not on IKImageBrowserView
I'am using the IKImageBrowserView with setting a drop deleagte
[self.imageBrowserView setDraggingDestinationDelegate:self];
No matter what i return in draggingEntered: the performDragOperation: ...
0
votes
1
answer
1k
views
Dragging cell outside of UICollectionView frame changes its contentOffset
There's this bug happening when I drag a UICollectionViewCell outside of the frame of the collection: the collection's contentOffset is reset to 0, I suppose to scroll to top, even when dragging the ...
0
votes
1
answer
116
views
How to disable all drag-and-drop operations when NSAlert is shown as modal window
I have NSWindow with custom NSView. This custom NSView override performDragOperation method. Drag-and-drop operations works good. But when I create and show NSAlert as modal window I need block drag-...
0
votes
2
answers
100
views
How to add an object in an UITableView by drag and drop it in?
So on my main View I've got an UITableView.
On this view, with a button, I'm able to add an object which I've called: SelectPostIt (which come from my nib SelectPostIt.xib ).
These Post It are ...
0
votes
1
answer
22
views
How to know the last x & y values at the end of a dragNdrop?
So I have a view with an UITableView on which I am able to add some objects (they come from my nib: SelectPostIt.xib).
These objects are draggable and what I want to do later is, when I'll drag then ...
0
votes
1
answer
194
views
UIView drag drop with replace feature [iOS]
I'm trying to do two main views (dropped zone) and two sub views (dragged views) with replacement feature with Move/Drag Gestures,
an example:
UIView *mainView;
mainVire.dropped = YES;
this let ...
1
vote
0
answers
178
views
NSOutlineView drag and drop item as file
I'm recently working on an project aimed to extract files from an rar archive. I use an NSOutlineView to present the content. In which every file and directory listed as an item of class Entry. I want ...
3
votes
1
answer
517
views
Exchange position of cells by gesture
I have UICollectionView in which I have a prototype cell and UIImageView in it.I am displaying random images in UICollectionView.
Now I want to exchange position of UIImageView by swiping it to near ...
0
votes
1
answer
339
views
Drag a cell from 1 table view and drop it onto a cell in a 2nd table view to invoke segue
I'm trying to attain a visual interaction between two tables, inside one controller, by dragging and dropping a cell from one table onto another tables cell. When one dragged cell contacts another ...
1
vote
2
answers
369
views
Obj-C: application:openFiles: (multiple files dropped) not receiving all files. Bug?
Closest one I found is: https://stackoverflow.com/questions/4778932/cocoa-app-not-receiving-all-dropped-files-in-applicationopenfiles
But it hasn't been answered.
My Problem is this,
So let's say I ...
1
vote
0
answers
19
views
Replicate a draggable image on the click of a button
I am trying to create a draggable image upon button click in Objective C. For example, lets say the image is an X or an O or simply a dot. Each time I click an "Add" button, I would like for an image ...
0
votes
1
answer
321
views
Drop location in NSView
I'm writing a Cocoa Application (XCode 7.0.1) and within it, I have a NSTableView and a NSView. The application is designed in a why that we can drag and drop items from the NSTableView into the ...
2
votes
0
answers
82
views
How to drag and drop UIButton title to another button title but the original button remain in same place objective c?
I have created Uibutton programmatically as grid in scrollview.Now I need to drag and drop the UIbutton title to another button.But the original button title should remain same.I searched ...
3
votes
1
answer
833
views
NSCollectionView: Accept Drag Only Between Items, not Over
I have a NSCollectionView implemented and working fine. However, when
dragging items around to re-arrange them, I'd like to accept drags only
between objects.
The current behaviour is that you can ...