3 回答

TA貢獻1831條經驗 獲得超4個贊
luvieere是正確的-如果您想要相同的“刪除”隱喻,則希望將其保留在Apple提供的紅色按鈕上。為什么要改變它?它是全球公認的刪除按鈕的標準。
雖然,如果您想要完全改變滑動行為的Tweetie之類的東西,則可以使用ABTableViewCell之類的東西,您只需在自己的視圖中繪制即可。進行自定義表格視圖,覆蓋-touchesBegan:withEvent :,然后檢查是否有觸摸。計算兩次觸摸的增量(在touchesMoved:withEvent:中),然后移動自己的視圖。

TA貢獻1155條經驗 獲得超0個贊
在自定義單元中實現此方法
- (void)willTransitionToState:(UITableViewCellStateMask)state{
[super willTransitionToState:state];
if ((state & UITableViewCellStateShowingDeleteConfirmationMask) == UITableViewCellStateShowingDeleteConfirmationMask) {
for (UIView *subview in self.subviews) {
if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewCellDeleteConfirmationControl"]) {
UIImageView *deleteBtn = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 64, 33)];
[deleteBtn setImage:[UIImage imageNamed:@"delete.png"]];
[[subview.subviews objectAtIndex:0] addSubview:deleteBtn];
[deleteBtn release];
}
}
}
}
- 3 回答
- 0 關注
- 665 瀏覽
添加回答
舉報