PLCameraController is not adding in viewcontroller
- by sujyanarayan
Hi,
I've declared PLCameraContoller instance in my AppDelegate class as:-
self.cameraController = [PLCameraController performSelector:@selector(sharedInstance)];[cameraController setDelegate:self];
And I'm accessing it in one of my viewcontroller class as:-
del = [[UIApplication sharedApplication] delegate];
UIView previewView = [del.cameraController performSelector:@selector(previewView)];
previewView.frame = CGRectMake(0,0, 320, 480);
self.view = previewView;
[del.cameraController performSelector:@selector(startPreview)];
[del.cameraController performSelector:@selector(setCameraMode:) withObject:(NSNumber)1];
Where "del" is an instance of my AppDelegate class.
But i can see only black background in my viewcontroller view in iphone device.
Also if i remove "self" from the appdelegate.m code of cameracontroller it also showing blank.
How can i get camera in my view controller?
I'm pretty much struggling with it.
Thanks in Adv.