我在这里阅读了很多主题,但还没有找到正确的主题。iPod 库中的文件不能播放已经解释的很好了AVAudioPlayer,但这是否意味着根本没有办法呢?
AVPlayer允许您这样做,但我的问题是您无法在后台接收远程控制事件。这是我目前阅读的内容,但奇怪的是:我在 App Store 中遇到了几个应用程序,它们允许您访问 iPod 库并在应用程序和后台播放音乐. 它不使用,MPMusicPlayerController因为它不使用音乐应用程序播放歌曲,也不会在进入后台时停止(应用程序的图标也出现在多任务栏中)。此外,一旦它在后台(播放/暂停/下一个/上一个/卷等),您就可以控制应用程序。这个应用程序的音量以某种方式与 iPod 音乐播放器的音量“同步”,我只能假设它已经注册了音量变化通知MPMusicPlayerControllerVolumeDidChangeNotification。
我的问题是: 1. 他们是如何做的,他们使用的是什么课程?如果他们正在访问 iPod 库,那么它必须是AVPlayer. 但是您不能使用AVPlayer (除了playerItemDidReachEnd)接收远程控制事件,因此它必须是AVAudioPlayer。但是您无法使用AVAudioPlayer
2播放您的 iPod 库。他们如何使用 iPod 库中的音量设置,以及他们如何保持“同步”。
该线程回答声称可以访问 iPod 库AVPlayer 并仍然接收外部事件/通知。这怎么样?他只是注册您通常会在AVAudioPlayer课堂上注册的事件吗?
对此非常困惑。希望得到一些指导。
无法解决这个问题.从我的头h2一直到h4是白色的而不是黑色.color: white;从一个甚至没有在页面上使用的类(但在样式表中)中删除时,一切似乎都有效:
.right_content_default h1,h2,h3,h4,h5,h6 {
color: white;
}
Run Code Online (Sandbox Code Playgroud)
我唯一能想到的是可能的语法问题,但我无法在样式表中找到它.
这是小提琴:jsfiddle
我有以下布局:(jsfiddle)
<!DOCTYPE HTML>
<html>
<body>
<div class="main_container">
<div class="left_container">
</div>
<div class="right_container">
</div>
</div>
</body>
</html>?
Run Code Online (Sandbox Code Playgroud)
CSS:
div.main_container {
background: #000;
border: none;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
-khtml-border-radius: 15px;
border-radius: 15px;
width: 100%;
min-height: 400px;
margin: auto;
}
div.left_container {
float:left;
position:absolute;
width: 220px;
background: red;
margin: 0;
min-height: 100%;
padding: 0;
}
div.right_container {
position: relative;
margin-left: 220px;
width: 715px;
height: 100px;
background: blue;
}
Run Code Online (Sandbox Code Playgroud)
我似乎无法让左侧(红色)容器填充主容器的高度,其中右侧容器的内容有可能增加主容器的高度(非 jQuery 解决方案)。
希望得到一些指导。
所以我想复制一个对象NSMutableArray:
self.myObject = [self.myMutableArray objectAtIndex:self.currentIndex];
Run Code Online (Sandbox Code Playgroud)
但是当currentIndex更改时,myObject对象的更改对应于新索引.
解决这个问题的最佳方法是什么?
编辑:
这或多或少是我想要实现的目标:
self.currentIndex = 0;
self.myObject = [self.myMutableArray objectAtIndex:self.currentIndex];
self.currentIndex = 1;
//After here I want myObject to remain the same, but it doesn't
Run Code Online (Sandbox Code Playgroud)