2014-09-14 2 views
0

삭제 버튼의 알파 값을 점차 증가 시키려면 셀 내부에서 스 와이프 이벤트를 처리하고 싶습니다.왼쪽으로 스 와이프하는 동안 UITableViewCell 삭제 단추 애니메이션을 처리하는 방법?

I 이렇게 싶은 :

while swiping

end swiping

를 버튼 '알파 증가 편집 왼쪽 통해 셀 와이프하면서이 화상에서 볼 수있다. 마지막으로 1.0으로 설정됩니다. 기본 빨간색 삭제 버튼을 사용하여 스 와이 핑 할 때 증가하는 알파를 어떻게 구현할 수 있습니까? 참고 : iOS 6/7에서 셀 내부에있는 삭제 버튼을 처리하기 위해 Bradens' answer을 따라갔습니다.

답변

1

SWTableViewCell을 사용해보고 사용자가 스 와이프 할 때 알파 값을 변경하십시오.

- (NSArray *)rightButtons 
{ 
    NSMutableArray *rightUtilityButtons = [NSMutableArray new]; 
    [rightUtilityButtons sw_addUtilityButtonWithColor: 
    [UIColor colorWithRed:0.78f green:0.78f blue:0.8f alpha:1.0] 
              title:@"More"]; 
    [rightUtilityButtons sw_addUtilityButtonWithColor: 
    [UIColor colorWithRed:1.0f green:0.231f blue:0.188 alpha:1.0f] 
              title:@"Delete"]; 

    return rightUtilityButtons; 
} 

내 생각 엔 설정하고

- (void)swipeableTableViewCell:(SWTableViewCell *)cell scrollingToState:(SWCellState)state 

P.S에서 알파를 재설정하는 것, 내가 전에이 라이브러리를 시도하지 않았다.

관련 문제