Ios7 iAction在theos编译时出错

Ios7 iAction在theos编译时出错,ios7,hook,cydia,tweak,theos,Ios7,Hook,Cydia,Tweak,Theos,我是Objective-C编程新手,我想对iOS.app的VLC做一个简单的调整,但我无法编译。 这是我的密码: #import <UIKit/UIKit.h> %hook VLCMovieViewController -(IBAction)playPause { if([_mediaPlayer isPlaying]) { UIAlertView *pause = [[UIAlertView alloc] initWithTitle:@"PAUSED"

我是Objective-C编程新手,我想对iOS.app的VLC做一个简单的调整,但我无法编译。 这是我的密码:

#import <UIKit/UIKit.h>

%hook VLCMovieViewController

-(IBAction)playPause
{
    if([_mediaPlayer isPlaying]) {
        UIAlertView *pause = [[UIAlertView alloc] initWithTitle:@"PAUSED" message:@"Your movie is paused" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK !", nil];
        [_listPlayer pause];
        [pause show];
        [pause release];
    }
    else
    {
        UIAlertView *play = [[UIAlertView alloc] initWithTitle:@"PLAYING" message:@"Your movie is playing" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK !", nil];
        [_listPlayer play];
        [play show];
        [play release];
    }
}

%end
#导入
%钩子VLCM移动控制器
-(iAction)播放暂停
{
如果([\u mediaPlayer显示]){
UIAlertView*pause=[[UIAlertView alloc]initWithTitle:@“暂停”消息:@“您的电影已暂停”代理:无取消按钮:无其他按钮:无确定,无];
[u listPlayer暂停];
[暂停表演];
[暂停释放];
}
其他的
{
UIAlertView*播放=[[UIAlertView alloc]initWithTitle:@“播放”消息:@“正在播放您的电影”代理:无取消按钮:无其他按钮:@“确定!”,无];
[_listplayerplay];
[戏剧表演];
[播放释放];
}
}
%结束
我在代码中没有发现任何错误,但当我尝试编译时,theos会返回一个错误:

Preprocessing Tweak.xm...
Compiling Tweak.xm...
Tweak.xm:6:8: error: expected unqualified-id
static IBAction (*_logos_orig$_ungrouped$VLCMovieViewController$playPause)(VLCMovieViewController*, SEL); s...
       ^
<built-in :24:22: note: expanded from here
#define IBAction void)__attribute__((ibaction)
                     ^
1 error generated.
make[2]: *** [obj/Tweak.xm.708dff35.o] Error 1
make[1]: *** [internal-library-all_] Error 2
make: *** [VLCTweak.all.tweak.variables] Error 2
预处理Tweak.xm。。。
正在编译Tweak.xm。。。
Tweak.xm:6:8:错误:应为非限定id
静态iAction(*\u logos\u orig$\u ungroup$vlcmoviewcontroller$playPause)(vlcmoviewcontroller*,SEL);s
^

您不需要将iAction与Theos一起使用,因为您不需要使用Interface Builder。 iAction只是告诉Xcode和Interface Builder将UI元素链接到代码的一种方式。 将-(iAction)播放暂停替换为-(void)播放暂停应该有效