I used AVAudioRecorder to record the voice.I found that a red bar (just like the bar when you calling in background) will appear under the status bar sometimes when I alloc
You can't do that. Every app, including the stock Voice Memos app, will have the bar when it uses the microphone.