TAILIEUCHUNG - iOS 5 Programming Cookbook phần 9

Bằng cách phân bổ và khởi tạo một đối tượng của loại EKEventStore, bạn có thể truy cập các loại khác nhau của lịch có sẵn trên một thiết bị IOS. iOS hỗ trợ các định dạng lịch phổ biến như CalDAV và Exchange. Tài sản lịch của một thể hiện của | Calendar 2 Type Local Calendar 2 Color UIDeviceRGBColorSpace 1 Calendar 2 can be modified. Calendar 3 Title Calendar Calendar 3 Type CalDAV Calendar 3 Color UIDeviceRGBColorSpace 1 Calendar 3 can be modified. Calendar 4 Title Home Calendar 4 Type CalDAV Calendar 4 Color UIDeviceRGBColorSpace 1 Calendar 4 can be modified. Calendar 5 Title Work Calendar 5 Type CalDAV Calendar 5 Color UIDeviceRGBColorSpace 0 1 Calendar 5 can be modified. Calendar 6 Title Calendar 6 Type CalDAV Calendar 6 Color UIDeviceRGBColorSpace 1 Calendar 6 can be modified. Discussion By allocating and initializing an object of type EKEventStore you can access different types of calendars that are available on an iOS device. iOS supports common calendar formats such as CalDAV and Exchange. The calendars property of an instance of EKEventStore is of type NSArray and contains the array of calendars that are on an iOS device. Each object in this array is of type EKCalendar and each calendar has properties that allow us to determine whether for instance we can insert new events into that calendar. As we will see in Recipe a calendar object allows modifications only if its allowsContentModifications property has a YES value. You can use the colorWithCGColor instance method of UIColor to retrieve an object of type UIColor from CGColorRef. See Also Recipe Adding Events to Calendars Problem You would like to be able to create new events in users calendars. 696 Chapter 14 Dates Calendars and Events Solution Find the calendar you want to insert your event into please refer to Recipe . Create an object of type EKEvent using the eventWithEventStore class method of EKEvent and save the event into the user s calendar using the saveEvent span error instance method of EKEventStore - BOOL createEventWithTitle NSString paramTitle startDate NSDate .

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.