我是ios上的新開發者。我開發一個正常的地方,我使用一些按鈕和屏幕背景圖像。我可以用按鈕和背景截圖。現在我想要拍攝特定對象的屏幕截圖。能有可能在目標C如何在ios中採取特定對象截圖
這是我的代碼
UIGraphicsBeginImageContext(self.view.bounds.size);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(100, 100, 200, 200)];
imageView.layer.zPosition = 14;
imageView.image = image;
[self.view addSubview:imageView];
特定對象?屏幕上的圖像? – GenieWanted 2014-09-25 12:50:57
從上面我假設你說用戶可以點擊一個按鈕,它會採取一個頁面和背景圖像的屏幕截圖,你問如何拍攝特定UI元素的屏幕截圖? – logixologist 2014-09-25 12:58:37
是的。你是對的。感謝評論@logixologist – Asaduzzaman 2014-09-27 05:03:01