Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change position of UITableViewCellEditingStyle

Tags:

ios

iphone

How can I change the deletion button position when using UITableViewCellEditingStyle from right to left?

like image 607
Hardik Patel Avatar asked Jul 27 '11 06:07

Hardik Patel


People also ask

How to set the position of a relatively-positioned element in CSS?

Setting the top, right, bottom, and left properties of a relatively-positioned element will cause it to be adjusted away from its normal position. Other content will not be adjusted to fit into any gap left by the element. This <div> element has position: relative; Here is the CSS that is used: Example. div.relative {.

How do I set sticky positioning for an element?

You must also specify at least one of top, right, bottom or left for sticky positioning to work. In this example, the sticky element sticks to the top of the page ( top: 0 ), when you reach its scroll position. This example demonstrates how to set the shape of an element.

What happens if I set the properties of a relatively positioned element?

Setting the top, right, bottom, and left properties of a relatively-positioned element will cause it to be adjusted away from its normal position. Other content will not be adjusted to fit into any gap left by the element.


1 Answers

You cannot change the position of the native delete button ON the place the default delete button use custom button make them hide .On the click of edit button make them visible .For creating the button , Use this formate it will solve your problem write this code in your cellforrowAtindexPath method

UIButton*Delete_btn = [UIButton buttonWithType:UIButtonTypeCustom];
        [Delete_btn addTarget:self action:@selector(Delete:) forControlEvents:UIControlEventTouchUpInside];
        Delete_btn.frame = CGRectMake(05, 10, 56, 56);
        [Delete_btn setBackgroundImage:[UIImage imageNamed:@"delete_btn.png"] forState:UIControlStateNormal];
        [cell.contentView addSubview:Delete_btn];
like image 159
Harish Avatar answered Oct 05 '22 20:10

Harish