【问题标题】:Image capture using iphone and go to the next view without showing the first view使用 iphone 拍摄图像并转到下一个视图而不显示第一个视图
【发布时间】:2011-10-13 08:46:17
【问题描述】:

我需要制作一个应用程序,在我看来,有一个用于在 iphone 中使用相机拍照的按钮。在没有来到 firstview 的情况下拍照后转到下一个视图,我需要在 uiimageview 中显示该图片。我知道如何使用相机拍照并将其显示在第一个视图的 Uiimageview 中。

Firstview->拍照按钮->secondview->uimageview带图片

【问题讨论】:

  • 你还在等什么?

标签: iphone objective-c ipad ios4 iphone-sdk-3.0


【解决方案1】:

我有同样的情况,试试这样

当按钮单击时 - 使用 Animated:NO 推送 SecondViewController 然后

在您的 viewDidAPpear 中调用 Camera 类 - 然后在完成后,在 Imagepickercontroller 的 didfinishpickimage 委托中设置 imageview 的图像。

希望这有效!

【讨论】:

    【解决方案2】:

    你可以这样做

    在imagePicker的委托方法didFinishPickingMedia中

    获取 UIImage 对象

    然后

    SecondViewController *second = [[SecondViewController alloc] initWithNibName:@"SecondViewController"];
    [self.navigationController pushViewController:second animated:YES];
    //imageView is an IBOutlet UIImageView object and should be created using properties in SecondViewController you know what I mean (@property,@synthesize)
    second.imageView.image = image; //you got using imagePicker
    [second release];
    

    就是这样

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-06
      • 2010-11-15
      相关资源
      最近更新 更多