Quantcast
Channel: 睿论坛 - 最新话题
Viewing all articles
Browse latest Browse all 5703

Hook 的时候找不到.h头文件,请大神门指点

$
0
0

@RyanQinqhw wrote:

> Making all for tweak cntv_hook…

==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (arm64)…
Tweak.xm:3:9: fatal error: ‘UIViewController.h’ file not found
#import “UIViewController.h”
^
1 error generated.
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>

#import “HomeViewController.h”
%hook HomeViewController

  • (void)viewDidAppear:(BOOL)animated{
    %orig;
    //[super viewDidAppear:animated];
    UIAlertController *alertVC=[UIAlertController alertControllerWithTitle:@"" message:@“测试” preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *acttion1=[UIAlertAction actionWithTitle:@“取消” style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {

              }];
              [alertVC addAction:acttion1];
    
              [self presentViewController:alertVC animated:YES completion:nil];
    

}

%end

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5703

Trending Articles