.

iApp自适应屏幕代码

2020/2/3 17:39:00  人气 66    iApp  

iapp内容自动适应手机屏幕大小:
swh("w",w)
swh("h",h)
s pmw=320
//你自己手机的宽
s pmh=564
//你自己手机的高
s idsj="1;2;3;4"
//所有控件id,中间用;分隔
s fg =";"
sl(idsj,fg,cs)
for(id;cs)
{
ug(id,"x",kjx)
ug(id,"y",kjy)
ug(id,"w",kjw)
ug(id,"h",kjh)
s(w*(kjx/pmw),szx)
s(h*(kjy/pmh),szy)
s(w*(kjw/pmw),szw)
s(h*(kjh/pmh),szh)
us(id,"x",szx)
us(id,"y",szy)
us(id,"w",szw)
us(id,"h",szh)
}

. 小叶子网 http://wap.xyz

发表回复

   


  通知楼主
暂无回复!
.

随机推荐

刷新 换一批