0

我正在尝试集成到 MJPopupViewAnimation,以便我的应用程序中的一些页面。但似乎您不能在超过 1 个文件中定义函数。我得到的错误是:

枚举器“MJPopupViewAnimationFade”的重新定义 枚举器“MJPopupViewAnimationSlideBottomTop”的重新定义 枚举器“MJPopupViewAnimationSlideBottomBottom”的重新定义

等等...

有人可以解释为什么我不能在超过 1 页中使用它吗?

/大卫

4

1 回答 1

0

I'm not familiar with MJPopupViewAnimation, but copy-pasting the code into your app in multiple places is not the best thing to do (you can probably make it work, but it's not ideal).

As per the instructions on GitHub, you should:

  1. Add the MJPopupViewController source files to your project
  2. In the files where you wish to use the animation, import the category:

#import "UIViewController+MJPopupViewController.h"

Then you can go ahead and use the animations:

[self presentPopupViewController:detailViewController animationType:MJPopupViewAnimationFade];
[self dismissPopupViewControllerWithanimationType:MJPopupViewAnimationFade];
于 2013-03-25T19:13:45.173 回答