gpt4 book ai didi

iphone - 像垃圾桶动画这样的解决方案

转载 作者:可可西里 更新时间:2023-11-01 05:06:52 26 4
gpt4 key购买 nike

我想将未记录的垃圾桶动画放入我的程序中。电话方法是:

+ (void)animateToolbarItemIndex:(unsigned)index duration:(double)duration target:(id)target didFinishSelector:(SEL)selector;

谁能知道我应该插入什么:

  • 索引
  • 持续时间
  • 目标
  • 选择器?

我的试验不工作导致错误:

2011-11-15 16:05:20.639 CNiPhone[973:707] +[UIToolbar animateToolbarItemIndex:duration:target:didFinishSelector:]: unrecognized selector sent to class 0x3f019c08
2011-11-15 16:05:20.641 CNiPhone[973:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIToolbar animateToolbarItemIndex:duration:target:didFinishSelector:]: unrecognized selector sent to class 0x3f019c08'

相关代码如下:

@interface UIToolbar (privateMethods2)

+ (void)animateToolbarItemIndex:(unsigned)index duration:(double)duration target:(id)target didFinishSelector:(SEL)selector;

@end

[UIToolbar animateToolbarItemIndex:0 duration:0.5 target:trashToolbarButton didFinishSelector:@selector(animateTrashStep2)];
[UIToolbar commitAnimations];

- (void) animateTrashStep2 {
}

最佳答案

您不需要为此做任何未记录的事情,只需创建一个自定义 UIButton。下载UIKit Artwork Extractor并且您会找到垃圾桶动画的帧,以及 UIBarButtonItem 背景。

关于iphone - 像垃圾桶动画这样的解决方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8143867/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com