UITableView Cell not showing UITableView(KPDropDown) placed on custom cell - ios

I am working on one application and want to show dropdown list on tap of button. Now those buttons are placed on UITableViewCell which means indirectly UITableView.
I am using KPDropDown for showing dropdowns on app. Now when I tap on button to open dropdown, its not showing its proper frame.
Please refer screenshot attached.
And help me out in this.

In KpDropMenu.m -->didTap ---> [self.superview addSubview:self.tblView] replace with [self.superview.superview.superview addSubview:self.tblView] then you will need to adjust the position accordingly.

Related

UITableViewCell option view overlap interactionable

I have a UI with tableview and button at the buttom like this.
when user click the three dotes, It will show an overlay/overlap view that show several button option to choose.
The button inside cell (Report) is tapable (clickable), but button outside the cell (Edit and Delete) cannot be clicked. Anyone can help? Thank you.
Here is the XIB.
I endup using UIApplication.shared.keyWindow (to be exact, I use Popover library) to solve this problem.

UITableviewCell - Clicking on empty checkmark circle in edit mode does not select cell

I have a table view with several rows. I have enabled multiple selections in edit mode. When I toggle edit mode, I initially select all rows programmatically. Everything works fine except for re-selecting a row that was deselected by tapping on the empty circle where the checkmark was.
Table View Configuration:
Sample Cells, one has been deselected:
The interesting thing is that I can tap on the checkmark to deselect a row (didDeselectRowAtIndexPath is called), but immediately tapping on the same spot again will not call didSelectRowAtIndexPath. I have to tap on the main part of the cell. Naturally, this is not a good user experience.
Here is an overlay showing the areas that respond to taps highlighted in green.
I have been unable to find any events that are fired when tapping on the edit control of a deselected row. I have no code inside didSelectRowAtIndexPath or didDeselectRowAtIndexPath and I am just relying on the list of selected cells that the tableview maintains when the edit mode is toggled off. Any help isolating this issue would be greatly appreciated.
The problem ended up being that I was setting a backgroundView on my custom table cell and that was preventing the touches from getting to the right target.

Is it possible to change default delete action Icon in UITableView edit mode?

I would like to set custom icons for the UITableView delete icon for the table's edit mode.
I found a way of doing it by setting UITableViewCellEditingStyleNone in editingStyleForRowAtIndexPath method ant then adding my custom button view in the place where that icon should be by subclassing UITableViewCell. source (enter link description here)
I set up a delegate to get the tap even from that button, but with this approach when I tap on this custom button I can't get the cell to slide to the left to reveal red delete button (see the image). So this way, I can just delete the cell by taping only once.
What I need is to mimic the same standard deletion flow with two taps(first on the left delete icon, second on the delete button the slides to the left) but also have my custom icon for the delete on the right.
Is this possible to do?
Any kind of help is highly appreciated.
For fully customize UITableViewcell https://github.com/CEWendel/SWTableViewCell
It will Help you a lot

How to add one UIButton on Row and Section of UITableview in Objective-C

I am working on one project. In Dashboard View Controller I used UITableview. Now I want to display one UIButton on Cell as well as on Section Header please see below image
Image that contain black background and "Products" is a section and below white background is a row. I have add this Button in header view of section. I am able to handle its/button's UIControlEventTouchUpInside event when I click on upper section of UIButton/PLUS that is displaying in section.
Now problem is how to handle this UIButton/PLUS UIControlEventTouchUpInside event that is displaying on Row ?
Please help me. Thanks
Call bringSubviewToFront twice for that button so that it will come to front for tableView on first call and then will come front of cell after second call.

Adding a navigation accessory to a UITableCell

I am learning about TableViews in Xcode right now and I am having trouble finding some info on TableViewCell accessories.
My goal is to have a MasterTableView and a SubTableView. When a MasterTableCell is tapped to take the user to the SubTableView. But I'm stuck with something simple like showing a '>' on the right side of the cell to show that it has a SubTableView.
Do I need to design my own button? I thought there was a navigation image already available to me in the UI storyboard maker but it won't let me drag and use it in my custom cell I'm making.
Any thoughts or links to documentation would be great. I've looked in the developer library and all it tells me is that it is possible, not how to do it.
Thank you in advance.
If you are using a Prototype Cell in the Storyboard, just set the "Accessory" type in the Attributes inspector to "Disclosure Indicator".
If you create the cell programmatically, set
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
From the documentation:
UITableViewCellAccessoryDisclosureIndicator
The cell has an accessory
control shaped like a chevron. This control indicates that tapping the
cell triggers a push action. The control does not track touches.

Resources