1. 真機聯調的抓包方法
打開殭屍進程
給標準庫函數打斷點
耗時計算
用開發者工具模擬弱網絡
給一個UIView打上紅框
void showBorderColor(UIView* view,UIColor *color)
{
NSLog(@"********** view's frame = %@ **********",NSStringFromCGRect(view.frame));
view.layer.borderWidth =1;
view.layer.borderColor = color.CGColor;
}
void showBorder(UIView* view)
{
qz_showBorderColor(view, [UIColorredColor]);
}
讓程序不斷的執行內存警告來測試 UI的穩定性
通過timer來執行私有函數_performMemoryWarning
[[UIApplication sharedApplication]performSelector:@selector(_performMemoryWarning) withObject:nil];
小心XCODE索引吃掉你的內存
如果XCODE過於慢,內存嚴重超標,可能就需要清理一下index(XCODE被自動爲工程建立以關聯代碼)
模擬器
command + H 顯示桌面
alt + 鼠標左邊 點擊 可以模擬雙指滑動