有谁知道我在哪里可以找到有关如何在Swift应用程序中录制音频的信息?我一直在看一些音频播放示例,但我似乎无法找到任何实现录音的内容.谢谢
我正在努力弄清楚如何动态地向Firebase中的List添加更多项目.截至目前,我只能在正确的firebase位置添加一个项目.用户需要能够向列表中添加更多项目.我正在为数据使用自定义模型类.我非常感谢任何帮助,谢谢.
FloatingActionButton floatSave = (FloatingActionButton) rootView.findViewById(R.id.fabSave);
floatSave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
myFirebaseRef = new Firebase("https://you.firebaseio.com/");
myFirebaseRef = new Firebase("https://you.firebaseio.com/" + "/users/" + myFirebaseRef.getAuth().getUid());
String partyname = partyName.getText().toString();
String when = fromDateEtxt.getText().toString();
String timeOf = fromTimeEtxt.getText().toString();
String userItems1 = addThisItem.getText().toString();
userItems.add(userItems1);
Map<String,Object> values = new HashMap<>();
values.put("partyname", partyname);
values.put("When", when);
values.put("timeOf", timeOf);
values.put("userItems", userItems);
myFirebaseRef.push().setValue(values);
}
});
Run Code Online (Sandbox Code Playgroud)
//这是我尝试将其他项添加到"userItems"列表的方法
final Button addItem = (Button) rootView.findViewById(R.id.buttonAddItem);
addItem.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences pref = getActivity().getSharedPreferences("MyPref", …Run Code Online (Sandbox Code Playgroud)