偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

Objective-C 截圖實(shí)現(xiàn)

移動(dòng)開(kāi)發(fā) iOS
本文為大家呈現(xiàn)了一個(gè)Objective-C的截圖實(shí)現(xiàn)的方法,希望大家能夠加以利用。

截取整個(gè)屏幕大小:

  1. UIGraphicsBeginImageContext(self.view.bounds.size); 
  2.         [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; 
  3.         UIImage * viewImage = UIGraphicsGetImageFromCurrentImageContext(); 
  4.         UIGraphicsEndImageContext(); 
  5.         UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil) 

截取自定義大?。?/p>

  1. UIGraphicsBeginImageContext(_attributedLabel.frame.size); 
  2.         [_attributedLabel.layer renderInContext:UIGraphicsGetCurrentContext()]; 
  3.         UIImage * viewImage = UIGraphicsGetImageFromCurrentImageContext(); 
  4.         UIGraphicsEndImageContext(); 
  5.         UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil); 

項(xiàng)目需要導(dǎo)入QuartzCore.framework

責(zé)任編輯:閆佳明 來(lái)源: oschina
相關(guān)推薦

2011-07-19 17:24:31

Objective-C 對(duì)象

2011-08-10 18:07:29

Objective-C反射

2011-05-11 15:58:34

Objective-C

2013-03-27 12:54:00

iOS開(kāi)發(fā)Objective-C

2011-05-11 11:20:26

Objective-C

2013-03-26 10:35:47

Objective-C單例實(shí)現(xiàn)

2011-08-02 13:16:36

Objective-C 語(yǔ)法 函數(shù)

2011-05-11 14:06:49

Objective-C

2013-08-21 14:57:42

objective-c問(wèn)題

2011-05-11 15:45:50

內(nèi)存管理Objective-C

2011-08-04 14:58:37

Objective-C Cocoa NSString

2011-08-04 11:15:46

Objective-C 構(gòu)造函數(shù) 構(gòu)造方法

2011-05-11 13:54:08

Objective-C

2014-06-25 14:02:59

Objective-CKVO

2011-08-03 16:55:05

Objective-C 代理

2011-07-08 13:49:46

Objective-C UUID

2011-08-17 10:58:59

Objective-C構(gòu)造函數(shù)

2012-06-15 09:47:48

Objective-CCategory

2014-04-30 10:16:04

Objective-CiOS語(yǔ)法

2012-03-07 13:43:59

Objective-C
點(diǎn)贊
收藏

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