2009-12-13 138 views
0

我可以通過SSH將應用程序部署到越獄設備。我用ldid簽名,但是當我嘗試運行時,我得到:使用PLCameraView時iPhone設備未找到設備錯誤錯誤

dyld: Symbol not found: _OBJC_CLASS_$_PLCameraController 
Referenced from: /private/var/stash/Applications.pwn/iPhoneCam.app/iPhoneCam 
Expected in: flat namespace 

Trace/BPT trap 

錯誤。我運行的代碼是;從here

回答

0

我明白了;不知何故,我需要將該對象稱爲:

objc_getClass("PLCameraController") 
0

採取

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

如果你只是需要一個 '全屏' 攝影機視圖,你可以繼承的UIImagePickerController

- (void)viewDidLoad { 
    [super viewDidLoad]; 
[self setSourceType:UIImagePickerControllerSourceTypeCamera]; 
[self setShowsCameraControls:FALSE]; 
[self.view setFrame:CGRectMake(0, 0, 320, 480)]; 
} 

從SDK3.1,您可以使用cameraOverlayView屬性來設置自定義相機UI控件。

setFrame不會使實際的相機視圖全屏 - 我不相信這是可能的真的 - 所以我想你可以離開這一點以及。