我可以通过SSH将应用程序部署到越狱设备。我用ldid签名,但是当我尝试运行它时,我得到:
dyld: Symbol not found: _OBJC_CLASS_$_PLCameraController
Referenced from: /private/var/stash/Applications.pwn/iPhoneCam.app/iPhoneCam
Expected in: flat namespace
Trace/BPT trap
错误。我运行的代码是;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after app launch
[window addSubview:viewController.view];
[window makeKeyAndVisible];
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
// Get the view for preview and start preview
PLCameraController *cam = [PLCameraController sharedInstance];
UIView *view = [cam previewView];
[cam startPreview];
// Add the preview view to window
[window addSubview:view];
// Override point for customization after app launch
[window makeKeyAndVisible];
}
取自here
答案 0 :(得分:0)
如果您只需要“全屏”相机视图,则可以将UIImagePickerController
子类化为
- (void)viewDidLoad {
[super viewDidLoad];
[self setSourceType:UIImagePickerControllerSourceTypeCamera];
[self setShowsCameraControls:FALSE];
[self.view setFrame:CGRectMake(0, 0, 320, 480)];
}
从SDK3.1开始,您可以使用cameraOverlayView
属性设置自定义相机UI控件。
setFrame
并没有使实际的相机视图全屏显示 - 我不相信这可能是真的 - 所以我想你也可以把它留下来。
答案 1 :(得分:0)
我明白了;不知何故,我需要将对象称为:
objc_getClass("PLCameraController")