2014-10-01 82 views
-2

我需要一点帮助,在我的应用程序中获取Facetime登录视图。任何人都可以帮忙吗?在钛表面像时间看钛?

我附上了一个截图作为参考。如果我只能知道如何使背景模糊并利用前置摄像头,那会很棒。其余的我可以设计。

事情是这样的: enter image description here

我基本上想知道如何获得cameraView在页面的背景和可能删除任何相机的动作,如捕获。我应该使用多个窗口,请问第一个窗口是不透明的cameraView?

这是我迄今为止尝试过..

$.container.open(); 

openFrontCamera(); 

function openFrontCamera() { 
Ti.Media.showCamera({ 
    autohide : false, 
    overlay : $.viewHello, 
}); 
} 

function switchCamera() { //onclick from a button 
    var currentCamera = Ti.Media.CAMERA_REAR; 
    Ti.API.info(currentCamera); 
    if (currentCamera === Ti.Media.CAMERA_REAR) { 
    currentCamera = Ti.Media.CAMERA_FRONT; 
    } 
    Ti.Media.switchCamera(currentCamera); 
    Ti.API.info(currentCamera); 
} 

我能够打开摄像头,但它打开后。我希望它在发布时打开前置摄像头。当我尝试添加一个按钮,当onClick,我得到前置摄像头时,它工作。

谢谢!

+0

开放前置摄像头覆盖http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.Media-method-showCamera,通过给予'opacity'属性放置一个半透明视图的视图,并在视图中添加所需的标签和文本字段。 – Swanand 2014-10-01 10:22:10

回答

0

背景只是一个在Photoshop等照片编辑软件中创建的图像。 (这里是一个示例教程:http://www.wikihow.com/Blur-the-Background-of-a-Digital-Image)。您创建图像并将其添加到您的项目,并将其设置为windows/view backgroundImage属性。

显示使用钛SDK中的前置摄像头,见问答&一个位置:http://developer.appcelerator.com/question/117091/how-can-i-open-front-camera-of-iphone4-directly-with-out-opening-back-camera-first

GUI的所有剩下的只是标签,文本框和按钮 - 与希望的设计属性。

+1

没有背景不只是一个图像。 – 0101 2014-10-01 10:13:37

+0

那是什么?也许解释? – developer82 2014-10-01 10:15:03

+0

你不能只设置一个模糊的透明图像。这个效果必须适用于每一帧。所以@Viraj_kp应该使用一些模块,例如https://github.com/benbahrenburg/Ti.BlurView或https://github.com/artanisdesign/TiUIVisualEffectView但是我不确定它是否会在Ti中正常工作(因为性能)。 – 0101 2014-10-01 10:23:38