成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

iPhone開發(fā) 在模擬器中添加視頻

移動開發(fā) iOS
本文介紹的是iPhone開發(fā) 在模擬器中添加視頻,很有趣的一個小實例,具體實現結果,我們一起來看內容。

iPhone開發(fā) 在模擬器中添加視頻是本文要介紹對內容,要把視頻添加進模擬器,真機上的 iTunes 同步法是沒用的。CocoaChina 會員“castielyue”分享了他的視頻添加工程,把 video 放在 resource 里,把 viewdidload 里的 video 名改下,運行后就會自動添加到模擬器的相片庫里。附件下載 SaveVideo.zip (1068 K)

這里主要用到了以下函數

  1. UIVideoAtPathIsCompatibleWithSavedPhotosAlbum  
  2.  
  3. Returns a Boolean value indicating whether the specified video can be saved to user’s Saved Photos album.  
  4.  
  5. BOOL UIVideoAtPathIsCompatibleWithSavedPhotosAlbum (  
  6.    NSString *videoPath  
  7. ); 

Parameters

videoPath

The filesystem path to the movie file you want to save.

Return Value

YES if the video can be saved to the photo album or NO if it cannot.

Discussion

Not all devices are able to play video files placed in the user’s Saved Photos album. So, before attempting to save videos to the user’s camera roll, you should call this function to ensure that saving the video is supported for the current device.

相應的,向模擬器里添加圖片的話,可使用這個函數

  1. UIImageWriteToSavedPhotosAlbum  
  2. Adds the specified image to the user’s Saved Photos album.  
  3. void UIImageWriteToSavedPhotosAlbum (  
  4.    UIImage *image,  
  5.    id completionTarget,  
  6.    SEL completionSelector,  
  7.    void *contextInfo  
  8. ); 

Parameters

image

The image to write to the user’s device.

completionTarget

The object whose selector should be called after the image has been written to the user’s device.

completionSelector

The method selector, of the target object, to call. This optional method should be of the form:

  1. - (void) image: (UIImage *) image  
  2.     didFinishSavingWithError: (NSError *) error  
  3.     contextInfo: (void *) contextInfo; 

contextInfo

An optional pointer to any context-specific data that you want passed to the completion selector.

Discussion

The use of the completionTarget, completionSelector, and contextInfo parameters is optional and necessary only if you want to be notified asynchronously when the function finishes writing the image to the user’s Saved Photos album. If you do not want to be notified, pass nil for these parameters.

小結:iPhone開發(fā) 在模擬器中添加視頻的內容介紹完了,希望本文對你有所幫助!

本文來自:http://www.cocoachina.com/iphonedev/sdk/2010/1229/2520.html

責任編輯:zhaolei 來源: CocoaChina
相關推薦

2011-07-26 09:32:08

iPhone 模擬器

2009-08-20 10:55:59

2011-07-27 17:45:29

iPhone 模擬器 圖片

2022-12-30 14:21:54

2011-09-13 17:23:26

2011-06-07 16:58:42

Android 模擬器

2013-07-04 13:29:40

Androidgenymotion

2009-09-14 09:59:19

CCNA模擬器介紹CCNA

2011-08-18 17:32:55

iPhone開發(fā)Table Cell

2009-08-05 15:23:04

ExtJS Andro

2011-07-06 13:33:41

iPhone 模擬器 XCode

2010-04-12 17:32:59

Windows Pho

2011-07-26 14:18:20

2009-09-04 16:05:08

2011-05-31 09:16:26

Android Mar應用商店Google

2011-07-22 16:22:27

iPhone Lipo 模擬器

2011-08-10 15:58:58

iPhone視頻

2011-08-16 18:56:11

iPhone開發(fā)Three20

2010-01-27 13:37:15

2009-09-17 09:11:59

CCNA實驗模擬器CCNA
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 欧美日日 | 日本精品一区二区三区在线观看视频 | 精品啪啪| 亚洲成人999 | 久久久国产亚洲精品 | 农村黄性色生活片 | 美女逼网站 | 中文字幕视频免费 | 国产91在线播放 | 黑人巨大精品 | 美女视频黄的免费 | 99久久国产综合精品麻豆 | 欧美日韩精品久久久免费观看 | 欧美日韩精品久久久免费观看 | 国产成人99久久亚洲综合精品 | www.久久久| 国产亚洲精品综合一区 | 亚洲激情在线观看 | 久久国产精品视频 | 亚洲视频免费 | 三级免费 | 久久国产秒 | 中文字幕一区二区三 | 国产色片 | 午夜久久久 | 欧美一a一片一级一片 | 亚洲福利在线视频 | 国产福利视频在线观看 | 国产91在线精品 | 欧美黄色一区 | 国产二区av| 四季久久免费一区二区三区四区 | 午夜免费视频 | 浮生影院免费观看中文版 | 国产区一区二区三区 | 国产一级毛片视频 | 午夜在线电影网 | 日本成人午夜影院 | 中文字幕在线观看一区 | 国产精品视频一 | 91看片网|