天天看點

[Beginning iOS 7 Development] Outlets

Think of an outlet as a pointer that points to an object within the user interface. For example, suppose you created a text label in Interface Builder (as we did in Chapter 2) and wanted to change the label’s text from within your code. By declaring an outlet and connecting that outlet to the label object, you would then be able to use the outlet from within your code to change the text displayed by the label. 

Outlet是可以了解為一個指向UI中得一個對象的指針。舉例來說,你在Interface Builder界面建立了一個text label,并且你想通過代碼來改變label。通過聲明一個outlet并且連接配接outlet和label,你就可以修改代碼,通過outlet來改變label的顯示。

  更多精彩請關注微信公衆号:兔販子

[Beginning iOS 7 Development] Outlets
iOS