TTLauncherView删除删除按钮

时间:2011-10-26 09:11:05

标签: ios iphone cocoa-touch button ttlauncherview

我正在使用TTLauncherView构建视图,但是当图标摇摆时我不想要删除按钮,我该如何删除它?

2 个答案:

答案 0 :(得分:1)

我刚才找到了解决方案,只需更改- (void)beginEditing方法中的内容:

- (void)beginEditing {
  _editing = YES;
  _scrollView.delaysContentTouches = YES;

  UIView* prompt = [self viewWithTag:kPromptTag];
  [prompt removeFromSuperview];

  for (NSArray* buttonPage in _buttons) {
    for (TTLauncherButton* button in buttonPage) {
      button.editing = YES;
        button.closeButton.hidden = TRUE;
    }
  }

答案 1 :(得分:0)

点击图标时会切换此行为。如果您根本不想要摆动,只需覆盖以下方法:

- (void)buttonTouchedDown:(TTLauncherButton*)button withEvent:(UIEvent*)event {
    /// Do something what should happen
}