8000 Merge branch 'feature/chengxi/luaview5.5.1' into 'develop' · pythonzz/LuaViewSDK@9574a44 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9574a44

Browse files
author
城西
committed
Merge branch 'feature/chengxi/luaview5.5.1' into 'develop'
回复clipsToBounds接口 See merge request !37
2 parents 9b9f62a + 3d09a42 commit 9574a44

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

IOS/LuaViewSDK/Classes/lvsdk/LVBaseView.m

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,23 +1007,23 @@ static int borderDash (lv_State *L) {
10071007
}
10081008

10091009
#pragma -mark clipsToBounds
1010-
//static int clipsToBounds(lv_State *L) {
1011-
// LVUserDataView * user = (LVUserDataView *)lv_touserdata(L, 1);
1012-
// if( user ){
1013-
// UIView* view = (__bridge UIView *)(user->view);
1014-
// if( view ){
1015-
// if( lv_gettop(L)>=2 ) {
1016-
// BOOL yes = lvL_checkbool(L, 2);
1017-
// view.clipsToBounds = yes;
1018-
// return 0;
1019-
// } else {
1020-
// lv_pushnumber(L, view.clipsToBounds );
1021-
// return 1;
1022-
// }
1023-
// }
1024-
// }
1025-
// return 0;
1026-
//}
1010+
static int clipsToBounds(lv_State *L) {
1011+
LVUserDataInfo * user = (LVUserDataInfo *)lv_touserdata(L, 1);
1012+
if( user ){
1013+
UIView* view = (__bridge UIView *)(user->object);
1014+
if( view ){
1015+
if( lv_gettop(L)>=2 ) {
1016+
BOOL yes = lvL_checkbool(L, 2);
1017+
view.clipsToBounds = yes;
1018+
return 0;
1019+
} else {
1020+
lv_pushnumber(L, view.clipsToBounds );
1021+
return 1;
1022+
}
1023+
}
1024+
}
1025+
return 0;
1026+
}
10271027

10281028
static int adjustSize(lv_State *L) {
10291029
LVUserDataInfo * user = (LVUserDataInfo *)lv_touserdata(L, 1);
@@ -1539,6 +1539,7 @@ static int invalidate (lv_State *L) {
15391539
{"isShow", isShow },
15401540

15411541
{"enabled", userInteractionEnabled },
1542+
{"clipsToBounds", clipsToBounds },
15421543

15431544
{"backgroundColor", backgroundColor },
15441545

0 commit comments

Comments
 (0)
0