2011-04-01 58 views

回答

0

你需要編寫自己的相機應用程序。背景(至少在非越獄應用程序中)並不像您希望使用更合理的系統一樣有用。

你應該能夠抓住所有拍攝的照片,看看哪些是新的,並將它們上傳到服務器 - 它不會是一個自動過程,因爲用戶在關閉相機後需要打開你的應用程序。

0

是朋友..for這一點,你必須使用imagepicker

- (IBAction爲)getPhoto:(ID)發送{ 的UIImagePickerController *選擇器= [[的UIImagePickerController頁頭] INIT]; picker.delegate = self;

if((UIButton *) sender == getimage) { 
    picker.sourceType = UIImagePickerControllerSourceTypeSavedcamera; 
} 
[self presentModalViewController:picker animated:YES]; 

}

,並把它發送到服務器,你必須使用asihttpconnection委託。

0

如果你想使用的相機在你的應用程序,你可以使用UIImagePickerController然後進行sourceType作爲

imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; 

您還必須實現UIImagePickerControllerDelegate將爲您提供從相機拍攝的圖像。

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info 
{ 
// Some code 
}