我正在开发一个允许图像捕获但不是视频捕获的应用程序,但我无法弄清楚如何从UIImagePickerView中删除照片/视频切换.这是我正在使用的代码,取自Apple的文档:
UIImagePickerController *cameraUI = [[UIImagePickerController alloc] init];
cameraUI.sourceType = UIImagePickerControllerSourceTypeCamera;
// Displays a control that allows the user to choose picture or
// movie capture, if both are available:
cameraUI.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType: UIImagePickerControllerSourceTypeCamera];
// Hides the controls for moving & scaling pictures, or for
// trimming movies. To instead show the controls, use YES.
cameraUI.allowsEditing = NO;
cameraUI.delegate = self;
[self presentModalViewController:cameraUI animated:YES];
Run Code Online (Sandbox Code Playgroud)
除了照片/视频开关外,我想保留所有相机控制.谢谢!
我在我的 iPhone 应用程序中使用适用于 iOS 的 Google Analytics SDK。它可以很好地跟踪“页面”,但我还需要跟踪页面标题,因为它们现在在我的报告中显示为“(未设置)”。我认为这是为网站自动完成的,但我不知道如何在应用程序中执行此操作。
对 Google Analytics SDK 的调用是:
[[GANTracker sharedTracker] trackPageview:@"myPage" withError:&error]
其中“myPage”显示为页面名称,但没有页面标题。有谁知道如何做到这一点?也许是自定义变量之类的?