我正在使用TTLauncherView构建视图,但是当图标摇摆时我不想要删除按钮,我该如何删除它?
答案 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
}