TAILIEUCHUNG - Presence 3 Doll/Cannistraro - Presence - Part 3

Assignment Last week, we continued making progress on our Presence application, adding table views and fetching live data with web services. However, you may have noticed that because we were performing our Twitter API requests and image downloads on the main thread, there were stalls and hangs in the user interface. Additionally, working on a read-only Twitter client is only fun for so long- we want an application that allows us to update our own online “presence” as well. | CS193P Spring 2009 Presence 3 Doll Cannistraro Presence - Part 3 Due Date This assignment is due by 11 59 PM on Tuesday May 12. Assignment Last week we continued making progress on our Presence application adding table views and fetching live data with web services. However you may have noticed that because we were performing our Twitter API requests and image downloads on the main thread there were stalls and hangs in the user interface. Additionally working on a read-only Twitter client is only fun for so long- we want an application that allows us to update our own online presence as well. This week we ll employ multithreading in our application to avoid those hangs and we ll use text input in a modally presented view controller to update our own status. Here are the requirements for Part 3 1. When you make a Twitter API requests do it without blocking the main UI thread. You can either use NSThread directly or the more convenient NSOperation and NSOperationQueue classes. While you re fetching the timeline data indicate loading progress in your user interface. Make sure to call back to the main thread to update your UI when complete. Remember UIKit views must be accessed on the main thread 2. Last week you added code to fetch an image for each user by calling NSData and Ullmage methods on the main thread. Like the Twitter API request we don t want this to hang our app. Create a subclass of NSOperation that downloads a single image. Then manage the image downloads with an NSOperationQueue in your person list controller. The queue should not allow more than one image download at a time. You ll need some mechanism for passing the loaded image back to the main thread and triggering its display. 3. It s time to update our own Twitter status using Presence as well. Display a button on the right side of the navigation bar when the person list controller is visible you may need to refer back to a previous lecture . When this button is pressed present a new view .

Đã 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.