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

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];

Related

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 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.

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!

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];

difference between presentModalView and addSubview?

When revealing a new view, what are the differences between these two and when would you use each?
Also, what's the right way to nest views. for example, I have a UIImageview that animates onto my view and it has a button on it. I want to put that image and the button in their own view, then simply animate the view and have both handled simultaneously.
Thanks!
For the first question :
presentModalView is you show another viewcontroller (called modalViewController) to get some data, temporary view... (more about ModalViewController here) . Generally, it is another view and can hide your original view
addSubview: you add another view in your current screen, you don't show another view. Which means you are still in your current viewController.
For the second question:
I will go for presentModalViewController here. You can create another UIViewController contains a UIImageView and 2 buttons then you can just present it

Selection on table view causes parent view to change

I'm working on an iPad app and here's my scenario:
I have a view which contains a table view inside of it. When the user selects an item on the table view, I would like the parent's view to change in a navigational manner. For those of you that have an iPad, this would be akin to the "Settings" app. But I guess in the "Settings" app, the right pane is composed of a grouped table view right?
Is what I'm trying to do possible?
Thanks
The UITableView delegate receives any notification on selection and navigational events. Use this methods to simply synchronize the state in the dependent parts of your view.