2015-10-14 69 views

回答

2

让我们假设你的分享按钮是在左边的按钮阵列中。在该方法中:

- (void)swipeableTableViewCell:(SWTableViewCell *)cell scrollingToState:(SWCellState)state 
{ 
    //case:left buttons opened  
    UIButton *shareButton = leftButtonsArray[theIndexOfTheShareButton]; 
    shareButton.enabled = NO; 
} 
1

@karthikeyan您可以通过下面的代码隐藏在tableview中特定行按钮:

- (void)updateRightUtilityButtons:(NSArray *)rightUtilityButtons WithButtonWidth:(CGFloat) width { 
_rightUtilityButtons = rightUtilityButtons; 

[self.rightUtilityButtonsView updateUtilityButtons:rightUtilityButtons WithButtonWidth:width]; 

[self.rightUtilityButtonsView layoutIfNeeded]; 
[self layoutIfNeeded]; 
} 

添加/更新此方法SWTableViewCell.m类,其中rightUtilityButtons是你需要显示按钮的数组特定的行。

在情况下,如果要仅禁用用户交互,同时添加按钮进入阵列就可以实现,仅通过shareButton.userInteration = NO禁用该按钮的用户交互,然后添加到数组中,然后将数组传递到以上定义的方法。通过这个,你可以确定这个按钮被禁用。

但请提供您已经工作的示例代码,以便可以直接更新您的代码。

如果你仍然没有得到恢复,我会直接在这里给你工作代码。

+0

谢谢..我用LoVo做了这个回答 – karthikeyan

+0

酷,快乐编码:) –