原创 Understanding Linux /proc/id/maps

Understanding Linux /proc/id/maps   Each row in /proc/$PID/maps describes a region of contiguous virtual memory in a

原创 linux 內存回收機制 轉

linux 內存回收機制 轉 內存是Linux內核所管理的最重要的資源之一,內存管理系統是操作系統中最爲重要的部分。對於Linux的初學者來說,熟悉Linux的內存管理非常重要。進程是運行於虛擬地址空間的一個 程序。可以說,任何在Lin

原创 objective-c 關於 self 的用法總結

何時使用self.在網上搜索或者論壇裏的回覆大多都是簡簡單單的說這與objc的存取方法有關,如何與存取方式有關究竟他們之間的是什麼樣的關係就很少有同學回答了。下面以代碼來說明問題: 創建一個Student類,繼承NSObject

原创 iOS開發教程:Storyboard全解析-第一部分

http://www.dasheyin.com/ios_kai_fa_jiao_cheng_storyboard_quan_jie_xi_-_di_yi_bu_fen.html 故事版(Storyboard)是一個能夠節省你很多設計手

原创 Tutorial: iOS 6 Auto Layout versus Springs and Struts - Part 2 of 3

Tutorial: iOS 6 Auto Layout versus Springs and Struts - Part 2 of 3 This tutorial is an excerpt from our book series i

原创 Tutorial: iOS 6 Auto Layout versus Springs and Struts - Part 3 of 3

Tutorial: iOS 6 Auto Layout versus Springs and Struts - Part 3 of 3 This tutorial is an excerpt from our book series i

原创 Beginning ARC in iOS 5 Tutorial Part 1

http://www.raywenderlich.com/5677/beginning-arc-in-ios-5-part-1 Ray Wenderlich RAYWENDERLICH Tutorials for iP

原创 ios 前後攝像頭翻轉動畫

create flip animation like rotate animation in native camera app      CATransition *animation = [CATransition animatio

原创 Tutorial: iOS 6 Auto Layout versus Springs and Struts - Part 1 of 3

This tutorial is an excerpt from our book series iOS App Development for Non-Programmers, available in the iBookStore 

原创 【轉】self.myOutlet=nil、viewDidUnload、dealloc的本質剖析

對於iphone開發人員來說,內存管理是極爲重要的技巧,哪怕程序的功能再強大,設計再漂亮,如果內存控制不好,也難逃程序莫名退出的噩運,這與網頁開發是完全不同的。 內存控制裏面有很多門道,在這裏分析一下 viewDidUnload 和 d

原创 iOS5 ARC,IBOutlets 應該定義strong還是weak

寫這篇文章的緣由,是因爲我泡在stackoverflow上翻帖子,看到一個名爲Should IBOutlets be strong or weak under ARC? 的帖子很熱,而我對被採納爲標準答案的回答也有一些話要補充,我想對

原创 What happens if I don't retain IBOutlet?

在iphone中,只要控件使用IBOutlet連接 ,則必須release它。無論它是否有 @property(nonatomic,assign), @property(nonatomic,retain) 屬性。 原因如下:

原创 Objective-C and retain/release of returned objects

Objective-C and retain/release of returned objects I am new to Objective-C, so this might be a dumb question. I ca

原创 iOS設計模式(02):單例模式

singleton-design-pattern 什麼是單例模式? 單例模式是一個類在系統中只有一個實例對象。通過全局的一個入口點對這個實例對象進行訪問。在iOS開發中,單例模式是非常有用的一種設計模式。如下圖,是一個單例模式的UM

原创 Should IBOutlets be strong or weak under ARC?

I am developing exclusively for iOS 5 using ARC. Should IBOutlets to UIViews (and subclasses) bestrong or weak? Th