如何在特定视图加载时访问 iPhone 相册?

发布于 2024-10-07 21:04:48 字数 96 浏览 0 评论 0原文

我想在单击 tabBarItem 时进入 iphone 相册(即在加载特定视图时)..为此我应该做什么...我对此不知道..请任何人帮助我这样做...

提前谢谢您

I want to go to iphone photo album at the time of clicking the tabBarItem(that is at the time of particular view loading)..For this what should i do...I have no idea about this..please anyone help me out to do this...

Thank You in Advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初见终念 2024-10-14 21:04:48

尝试在您的应用程序中执行以下代码并执行该按钮的操作......

-(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];

}

如果您吃饭而不是投票给我

Try folloing code in ur application and assing action that button......

-(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];

}

if u dine than vote me

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文