TAILIEUCHUNG - Lập trình Wrox Professional Xcode 3 cho Mac OS part 18

Các mã gấp băng xuất hiện giữa các rãnh và văn bản. Độ sâu của các khối trong văn bản của bạn là vẽ đồ thị bằng cách sử dụng tỷ lệ hao hụt của màu xám, các, sẫm màu hơn các ribbon sâu hơn các văn bản trong dòng đó là lồng nhau. Di con trỏ lên các điều khiển ribbon trình bày sự sụp đổ của khối văn bản đó bắt đầu trên dòng đó. | 134 CHAPTER 7 SYNTAX-AWARE EDITING CODE FOLDING Code folding highlights blocks of structured text and allows them to be collapsed or folded so that you can concentrate on the higher-level structure of your code. Code folding is supported in all C-like languages C Objective-C Java and XML as shown in Figure 7-5. To see and use code folding you must have the Show Code Folding Ribbon option turned on in the Text Editing pane of the Xcode Preferences. FIGURE 7-5 800 . 0 XMLxml CD 1 1 XMLxml i No selected symbol t - T T CT Q ô 25 3 findNextMinimumO t - - Q a 12 int findNextMinimumC int min int numbers J int arraySize s 13 14 15 16 17 int i int nextMin -1 for i 0 i arraySize i int n numbers i IS 19 20 21 22 T if n min J if n nextMin nextMin -l nextMin n 23 24 25 return nextMin À 7 The code folding ribbon appears between the gutter and the text. The depth of the blocks in your text is graphed using gradations of grey the darker the ribbon the deeper the text in that line is nested. Hovering your cursor over the ribbon presents collapse controls for the block of text that begins on that line. Code Focus Code focus highlights a block of text in the editor making it easier to see what the block encompasses as shown in the bottom window in Figure 7-5. Code focus appears when you hover your cursor over the code folding ribbon. Uncheck the Code Focus option in the preferences to disable this behavior. If you find code focus really useful even temporarily and are tired of moving your cursor over the code folding ribbon you can have code focus follow your current text selection by choosing View Code Folding Focus Follows Selection Control Option Command F . Now the code focus animation will continuously highlight the block containing the current selection or insertion point. Invoke the command a second time to toggle the feature off again. Download at Code Folding 135 Folding Code You have four ways to fold a block of code listed in the following table. .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.