Can't Drag from NSTableView with more than one row - objective-c

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 images shows one item being dragged from the table view.
However, as soon as there is more than one item in my table view I can no longer drag from it. It just selects that row. The second image shows me trying to drag from the table view with more than one item.
Is there something I need to do to enable drag from the table view?

SOLVED.
In my pasteboardWriterForRow delegate call I was returning nil instead of a valid object.

Related

app crash while taping(Two actions) two view at a time

In my application, I have one containerView which contains two sub-views. One sub-view contains list of buttons and the other contains a table view that based on the selection of button which in first view, the content of table view has to change.
My issue is while taping the button and content view table at same time app crashes. Please guide me to fix this issue.
In your case on button tap you are reloading table & simultaneosly selecting row from table. It's not consistent. If you want only action of one needs to be executed then set exclusive touch to all subviews of your containerView.
For all subviews do-
[subView setExclusiveTouch:YES];

Create UIPopOver without including Tableview in ios

I want to create two PopOvers when at the time button clicked and textField clicked in the same UIView (not ViewController). In those popovers I need to load separate array values. Is there any way to create them and added to UIView?
I already added one tableview for base UIView, so without using tableviews, how can I create UIpopOvers and load the arrays in those popOvers? How to handle the selected rows?
This link can help you to create a popover menu.
Or you can take an UIImageView having shape of popover menu and table view in that, it will be easy to load arrays and to handle selected rows.
I did the same using second method.
Happy Coding!

UIPicker and UITableView in iOS

I am new to iOS and confused about the right way to implement UIPickerView.
I have a UITableView (the list of which is populated by XML File). Now I want to implement an option to trim down that list (say, show only type X or type Y). Now the confusion is, should I implement the PickerView in TableView itself, or make a new segue to show PickerView.
I tried implementing the first one but couldn't get it working.
A picker view wouldn't really fit inside a table view. You should have a button on the navigation bar or toolbar on your table view controller which presents a modal view controller holding your picker view.
This would then feed the selected value back to the table view controller (via a custom delegate protocol method, or similar) and the table view can filter its rows.

NSTableView, NSArrayController, CoreData - Footer View to refresh list

I have an NSTableView bound to an NSArrayController which fetches some entries from core data.
I would like to have a custom view cell in the bottom of that NSTableView so that when the user scrolls to the last element in the table, a scrolling indicator will appear instead of a table view cell.
This is similar to what happens in the twitter for mac application, where you scroll to the bottom of the list to fetch more results.
Because the binding is done in the nibs, I'm not quite sure if I need to change that and set the NSTableView datasource to my windowcontroller and increase the number of rows with 1.
Is there a simple way to do this?

TableView Reusabilty using segmented control

I have a view/Window which has a 2 segmented button on the top and a view below it.
When I click on the first button, the tableview with some data gets loaded on the view below. Now I want to use the the same table when I click on the 2nd button, but I want to add a few more section/rows.
The problem is when I click the first button the tableview gets loaded and the number of rows/sections method gets called. But when I click on the second button, those methods aren't called because they are called just once whenever a table is loaded.
So basically I get the same number of rows. I can do this with two different tableviews but I would like to use just one.
Those methods will be called again if you reload the table data. You can do this using this command:
[self.tableView reloadData];