Google的自定义搜索API每天最多可限制100次查询.这远远低于我的预期.我想将这个图稿搜索功能添加到我的应用程序中.非常感谢.
我将我的应用程序上传到App Store,然后在iTunes Connect中创建了它.
我刚刚上传了我的512x512px图标,然后我打开了版本摘要页面来验证我的信息......
我有一套只有光泽效果的图标.在版本摘要页面中,我看到添加了自动光泽的512x512px图标.
有办法防止这种情况吗?我的大应用程序图标必须没有光泽......
在我的info.plist中我添加了"Icon已包含光泽效果"这一行,我选中了它旁边的框...
谁能帮我?
我正在尝试在ImageView中显示本地存储的.MP3轨道的专辑图片.有谁知道如何在Swift中获取这件艺术品才能实现这一目标?
我找到了这个解决方案(iOS AVFoundation:如何从mp3文件中获取图片?)但是代码是用Objective C编写的.我只是想抓住我的MP3中嵌入的图像并将其显示在我的ImageView中.
我已经查看了MPMediaItemArtwork的API文档,并找到了一个示例,它也完成了我在Objective C中要完成的任务(http://www.codeitive.com/0zHjkUjUWX/not-able-to-get -the-uiimage-from-mpmediaitempropertyartwork.html)但无法提出解决方案.我的代码如下:
import UIKit
import AVFoundation
import MediaPlayer
class ViewController: UIViewController {
let audioPath:NSURL! = NSBundle.mainBundle().URLForResource("SippinOnFire", withExtension: "mp3")
@IBOutlet var artistImage: UIImageView!
@IBOutlet var trackLabel: UILabel!
@IBOutlet var artistLabel: UILabel!
@IBOutlet var sliderValue: UISlider!
var player:AVAudioPlayer = AVAudioPlayer()
@IBAction func play(sender: AnyObject) {
let audioInfo = MPNowPlayingInfoCenter.defaultCenter()
println(audioInfo)
player.play()
//println("Playing \(audioPath)")
let playerItem = AVPlayerItem(URL: audioPath)
let metadataList = playerItem.asset.metadata as! [AVMetadataItem]
for item in metadataList {
if let stringValue = …Run Code Online (Sandbox Code Playgroud) 我一直试图弄清楚如何使用脚本桥获取当前播放歌曲的iTunes艺术作品.我已经达到了适用于某些歌曲的程度,但对于其他人来说,我得到了一个SIGABRT.我不确定问题是什么,所以任何帮助都将不胜感激.这是我到目前为止:
iTunesApplication * iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"];
NSImage *songArtwork;
iTunesTrack *current = [iTunes currentTrack];
iTunesArtwork *artwork = (iTunesArtwork *)[[[current artworks] get] lastObject];
if(artwork != nil)
songArtwork = [artwork data];
else
songArtwork = [NSImage imageNamed:@"Image.tiff"];
NSMenuItem *artworkMenuItem = [[NSMenuItem alloc] initWithTitle:@"" action:NULL keyEquivalent:@""];
[songArtwork setSize:NSMakeSize(128, 128)];
[artworkMenuItem setImage:songArtwork];
[Menu insertItem:artworkMenuItem atIndex:0];
Run Code Online (Sandbox Code Playgroud)
我可以使用一些歌曲,并在菜单项中很好地显示艺术作品,但对于其他人我在线上获得了一个SIGABRT:
[songArtwork setSize:NSMakeSize(128, 128)];
Run Code Online (Sandbox Code Playgroud)
控制台的输出如下:
2011-08-12 23:13:20.094 SongViewer[2146:707] -[NSAppleEventDescriptor setSize:]: unrecognized selector sent to instance 0x102827f70
2011-08-12 23:13:20.095 SongViewer[2146:707] An uncaught exception was raised
2011-08-12 23:13:20.096 SongViewer[2146:707] -[NSAppleEventDescriptor setSize:]: unrecognized …Run Code Online (Sandbox Code Playgroud) 在UIImage"图像"始终是空的("零"),虽然盖在苹果公司的音乐应用程序中.在iOS 7中,它运行良好,但在iOS 8中我没有封面.
我的代码有什么问题,或者iOS 8中有什么变化?
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
AlbumCell *cell = [tableView dequeueReusableCellWithIdentifier:@"AlbumCell"];
MPMediaItemCollection *song = self.songsList[indexPath.row];
cell.albumName.text = [[song representativeItem] valueForProperty: MPMediaItemPropertyAlbumTitle];
cell.albumArtist.text = [[song representativeItem] valueForProperty:MPMediaItemPropertyAlbumArtist];
CGSize artworkImageViewSize = CGSizeMake(100, 100);
MPMediaItemArtwork *artwork = [song valueForProperty:MPMediaItemPropertyArtwork];
UIImage *image = [artwork imageWithSize:artworkImageViewSize];
NSLog(@"-------------------");
NSLog(@"%@",[[song representativeItem] valueForProperty: MPMediaItemPropertyAlbumTitle]);
NSLog(@"%@",image);
if (artwork) {
cell.cover.image = image;
}
else
{
cell.cover.image = [UIImage imageNamed:@"nocover.png"];
}
return cell;
}
Run Code Online (Sandbox Code Playgroud) 我发现设置MPNowPlayingInfoCenter的MPMediaItemArtwork的所有方法都使用本地图像.MPMediaItemArtwork*albumArt = [[MPMediaItemArtwork alloc] initWithImage:[UIImage imageNamed:@"myimage"];
但我需要从imageURL设置它
目前我用这个......
UIImage *artworkImage = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:self.currentTrack.imageUrl]]];
MPMediaItemArtwork *albumArt = [[MPMediaItemArtwork alloc] initWithImage: artworkImage];
[self.payingInfoCenter setValue:albumArt forKey:MPMediaItemPropertyArtwork];
Run Code Online (Sandbox Code Playgroud)
任何的想法?
objective-c artwork mpmediaitem avplayer mpnowplayinginfocenter
I'm trying to make a script to pull the artwork of the currently playing track and write it to a file. I've checked out a few guides but none of them seem to work, any tips?
tell application "iTunes"
write artwork 1 to "path:to:desktop" of type("JPEG")
end tell
Run Code Online (Sandbox Code Playgroud)
To be honest I've no idea what I'm doing. Anyone feeling helpful?
Thanks
我想知道是否有一种直接的方式来显示我的音乐播放器正在播放的当前正在播放的MP3文件的图像和标题.我的代码如下,对于这个例子非常简单.我只想使用我在项目中包含的一个.MP3进行测试.
class ViewController: UIViewController {
let audioPath:NSURL! = NSBundle.mainBundle().URLForResource("SippinOnFire", withExtension: "mp3")
@IBOutlet var sliderValue: UISlider!
var player:AVAudioPlayer = AVAudioPlayer()
@IBAction func play(sender: AnyObject) {
player.play()
//println("Playing \(audioPath)")
}
@IBAction func pause(sender: AnyObject) {
player.pause()
}
@IBAction func stop(sender: AnyObject) {
player.stop()
player.currentTime = 0;
}
@IBAction func sliderChanged(sender: AnyObject) {
player.volume = sliderValue.value
}
override func viewDidLoad() {
super.viewDidLoad()
var error:NSError? = nil
player = AVAudioPlayer(contentsOfURL: audioPath!, error: &error)
player.volume = 0.5;
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose …Run Code Online (Sandbox Code Playgroud) id3 标签中封面/专辑封面的字段名称是什么?
例如。:
标题:标题 - TT2 - TIT2
艺术家:艺术家 - TP1 - TPE1
专辑 : 专辑 - TAL - TALB
覆盖: ?- ? - ?
我希望有人可以帮助我...
提前谢谢!
我的应用程序将是iOS5 +并且仅支持iPhone 4+,因此它需要处理的唯一屏幕将是视网膜显示器.
我是否仍然需要使用两套艺术品,或者我可以坚持使用@ 2x艺术品.
我在 MP3 文件中写入图稿时遇到问题。我可以使用 Taglib-sharp 读取并显示 MP3 文件内的所有插图,但是当需要在 MP3 标签中插入超过 1 张图片(例如:封面和封底)时,我遇到了问题.如果这只是一件艺术品...我可以做到有人可以请我扔骨头,并告诉我如何做吗?(vb.net 会很棒,但 C# 也能做到这一点)。
又一个请求...并删除 mp3 标签内的图像?有人可以给我一个关于如何做到这一点的例子吗?
感谢您的帮助
artwork ×11
ios ×3
id3-tag ×2
itunes ×2
mpmediaitem ×2
objective-c ×2
swift ×2
.net ×1
app-store ×1
applescript ×1
assets ×1
audio ×1
audio-player ×1
avplayer ×1
cover ×1
icons ×1
id3 ×1
id3v2 ×1
iphone ×1
media-player ×1
null ×1
taglib-sharp ×1