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

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

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

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

這里主要用到了以下函數(shù)

  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.

相應(yīng)的,向模擬器里添加圖片的話,可使用這個函數(shù)

  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.

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

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

責(zé)任編輯:zhaolei 來源: CocoaChina
相關(guān)推薦

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應(yīng)用商店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-06-21 15:39:59

Windows Pho

2009-09-17 09:11:59

CCNA實(shí)驗(yàn)?zāi)M器CCNA
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號

主站蜘蛛池模板: 国产在线观看 | 欧美日韩在线免费观看 | 精品欧美一区二区三区久久久 | 欧美无乱码久久久免费午夜一区 | 伊色综合久久之综合久久 | 精品综合网| 成人亚洲性情网站www在线观看 | 久久99久久久久 | 99国内精品久久久久久久 | 噜噜噜噜狠狠狠7777视频 | 91视频大全 | 99精品亚洲国产精品久久不卡 | 国产九九精品视频 | 福利视频三区 | 日韩一区二区三区av | 欧美视频三区 | 午夜一区二区三区视频 | 欧美a级成人淫片免费看 | 亚洲在线 | 国产精品免费小视频 | 逼逼网| 欧美综合在线视频 | 久久亚洲高清 | 国产精品国产精品 | 天天操天天操 | 九九在线 | 亚洲精品在线免费看 | 久久国产欧美日韩精品 | 久久一级| 欧美一级毛片免费观看 | 亚洲欧美在线免费观看 | 国产9久 | 亚洲天堂中文字幕 | 日本中文字幕视频 | 国产精品大全 | 久久精品91 | 羞羞视频网站免费看 | 中文字幕99| av黄色网 | 亚洲高清视频在线观看 | 中文字幕一区二区三区日韩精品 |