Iphone 当摄像头出现在ZBar SDK中时,是否可以放置一个方括号作为焦点?
我正试图在ZBAR SDK的摄像头视图中放置一个图像作为焦点的方括号?有人能帮我做些什么吗?谢谢您可以设置摄像头屏幕覆盖以设置cameraOverlayView属性。根据您的要求设计视图并将其指定给:Iphone 当摄像头出现在ZBar SDK中时,是否可以放置一个方括号作为焦点?,iphone,zbar-sdk,Iphone,Zbar Sdk,我正试图在ZBAR SDK的摄像头视图中放置一个图像作为焦点的方括号?有人能帮我做些什么吗?谢谢您可以设置摄像头屏幕覆盖以设置cameraOverlayView属性。根据您的要求设计视图并将其指定给: reader.cameraOverlayView = [self CommomOverlay]; -(UIView *)CommomOverlay{ UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,480)]
reader.cameraOverlayView = [self CommomOverlay];
-(UIView *)CommomOverlay{
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,480)];
UIImageView *TopBar = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,58)];
[TopBar setImage:[UIImage imageNamed:@"topbar.png"]];
[view addSubview:TopBar];
UILabel *Toplabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 9, 300, 30)];
[Toplabel setFont:[UIFont fontWithName:@"Arial-BoldMT" size:11]];
[Toplabel setTextAlignment:UITextAlignmentCenter];
[Toplabel setBackgroundColor:[UIColor clearColor]];
[Toplabel setTextColor:[UIColor colorWithRed:76/255.0 green:76/255.0 blue:76/255.0 alpha:1.0]];
[Toplabel setNumberOfLines:1];
[Toplabel setText:@"Scan now "];
[TopBar addSubview:Toplabel];
UIImageView *FrameImg = [[UIImageView alloc] initWithFrame:CGRectMake(60,150,193,170)];
[FrameImg setImage:[UIImage imageNamed:@"frame.png"]];
[view addSubview:FrameImg];
return view;
}
阿维纳什是对的,我想指出你的文档,你只需要使用UIView,它可以有任何图像,并使用它作为覆盖;我以前做过这件事,但是很抱歉我没有代码,如果仍然需要的话,我可以很快发布