我想在点击tabBarItem(即特定视图加载时)时去iphone相册..为此我应该怎么做...我不知道这个...请任何人帮助我做这个......
提前感谢
答案 0 :(得分:1)
在您的应用程序中尝试以下代码并分配按钮......
的操作-(IBAction) pickImage
{
ipc = [[UIImagePickerController alloc] init];
ipc.delegate = self;
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
ipc.sourceType = UIImagePickerControllerSourceTypeCamera;
}
else {
ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
}
[self presentModalViewController:ipc animated:YES];
}
如果你用餐而不是投票给我