ios - 如何在 iOS 的弹出窗口中打开相机胶卷?

标签 ios objective-c cocoa-touch imessage camera-roll

我开发了一个消息应用,想在类似iMessage应用的弹窗中打开一个相册界面: enter image description here

我怎样才能实现这个功能?

最佳答案

希望这对你有用

//初始化图像选择器并添加到弹出 Controller

  UIImagePickerController* imagePickerController= [[UIImagePickerController alloc] init];   
    imagePickerController.delegate=self;    
    imagePickerController.sourceType= UIImagePickerControllerSourceTypePhotoLibrary; 
popoverController= [[UIPopoverController alloc] initWithContentViewController:imagePickerController];
   [popoverController presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];

关于ios - 如何在 iOS 的弹出窗口中打开相机胶卷?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17446509/

相关文章:

iphone - dealloc,使用 release 或设置为 nil 属性?

iphone - 网络推送通知

ios - Objective C 到 Swift 的转换(协议(protocol))

ios - 为什么 UIColor.white、red、green 和 blue 不工作,但所有其他颜色常量都工作正常?

ios - Jenkins - 命令行构建 iOS 项目

objective-c - 在导航栏中创建副标题

ios - 如何解析 NSArray 以仅获取每个数组条目的一部分?

ios - ARC 不允许将 'BOOL'(又名 'bool')隐式转换为 'id'

objective-c - 什么描述了 NSNumberFormatter -maximumSignificantDigits?

ios - 我想使用 swift 添加标签或文本,如下图所示