Skip to content

Commit 6374a09

Browse files
author
敛心
committed
添加LVCamera,显示摄像头的内容,有人脸识别和拍照功能
1 parent bae6e09 commit 6374a09

File tree

8 files changed

+503
-19
lines changed

8 files changed

+503
-19
lines changed

IOS/SDK/LuaViewSDK.xcodeproj/project.pbxproj

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
224569A41F0B62DA000CDE49 /* LVCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = 224569A21F0B62DA000CDE49 /* LVCamera.h */; };
11+
224569A51F0B62DA000CDE49 /* LVCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 224569A31F0B62DA000CDE49 /* LVCamera.m */; };
1012
3C02D1D91C31106E00213386 /* LVAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C02D1D71C31106E00213386 /* LVAnimator.h */; settings = {ATTRIBUTES = (Public, ); }; };
1113
3C02D1DA1C31106E00213386 /* LVAnimator.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C02D1D81C31106E00213386 /* LVAnimator.m */; };
1214
3C98A53A1C7C0C100001508E /* LViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C98A5381C7C0C100001508E /* LViewController.h */; };
@@ -285,6 +287,8 @@
285287
/* End PBXCopyFilesBuildPhase section */
286288

287289
/* Begin PBXFileReference section */
290+
224569A21F0B62DA000CDE49 /* LVCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCamera.h; sourceTree = "<group>"; };
291+
224569A31F0B62DA000CDE49 /* LVCamera.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCamera.m; sourceTree = "<group>"; };
288292
3C02D1D71C31106E00213386 /* LVAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVAnimator.h; sourceTree = "<group>"; };
289293
3C02D1D81C31106E00213386 /* LVAnimator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVAnimator.m; sourceTree = "<group>"; };
290294
3C98A5381C7C0C100001508E /* LViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LViewController.h; path = ../LViewController.h; sourceTree = "<group>"; };
@@ -492,6 +496,15 @@
492496
/* End PBXFrameworksBuildPhase section */
493497

494498
/* Begin PBXGroup section */
499+
224569A11F0B6130000CDE49 /* camera */ = {
500+
isa = PBXGroup;
501+
children = (
502+
224569A21F0B62DA000CDE49 /* LVCamera.h */,
503+
224569A31F0B62DA000CDE49 /* LVCamera.m */,
504+
);
505+
name = camera;
506+
sourceTree = "<group>";
507+
};
495508
8418E3411A5E67FC00158125 /* LuaViewSDK */ = {
496509
isa = PBXGroup;
497510
children = (
@@ -649,29 +662,30 @@
649662
846481A51A64C61F00DE6204 /* lvsdk */ = {
650663
isa = PBXGroup;
651664
children = (
665+
91B1A4861E6E873F000F71B3 /* LuaView.h */,
666+
91B1A4811E6E871E000F71B3 /* LuaViewCore.h */,
667+
84E446961AEE0655009C9A8A /* LVBlock.h */,
668+
84E85C181C33B84B007DE3DF /* LVBundle.h */,
652669
846481AC1A64C61F00DE6204 /* LVHeads.h */,
653-
846481AD1A64C61F00DE6204 /* LVHeads.m */,
654670
840AD5311A5EAB4A0075CB58 /* LView.h */,
655-
840AD5321A5EAB4A0075CB58 /* LView.m */,
656-
91B1A4861E6E873F000F71B3 /* LuaView.h */,
671+
3C98A5381C7C0C100001508E /* LViewController.h */,
657672
91B1A4871E6E873F000F71B3 /* LuaView.m */,
658-
91B1A4811E6E871E000F71B3 /* LuaViewCore.h */,
659673
91B1A4821E6E871E000F71B3 /* LuaViewCore.m */,
660-
84E85C181C33B84B007DE3DF /* LVBundle.h */,
674+
84E446971AEE0655009C9A8A /* LVBlock.m */,
661675
84E85C191C33B84B007DE3DF /* LVBundle.m */,
662-
3C98A5381C7C0C100001508E /* LViewController.h */,
676+
846481AD1A64C61F00DE6204 /* LVHeads.m */,
677+
840AD5321A5EAB4A0075CB58 /* LView.m */,
663678
3C98A5391C7C0C100001508E /* LViewController.m */,
664-
84E446961AEE0655009C9A8A /* LVBlock.h */,
665-
84E446971AEE0655009C9A8A /* LVBlock.m */,
666-
84A52BFC1AE7985D00E464AC /* ui */,
667-
84A52C021AE7995D00E464AC /* basic */,
668-
84A52BFE1AE7988A00E464AC /* gesture */,
669-
84A52BFD1AE7986600E464AC /* net */,
670679
84A52C001AE7990B00E464AC /* audio */,
680+
84A52C021AE7995D00E464AC /* basic */,
681+
224569A11F0B6130000CDE49 /* camera */,
671682
84A52BFF1AE798A100E464AC /* file */,
683+
84A52BFE1AE7988A00E464AC /* gesture */,
672684
844317A51BC61CA000968368 /* navigation */,
673-
844317A61BC61E3900968368 /* system */,
685+
84A52BFD1AE7986600E464AC /* net */,
674686
84CF566B1AE8EC0B00A49B36 /* objectbox */,
687+
844317A61BC61E3900968368 /* system */,
688+
84A52BFC1AE7985D00E464AC /* ui */,
675689
84A52C011AE7992600E464AC /* util */,
676690
);
677691
path = lvsdk;
@@ -976,6 +990,7 @@
976990
84C1D8551C16C44B0058E974 /* LVTimer.h in Headers */,
977991
91A8CFF91E1F649F006D1609 /* LVPkgInfo.h in Headers */,
978992
9112709A1DFAC65F001F8047 /* LVEvent.h in Headers */,
993+
224569A41F0B62DA000CDE49 /* LVCamera.h in Headers */,
979994
3C98A53A1C7C0C100001508E /* LViewController.h in Headers */,
980995
84C1D8561C16C44B0058E974 /* LVStruct.h in Headers */,
981996
3CC1B5531C96B59D001DEEC0 /* LVZipArchive.h in Headers */,
@@ -1295,6 +1310,7 @@
12951310
84C1D7FA1C16C3FA0058E974 /* LVPanGesture.m in Sources */,
12961311
91F6788A1DF561D40042D6FC /* LVCanvas.m in Sources */,
12971312
84C1D7FB1C16C3FA0058E974 /* LVPinchGesture.m in Sources */,
1313+
224569A51F0B62DA000CDE49 /* LVCamera.m in Sources */,
12981314
84C1D7FC1C16C3FA0058E974 /* LVRotationGesture.m in Sources */,
12991315
91B1A4891E6E873F000F71B3 /* LuaView.m in Sources */,
13001316
84C1D7FD1C16C3FA0058E974 /* LVSwipeGesture.m in Sources */,

IOS/SDK/LuaViewSDK/Classes/LView.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#pragma mark -LuaView 类加载脚本调用接口
1313
@interface LView : LuaView
1414

15-
@property (nonatomic,assign) BOOL changeGrammar;// 是否需要语法转换(原先luaview语法和lua标准语法的区别是‘.’和':'互换了),默认是非标准语法,需要转换
16-
1715
@property (nonatomic,assign) BOOL checkDebugerServer; // 是否检查调试器
1816

1917
// 设置证书地址

IOS/SDK/LuaViewSDK/Classes/LuaViewCore.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
#import "LVCanvas.h"
6868
#import "LVEvent.h"
6969
#import "LVBitmap.h"
70+
#import "LVCamera.h"
7071

7172
@interface LuaViewCore ()
7273
@property (nonatomic,strong) id mySelf;
@@ -284,6 +285,7 @@ -(void) registeLibs{
284285
[LVExGlobalFunc class],
285286
[LVNativeObjBox class],
286287
[LVDebuger class],
288+
[LVCamera class],
287289
];
288290
self.registerClasses = arr;
289291
[self registerAllClass];
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
 * Created by LuaView.
3+
 * Copyright (c) 2017, Alibaba Group. All rights reserved.
4+
 *
5+
 * This source code is licensed under the MIT.
6+
 * For the full copyright and license information,please view the LICENSE file in the root directory of this source tree.
7+
 */
8+
9+
#import <UIKit/UIKit.h>
10+
#import "LVHeads.h"
11+
#import "LView.h"
12+
13+
14+
/*
15+
* luaview虚拟机注册的组件标准: 需要满足两个协议 LVProtocal(功能协议), LVClassProtocal(注册协议)
16+
*
17+
*
18+
*/
19+
20+
@interface LVCamera : UIView<LVProtocal, LVClassProtocal>
21+
22+
@property(nonatomic,weak) LuaViewCore* lv_luaviewCore;
23+
@property(nonatomic,assign) LVUserDataInfo* lv_userData;
24+
25+
@end

0 commit comments

Comments
 (0)