From 66d6c7de764aa7ad3e9c2e8ecce5118773025246 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Wed, 14 Jul 2021 14:07:25 +0800 Subject: [PATCH] iOS:add float view --- .../Devkit/Classes/DoricDevViewController.m | 6 +++++ doric-iOS/Devkit/Classes/DoricFloatView.h | 24 ++++++++++++++++++ doric-iOS/Devkit/Classes/DoricFloatView.m | 25 +++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 doric-iOS/Devkit/Classes/DoricFloatView.h create mode 100644 doric-iOS/Devkit/Classes/DoricFloatView.m diff --git a/doric-iOS/Devkit/Classes/DoricDevViewController.m b/doric-iOS/Devkit/Classes/DoricDevViewController.m index fae3f46b..9424b611 100644 --- a/doric-iOS/Devkit/Classes/DoricDevViewController.m +++ b/doric-iOS/Devkit/Classes/DoricDevViewController.m @@ -119,6 +119,12 @@ - (void)onClick { [alertController addAction:startDebugging]; } } + if ([DoricRegistry isEnableRenderSnapshot]) { + UIAlertAction *snapshot = [UIAlertAction actionWithTitle:@"Snapshot" style:UIAlertActionStyleDefault handler:^(UIAlertAction *_) { + + }]; + [alertController addAction:snapshot]; + } [self.vc presentViewController:alertController animated:true completion:nil]; } diff --git a/doric-iOS/Devkit/Classes/DoricFloatView.h b/doric-iOS/Devkit/Classes/DoricFloatView.h new file mode 100644 index 00000000..b4fdc682 --- /dev/null +++ b/doric-iOS/Devkit/Classes/DoricFloatView.h @@ -0,0 +1,24 @@ +/* + * Copyright [2019] [Doric.Pub] + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// +// Created by pengfei.zhou on 2021/7/14. +// + +#import + + +@interface DoricFloatView : NSObject +@end \ No newline at end of file diff --git a/doric-iOS/Devkit/Classes/DoricFloatView.m b/doric-iOS/Devkit/Classes/DoricFloatView.m new file mode 100644 index 00000000..fbe35b56 --- /dev/null +++ b/doric-iOS/Devkit/Classes/DoricFloatView.m @@ -0,0 +1,25 @@ +/* + * Copyright [2019] [Doric.Pub] + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// +// Created by pengfei.zhou on 2021/7/14. +// + +#import "DoricFloatView.h" + + +@implementation DoricFloatView + +@end \ No newline at end of file