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)

}

文章地址:漫夜 » iApp自适应屏幕代码
漫夜网QQ群
扫描二维码加入QQ群,一起在线交流!
300+人已加过群
分享到: