Đang chuẩn bị liên kết để tải về tài liệu:
Lập trình Wrox Professional Xcode 3 cho Mac OS part 35
Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Có một giới hạn khi thực hiện các kết nối nhanh chóng từ ca cao đối tượng Touch. Khi bạn tạo một kết nối hành động, hành động luôn luôn kết nối với Touch Up Bên trong sự kiện. Nói cách khác, bạn không thể sử dụng kết nối nhanh chóng để chọn cả hai trường hợp để kết nối đến và thông báo các hành động để gửi. | Custom Classes 269 When you release the mouse button a menu appears with every outlet and action connection that s possible between those two objects. Select the outlet or action and the connection is complete. Hobbies Chasing cars on foot. Poety. Zombie Name Cell Phone Zombified Bob 1 480 55S-1212 O O O FriendViewController.xib I B M uu I O 5 View Mode Inspector Search Field Name Type File s Owner FriendViewController rst Responder UlResponder _ lew UlView __ View UlView September 10 FIGURE 13-38 There s a limitation when making quick connections from Cocoa Touch objects. When you create an action connection the action is always connected to the Touch Up Inside event. In other words you can t use a quick connection to select both the event to connect to and the action message to send. Use the pop-up connections panel if you need to connect an action to some event other than Touch Up Inside. The real power of connections and actions emerges when you define your own outlets and action messages. This is explained in the next section. CUSTOM CLASSES Interface Builder would only be mildly useful if all it could do was create configure and connect instances of the predefined framework objects found in the library palette. The power of Interface Builder explodes when you can define your own classes outlets and actions and then use Interface Builder to create instances of your custom objects configure them and then connect them just like any other nib document object. Using Interface Builder you can Add instances of your custom classes to a nib document. Define outlets in your custom classes that will be recognized by Interface Builder. Define action methods in your custom classes that will be recognized by Interface Builder. Interface Builder recognizes when a nib document belongs to an open Xcode project. It then interfaces with Xcode to extract information about your class definitions and incorporate that into the document. It does this quickly quietly and .