Should I create a custom UITableViewCell? - ios

How do I change UITableViewCellEditingStyleInsert default image to custom created?
Is there an easy way or I should create a custom UITableViewCell?

The standard API doesn't support any way to customize the green plus button used for UITableViewCellEditingStyleInsert.
Your only option would be use your own button added to a cell. You wouldn't be able to use the standard editing style features of UITableView. You would need to set the cell's editing style to None and use your own method when the custom button is tapped.

Related

Is it impossible to use custom view in delete action ( swipe button ) on UITableViewCell?

Currently, I want to use custom view on swiping delete action like this
My custom view
Is it impossible to do that?
For now,I use function trailingSwipeActionsConfigurationForRowAt for custom icon image and title but I have no idea how to round corner of its background.
Thank you
I'm not sure about custom views but there is a library called 'SWTableViewCell', it gives default icon for edit, delete, apply, edit.
You can find similar libraries too.

Adding a custom control to a nib file

I just discovered that there is no checkbox control in ios. I have found several resources that explain how a custom checkbox could be made. My question is how can I place a custom checkbox control on to a content view . Should I just put a view control in that specific position and then programmatically add the custom control to the view. I wanted to know what is the most common way to accomplish this ?
Checkboxes are mostly for OSX.
On iOS equivalents you can use UISwitch, or use a UIButton and set its state (highlighted, selected, ..) depending on the user selection.
If you absolutely want a checkbox, here is a guide showing how to do it. Seems nice, but I haven't tried it.
http://x-code-tutorials.com/2013/04/09/ios-xcode-checkbox-uibutton/

How to customize multiselect edit mode for uitableview

Is it possible to customize the multiselect edit mode? So instead of the default selection icon (the circle with the checkmark), I need to show a custom one, with selected and unselected states.
I also need to indent the cell more to the right.
Obviously I would like to use as much as possible of the system provided animations.
HEre's a screenshot of the sample editing mode of uitableview. (My cell is much more complicated :)
Thanks,
Jason
You can customise the cell.. create a UITableViewCell with a UIButton and set the custom images you want for the selected and default states and load this custom cell in cellForRowAtIndexPath:

How to add two input accessoryView for UITextView in iOS?

I need to add two input AccessoryView into my UITextView.
First i need to add custom control from this link.
That custom control use
[KOKeyboardRow applyToTextView:self.txtView];
So when i add my custom accessoryView to my UITextView,only custom control is showing and mine are not displaying.
Here is code that my custom inputAccessoryView.
self.txtView.inputAccessoryView = self.keyboardAccessoryView;
So how can i add two inputAccessoryView into UITextView?
The inputAccessoryView is a single view. You need to create a single view (either a container or subclassing the 3rd party view) and add all of your content (buttons) to it.
Look at subclassing KOKeyboardRow just to expand the view that it uses as the inputAccessoryView and add your buttons to it. To do this cleanly you should change the public interface so that it takes a number of buttons (an NSArray property) as additional buttons that would be added below the standard buttons that it adds.
wrap the two views in one custom uiview

Accessing the multiple selection UIView when tableview.allowsMultipleSelectionDuringEditing=YES

I iOS 5 Apple added functionality to make it easier to make a multiple selection table view through:
self.tableView.allowsMultipleSelectionDuringEditing = YES;
When the table is in edit mode I can see the multiple selection mark but when I check it, it does not display the usual red checkmark to denote it is selected. So I assume I have to programatically access that UIView and set the appropriate image.
So my question is, how can I access the UIView that displays the circle that represents if the cell is selected or not?
(source: winddisk.com)
There is no need to programatically access the UIView and update it with the checkmark.
The solution to the problem was way easier, here it is:
Cells not getting selected in UITableView with allowsMultipleSelectionDuringEditing set in edit mode

Resources