//定义 UIView
UIView *view =[[UIView alloc]initWithFrame:[UIScreenmainScreen].applicationFrame];
view.backgroundColor=[UIColor orangeColor];
self.view=view;
//状态显示label的初值化
label=[[UILabel alloc]initWithFrame:CGRectMake(110, 50, 120, 40)];
label.textColor=[UIColor grayColor];
label.text=@"等待录制...";
label.textAlignment=NSTextAlignmentCenter;
[self.view addSubview:label];
//定义按钮
UIButton *button=[UIButtonbuttonWithType:UIButtonTypeRoundedRect];
button.frame=CGRectMake(110, 100, 120, 40);
[button setTitle:@"开始录制" forState:UIControlStateNormal];
[button addTarget:self action:@selector(startRecoder)forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:button];
// 2
UIButton *but2=[UIButtonbuttonWithType:UIButtonTypeRoundedRect];
but2.frame=CGRectMake(110, 150, 120, 40);
[but2 setTitle:@"停止录制" forState:UIControlStateNormal];
[but2 addTarget:self action:@selector(stopRecorder)forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:but2];
// 3
UIButton *but3=[UIButtonbuttonWithType:UIButtonTypeRoundedRect];
but3.frame=CGRectMake(110, 200, 120, 40);
[but3 setTitle:@"播放录制" forState:UIControlStateNormal];
[but3 addTarget:self action:@selector(startRecoderPlay)forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:but3];
// 4
UIButton *but4=[UIButton buttonWithType:UIButtonTypeRoundedRect];
but4.frame=CGRectMake(110, 250, 120, 40);
[but4 setTitle:@"上传" forState:UIControlStateNormal];
[but4 addTarget:self action:@selector(network)forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:but4];
// 5
UIButton *but5=[UIButtonbuttonWithType:UIButtonTypeRoundedRect];
but5.frame=CGRectMake(110, 300, 120, 40);
[but5 setTitle:@"读取" forState:UIControlStateNormal];
[but5 addTarget:self action:@selector(Eduqu)forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:but5];
}