1.如何快速的查看一段代碼的執(zhí)行時(shí)間。
#define TICK NSDate *startTime = [NSDate date]
#define TOCK NSLog(@"Time: %f", -[startTime timeIntervalSinceNow])
在想要查看執(zhí)行時(shí)間的代碼的地方進(jìn)行這么處理
TICK
//do your work here
TOCK
2.如何快速查看一個(gè)函數(shù)的調(diào)用次數(shù),且不添加一句代碼。 如下圖

這種方法適合于一個(gè)if方法,一個(gè)for循環(huán),而且不會(huì)中斷程序,切不需要加一句代碼。但是一定要記得選中下面的automatically continue after evaluting actions;
3.在使用view的縮放的時(shí)候,layer.border.width隨著view的放大,會(huì)出現(xiàn)鋸齒化的問(wèn)題,解決這個(gè)問(wèn)題需要設(shè)置這個(gè)屬性。
self.layer.allowsEdgeAntialiasing = YES;
4.instrument中time profile 中的self, #self,%self各代表什么 ?

下面引用了一下網(wǎng)上的具體內(nèi)容
Self is "The number of times the symbol calls itself." according to the Apple Docs on the Time Profiler.
From the way the numbers look though, it seems self is the summed duration of samples that had this symbol at the bottom of its stack trace. That would make:
self: the number of samples where this symbol was at the bottom of the stack trace
% self: the percent of self samples relative to total samples of currently displayed call tree
(eg - #self / total samples).
So this wouldn't tell you how many times a method was called. But it would give you an idea how much time is spent in a method or lower in the call tree.
6.如何快速添加一個(gè)全局異常斷點(diǎn),(一步頂三步)。和添加一個(gè)symbloic斷點(diǎn),(一步還是頂三步)添加一個(gè)斷點(diǎn)不使用鼠標(biāo)

看到圖了吧,加這些斷點(diǎn)完全不需要?jiǎng)右幌率髽?biāo)(恕我吹牛B了),加單獨(dú)斷點(diǎn)的時(shí)候動(dòng)了下鼠標(biāo),但那是我故意讓你們看到我是有鼠標(biāo)的。
- 首先
All Exception斷點(diǎn)是我們很常用的,這個(gè)我是這樣用一個(gè)快捷鍵做到的!通過(guò)改鍵command +p為加異常斷點(diǎn)的,要說(shuō)怎么改,翻我以前博客去! - 然后加symbloic的快捷鍵為
commnamd + option + \ - 加一個(gè)單獨(dú)一行斷點(diǎn)的快捷鍵為
command + \
好吧,就說(shuō)這些吧,最近準(zhǔn)備把xVim搞熟練,什么鼠標(biāo),觸摸板統(tǒng)統(tǒng)都走開(kāi)!