rexis.cn

一张相片 一段故事

在iphone app中添加音量控制条

without comments

1. 添加MediaPlayer.framework
2. #import <MediaPlayer/MPVolumeView.h>
3. 代码

	MPVolumeView *volumeView = [[[MPVolumeView alloc]  initWithFrame:CGRectMake(18, 380, 284, 23)] autorelease];
	volumeView.center = CGPointMake(160,380);
	[volumeView sizeToFit];
	[self.view addSubview:volumeView];

Written by 北

七月 2nd, 2010 at 12:25 下午

Posted in iphone开发

Tagged with , ,

Leave a Reply