7

How to convert a View (not UIView) to an image? this solution will work for visible area. Is there any way to cast swiftui view to image.

Narek Ghukasyan
  • 229
  • 3
  • 5
  • A few more details, please. Specifically: (1) The linked question clearly lists what *isn't* possible - namely, the "visible area". Is *that* your issue? (2) Define what you mean by "cast". Are you saying turning a `View` into an `Image` using the swift `as` syntax? –  Oct 11 '19 at 13:50
  • I have something like newsfeed and i want to know how can i make a screenshot of some post in that newsfeed. – Narek Ghukasyan Oct 12 '19 at 13:58
  • Please, more details! (I'm not ev en asking for code - which really is what this site is about.) For one thing, you *didn't* answer my two specific question at all. More, you actually raised another question with your comment... are you saying that you want to "make a screenshot of some post" that **isn't** a SwiftUI `View` but instead is a webpage, as in a HTML screen scraper? I really don't want to downvote your question - but it's beginning to sound like you have nothing more. One *last* request, can you provide us with something to duplicate the issue you are facing? –  Oct 12 '19 at 14:44
  • oooh, brother i said that i have swiftui app newsfeed, i want to share post from this newsfeed aaand save photo of that post – Narek Ghukasyan Oct 13 '19 at 08:10
  • What html and what web-related means? I want to save photo of some view, swiftui View for example Toogle, in general I want to know is there any way to screenshot whole view – Narek Ghukasyan Oct 13 '19 at 08:12
  • (1) Yeah i saw that that impossible with solution that provided in linked question – Narek Ghukasyan Oct 13 '19 at 08:15
  • (2) I just want to do something and see photo of any view that i want in my camera roll – Narek Ghukasyan Oct 13 '19 at 08:16

0 Answers0