1
11 2014-08-30 03:19:50 +08:00
咕~~(╯﹏╰)b 地址呢。。
|
2
fofoone OP |
3
fofoone OP |
4
qq2511296 2014-08-30 09:01:58 +08:00
已fork 挺不错的说 没有真机 只能模拟器上跑 模拟器好像不支持锁屏后台播放和锁屏歌词滚动
锁屏歌词滚动的实现原理是什么? |
5
eato 2014-08-30 10:22:58 +08:00 1
DouBanApi 里的是豆瓣的用户名和密码吗?
|
7
fofoone OP @qq2511296
先通过notify_register_check("com.apple.iokit.hid.displayStatus", &token); 获取屏幕是否点亮。 在锁屏点亮的时候就在 封面上绘制歌词,然后每次更新歌词就通过 MPNowPlayingInfoCenter 的setNowPlayingInfo 更新锁屏封面。 |
8
Hysteria 2014-08-30 15:10:58 +08:00
赞一个!
|
11
parkman 2014-09-06 10:00:36 +08:00
|
12
parkman 2014-09-06 10:17:36 +08:00
FIX , SD新版本要改下代码
|
13
parkman 2014-09-06 10:18:01 +08:00
[self.cover setImageWithURL:[NSURL URLWithString:track.picture] placeholderImage:nil options:SDWebImageRefreshCached];
__weak typeof(self) weakSelf = self; //[self.cover sd_setImageWithURL:[NSURL URLWithString:track.picture] placeholderImage:nil options:SDWebImageRefreshCached completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) [self.cover setImageWithURL:[NSURL URLWithString:track.picture] placeholderImage:nil options:SDWebImageRefreshCached completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType) { CGImageRef imgRef = image.CGImage; CGFloat width = CGImageGetWidth(imgRef); CGFloat height = CGImageGetHeight(imgRef); CGAffineTransform transform = CGAffineTransformIdentity; CGRect bounds = CGRectMake(0, 0, width, height); CGFloat scaleRatio = 1; transform = CGAffineTransformMakeTranslation(0.0, height); transform = CGAffineTransformScale(transform, 1.0, -1.0); UIGraphicsBeginImageContext(bounds.size); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextScaleCTM(context, scaleRatio, -scaleRatio); CGContextTranslateCTM(context, 0, -height); CGContextConcatCTM(context, transform); CGContextDrawImage(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, width, height), imgRef); UIImage *imageCopy = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); weakSelf.bgcover.image = imageCopy; }]; |
14
siri 2014-09-30 18:56:27 +08:00
lz求认识~
|