Skip to Content
COCOA學習手冊--使用OBJECTIVE-C第三版
book

COCOA學習手冊--使用OBJECTIVE-C第三版

by Paris Buttfield-Addison, Jonathon Manning
June 2013
Intermediate to advanced
360 pages
6h 50m
Chinese
GoTop Information, Inc.
Content preview from COCOA學習手冊--使用OBJECTIVE-C第三版
98
|
第六章
如果你的程式碼正執行在背景佇列上並且想要更新 GUI,你必須執行主要佇列上的 GUI
更新程式碼,要這樣做的一種方法就是為主要佇列添加 block
[newQueue addOperationWithBlock:^{
// 在背景做某事
// 在主要佇列上排程 block
[mainQueue addOperationWithBlock:^{
// GUI 工作可在這裡安全地被執行。
}];
}];
任何與 GUI 有關的工作都只能由主要佇列來完成,如果你從任何其他佇
列進行,應用程式就會當掉。
組織起來
我們現在要撰寫從多個網站非同步下載 favicon(網站圖示,即 website icon)的應用程
式,它也會在應用程式退出時與伺服器聯繫。請遵循以下步驟,建立這支新的 App
1. 建立新的單視圖應用程式。
2. 為視圖控制器添加表格視圖。
3. 把表格視圖的原型儲存格樣式(prototype cell style)改變成
Basic
4. 選取原型儲存格,將它的識別符改成
IconCell
5. 把該表格的 Selection 樣式改成
No Selection
6. 讓視圖控制器成為表格視圖的資料來源(data source)與代理(delegate)。
7. 在輔助編輯器(Assistant)裡打開
ViewController.h
,讓
ViewController
遵循
UITableViewDataSource
UITableViewDelegate
協定。
8. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

網頁互動式資料視覺化:使用D3

網頁互動式資料視覺化:使用D3

Scott Murray
深入淺出代數

深入淺出代數

Tracey Pilone, Dan Pilone
自然语言处理实战:从入门到项目实践

自然语言处理实战:从入门到项目实践

Sowmya Vajjala, Bodhisattwa Majumder, Anuj Gupta, Harshit Surana

Publisher Resources

ISBN: 9789862768136