iOS:add snapshot view

This commit is contained in:
pengfei.zhou
2021-07-14 14:22:58 +08:00
committed by osborn
parent 66d6c7de76
commit 4c7eb36565
7 changed files with 89 additions and 8 deletions

View File

@@ -27,7 +27,7 @@
#import "DoricDevViewController.h"
#import "QRScanViewController.h"
#import "DoricDebugDriver.h"
#import "DoricRegistry.h"
#import "DoricSnapshotView.h"
@interface DoricContextCell : UITableViewCell
@property(nonatomic, strong) UILabel *tvId;
@@ -121,7 +121,10 @@ - (void)onClick {
}
if ([DoricRegistry isEnableRenderSnapshot]) {
UIAlertAction *snapshot = [UIAlertAction actionWithTitle:@"Snapshot" style:UIAlertActionStyleDefault handler:^(UIAlertAction *_) {
DoricSnapshotView *doricSnapshotView = [DoricSnapshotView new];
doricSnapshotView.top = 50;
[self.doricContext.vc.view addSubview:doricSnapshotView];
[self.vc.navigationController popViewControllerAnimated:NO];
}];
[alertController addAction:snapshot];
}