TAILIEUCHUNG - iOS 5 Programming Cookbook phần 7

tùy chỉnh chú thích trên các bản đồ, và như vậy. Tính sẵn có của các dịch vụ vị trí phụ thuộc vào sự sẵn có của phần cứng trên thiết bị, nếu phần cứng là có, nó phải được kích hoạt và chuyển sang cho các khuôn khổ Bản đồ Kit để làm việc. Để sử dụng Core Địa điểm và khuôn khổ Kit Bản đồ, bạn cần đầu tiên thêm chúng vào dự án của bạn | withFlags NSUInteger flags if flags AVAudioSessionInterruptionFlags_ShouldResume player nil player play Discussion On an iOS device such as an iPhone a phone call could interrupt the execution of the foreground application. The audio session s associated with the application will be deactivated in that case and audio files will not be played until after the interruption is ended. In the beginning and the end of an interruption we receive delegate messages from the AVAudioPlayer informing us of the different states the audio session is passing through. After the end of an interruption we can simply resume the playback of audio. Incoming phone calls cannot be simulated with iPhone Simulator. You f must always test your applications on a real device. K I When an interruption occurs the audioPlayerBeginInterruption delegate method of an AVAudioPlayer instance will be called. Here your audio session has been deactivated. In case of a phone call the user can just hear her ring tone. When the interruption ends the phone call is finished or the user rejects the call the audioPlayerEndInterrup tion withFlags delegate method of your AVAudioPlayer will be invoked. If the with Flags parameter contains the value AVAudioSessionInterruptionFlags_ShouldResume you can immediately resume the playback of your audio player using the play instance method of AVAudioPlayer. The playback of audio files using AVAudioPlayer might show memory leaks in Instruments when the application is being run on iPhone Sim- i ulator. Testing the same application on an iOS device proves that the memory leaks are unique to the simulator not the device. I strongly suggest that you run test debug and optimize your applications on real devices before releasing them on the App Store. Recording Audio Problem You want to be able to record audio files on an iOS device. 518 Chapter 9 Audio and Video Solution Make sure you have added the framework to your target file and use the .

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.