獲取iPhone各個版本螢幕大小

2021-07-11 09:00:43 字數 2513 閱讀 4043

ios的開發現在在螢幕的適配上比較麻煩,下面就來了解下各個iphone的螢幕大小,獲取螢幕大小和狀態列的**如下:

//整個螢幕的大小

cgrect rc = [[uiscreen mainscreen] bounds];

nslog(@"bounds x = %f, y = %f, width = %f, height = %f", rc.origin.x, rc.origin.y, rc.size.width, rc.size.height);

//可用區域的大小

//狀態列的大小

nslog(@"statusbarframe x = %f, y = %f, width = %f, height = %f", barrc.origin.x, barrc.origin.y, barrc.size.width, barrc.size.height);

現在就就將主流的iphone手機螢幕列印出來

iphone 4s   320x480    3.5『

2016-04-22 10:25:56.437  bounds x = 0.000000, y = 0.000000, width = 320.000000, height = 480.000000

2016-04-22 10:25:56.438 statusbarframe x = 0.000000, y = 0.000000, width = 320.000000, height = 20.000000

iphone 5   320x568    4.0』

2016-04-22 10:43:18.905  bounds x = 0.000000, y = 0.000000, width = 320.000000, height = 568.000000

2016-04-22 10:43:18.906 statusbarframe x = 0.000000, y = 0.000000, width = 320.000000, height = 20.000000

iphone 5s   320x568   4.0『

2016-04-22 10:45:06.661  bounds x = 0.000000, y = 0.000000, width = 320.000000, height = 568.000000

2016-04-22 10:45:06.662 statusbarframe x = 0.000000, y = 0.000000, width = 320.000000, height = 20.000000

iphone 6   375x667   4.7』

2016-04-22 10:47:22.315  bounds x = 0.000000, y = 0.000000, width = 375.000000, height = 667.000000

2016-04-22 10:47:22.316 statusbarframe x = 0.000000, y = 0.000000, width = 375.000000, height = 20.000000

iphone 6 plus   414x736   5.5『

2016-04-22 10:48:46.672  bounds x = 0.000000, y = 0.000000, width = 414.000000, height = 736.000000

2016-04-22 10:48:46.673 statusbarframe x = 0.000000, y = 0.000000, width = 414.000000, height = 20.000000

iphone 6s   375x667   4.7』

2016-04-22 10:50:55.777  bounds x = 0.000000, y = 0.000000, width = 375.000000, height = 667.000000

2016-04-22 10:50:55.778 statusbarframe x = 0.000000, y = 0.000000, width = 375.000000, height = 20.000000

iphone 6s plus   414x736   5.5『

2016-04-22 10:52:15.132 bounds x = 0.000000, y = 0.000000, width = 414.000000, height = 736.000000

2016-04-22 10:52:15.133 statusbarframe x = 0.000000, y = 0.000000, width = 414.000000, height = 20.000000

全面屏iphone 適配

禁止頁面縮放,輸入框聚焦縮放 content yes name name viewport content width device width,initial scale 1.0,maximum scale 1.0,minimum scale 1.0,viewport fit cover,user...

Linux各個版本介紹

之前一直在各個 linux redhat 系列 目前許多高手都使用它,長相一般但卻很強悍,一般是linux debian 系列 debian 系列,包括debian和ubuntu等。debian是社群類linux的典範,是迄今為止最遵循gnu規範的linux系統。debian最早由ian murdo...

解釋 Alpha,Beta,RC,OEM各個版本

alpha 是內部測試版,一般不向外部發布,會有很多bug.一般只有測試人員使用。beta 也是測試版,這個階段的版本會一直加入新的功能。在alpha版之後推出。rc release candidate 顧名思義麼 用在軟體上就是候選版本。系統平台上就是發行候選版本。rc版不會再加入新的功能了,主要...