Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo tài liệu 'phát triển ứng dụng cho iphone và ipad - part 15', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Displaying Data in a Popover 109 that you will add to the user interface. Then you specify the view that will hold the popover. The permittedArrowDirections parameter allows you to specify from which direction the popover will appear with respect to the frame that you specified in the first parameter. Generally you should specify any direction as permitted and leave the layout and positioning of the popover to the UIKit framework. The permitted directions are specified using members from the UIPopoverArrowDirection enumeration. Valid direction values are UIPopoverArrowDirectionUp UIPopoverArrowDirectionDown UIPopoverArrowDirectionLeft UIPopoverArrowDirectionRight UIPopoverArrowDirectionAny UIPopoverArrowDirectionUnknown Finally the last parameter specifies whether the framework should animate the display of the popover. The last step is to clean up the infoButton and infoPopover properties in the dealloc and viewDidUnload methods O- void viewDidUnload Release any retained subviews of the main view. e.g. self.myOutlet nil Wroi.com self.popoverController nil self.firstNameTextField nil self.lastNameTextField nil self.addressTextField nil self.phoneTextField nil self.ageTextField nil self.infoButton nil self.infoPopover nil - void dealloc popoverController release toolbar release detailItem release firstNameTextField release lastNameTextField release addressTextField release phoneTextField release ageTextField release infoButton release infoPopover release super dealloc DetailViewController.m 110 I CHAPTER 4 IPAD INTERFACE ELEMENTS Now you need to add the info button to the user interface in Interface Builder. Open the DetailView.xib file in Interface Builder. Add a new UIButton next to the age UITextField. In the attributes inspector for the button change the type of the button to Info Dark. This will change the button from a rounded rectangle to a gray circle with a white letter i inside. Next wire the File s Owner infoButton property to the new button. Then wire .