回答編集履歴
4
修正
answer
CHANGED
@@ -13,4 +13,5 @@
|
|
13
13
|
open func setCategory(_ category: String) throws
|
14
14
|
```
|
15
15
|
|
16
|
-
参考URL: [Apple API Reference](https://developer.apple.com/reference/avfoundation/avaudiosessioncategoryplayandrecord)
|
16
|
+
参考URL: [Apple API Reference](https://developer.apple.com/reference/avfoundation/avaudiosessioncategoryplayandrecord)
|
17
|
+
[Audio Session Categories](https://developer.apple.com/reference/avfoundation/avaudiosession/1669963-audio_session_categories)
|
3
修正
answer
CHANGED
@@ -11,4 +11,6 @@
|
|
11
11
|
```swift
|
12
12
|
/* set session category */
|
13
13
|
open func setCategory(_ category: String) throws
|
14
|
-
```
|
14
|
+
```
|
15
|
+
|
16
|
+
参考URL: [Apple API Reference](https://developer.apple.com/reference/avfoundation/avaudiosessioncategoryplayandrecord)
|
2
修正
answer
CHANGED
@@ -5,4 +5,10 @@
|
|
5
5
|
```swift
|
6
6
|
/* Use this category when recording and playing back audio. */
|
7
7
|
public let AVAudioSessionCategoryPlayAndRecord: String
|
8
|
+
```
|
9
|
+
`setCategory`メソッドの定義を見ると引数は文字列(`String`)なのでそこからも分かります。
|
10
|
+
|
11
|
+
```swift
|
12
|
+
/* set session category */
|
13
|
+
open func setCategory(_ category: String) throws
|
8
14
|
```
|
1
修正
answer
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
`AVAudioSessionCategoryPlayAndRecord`の上にカーソルを持っていき⌘(コマンド)を押しながらクリックしてみてください、定義に飛べます。
|
2
2
|
|
3
|
-
そこでは`AVAudioSessionCategoryPlayAndRecord`は`String`のプロパティとしてあります。
|
3
|
+
そこでは`AVAudioSessionCategoryPlayAndRecord`は`String型`のプロパティとしてあります。
|
4
4
|
|
5
5
|
```swift
|
6
6
|
/* Use this category when recording and playing back audio. */
|