iphone-common-codes-ccteam源代码 CCSound.m
2012-01-05 14:34
531 查看
// // CCSound.m // CCFC // // Created by xichen on 12-1-3. // Copyright 2012 ccteam. All rights reserved. // #import "CCSound.h" #import <MediaPlayer/MediaPlayer.h> @implementation CCSound // add a volume changed observer event // the selector will be only called when the ipod player is playing and the current application is active + (void)addVolumeChangeObserver:(id)observer sel:(SEL)sel { MPMusicPlayerController *musicPlayer = [MPMusicPlayerController iPodMusicPlayer]; [musicPlayer beginGeneratingPlaybackNotifications]; [[NSNotificationCenter defaultCenter] addObserver:observer selector:sel name:MPMusicPlayerControllerVolumeDidChangeNotification object:musicPlayer]; } @end
可能有更新:
googlecode链接地址:http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCSound.m
github地址: https://github.com/cxsjabc/iphone-common-codes-ccteam/tree/master/CCFC/files/CCSound.m
相关文章推荐
- iphone-common-codes-ccteam源代码 CCSound.h
- iphone-common-codes-ccteam源代码 CCAudio.h
- iphone-common-codes-ccteam源代码 CCContact.h
- iphone-common-codes-ccteam源代码 CCMemory.h
- iphone-common-codes-ccteam源代码 CCNSNumber.h
- iphone-common-codes-ccteam源代码 CCPhoto.h
- iphone-common-codes-ccteam源代码 CCUIBarButtonItem.h
- iphone-common-codes-ccteam源代码 CCAudio.mm
- iphone-common-codes-ccteam源代码 CCContact.m
- iphone-common-codes-ccteam源代码 CCMail.h
- iphone-common-codes-ccteam源代码 CCMemory.m
- iphone-common-codes-ccteam源代码 CCNSNumber.m
- iphone-common-codes-ccteam源代码 CCPhoto.m
- iphone-common-codes-ccteam源代码 CCRadix.h
- iphone-common-codes-ccteam源代码 CCSqlite3.h
- iphone-common-codes-ccteam源代码 CCUIBarButtonItem.m
- iphone-common-codes-ccteam源代码 CCUIDevice.h
- iphone-common-codes-ccteam源代码 CCAutoDisappearView.h
- iphone-common-codes-ccteam源代码 CCDebug.h
- iphone-common-codes-ccteam源代码 CCEmoji.h