ios - Creating a PDF (Or Other viewable format, such as .docx) from CoreData using swift -
description
hello! saving several strings of user inputed data coredata using handful of nsmanagedobject subclasses. since application machine inspection, necessary print/email customer entered information out in structured format. below find pictures/examples of how saving data. please kind me, birthday <3
code examples
below example of how saving information. in example, coredata entity "crawlerthree" , data crawlerdistance.
@ibaction func save(_ sender: anyobject) { let appdel:appdelegate = (uiapplication.shared().delegate as! appdelegate) let context:nsmanagedobjectcontext = appdel.managedobjectcontext let entity1 = nsentitydescription.insertnewobject(forentityname: "crawlerthree", into:context) nsmanagedobject as! crawlerthree entity1.crawlerdistance = distance.text }
the rest of saves identical this, varying entities , data, of strings. know rather vague post, need know need use format information. worth noting know how retrieve string's coredata, ignorant on how process them other form.
the simplest solution best solution problem! in advance!
i divide problem two.
- output core data screen
- export pdf
it sounds if know how strings core data already, have display them in suitable way.
fortunately whatever use on screen: uiview, uitableview etc. can saved pdf using e.g. (swift) answer how convert uiview pdf within ios?
Comments
Post a Comment