2014-10-01 95 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