iphone5適配 有以下集中種思路

iphone5適配 有以下集中種思路ios

1:利用自身的autoresize 加上代碼實現git

2:寫兩套xibgithub

3:利用ios5+ 以上的autolayoutiphone

前兩種方式應用比較普遍 ,由於畢竟國內還有部分應用ios4.3的用戶ide

下面給第二種方式應用下的部分代碼ui

- (id)init
{

    NSString    *clssName = NSStringFromClass([selfclass]);
    NSString    *xibName = is4InchScreen() ?[NSString stringWithFormat:@"%@_4inch", clssName] : clssName;
    self = [super initWithNibName:xibName bundle:nil];
    if (self) {}
    returnself;

}

W 本站文章若是沒有特殊說明,均爲原創,轉載請以連接方式註明本文地址: http://hufeng825.github.com/2013/08/29/ios6/
相關文章
相關標籤/搜索