This error is due to the fact that "UITableViewCell" cannot contain "UIViewController".
So if you want to use "iink" in "UITableView", you cannot use the UI Reference implementation as it is, since it uses "UIViewController".
You have to implement your own UI implementation and replace all "UIViewController" by "UIView".
Regards,
Gwenaëlle
K
Kannan Balasubramanian
said
almost 2 years ago
Hi Gwelnaelle,
Thanks for response.
Yes ,we can't add the UIViewController to the UITableViewCell.
But we can add the UIViewController's View.Add that EditorViewController's View But it doesn't make any change in UITableviewCell.(Only Blank page showed in UITableviewCell.Didn't show any lines)
My "CellForRowAtIndexPath"(Tableview Datasource method) Code was:
var cell: WritingSummaryNewTableViewCell? = (tableView.dequeueReusableCell(withIdentifier: "WritingSummaryNewTableViewCell") as? WritingSummaryNewTableViewCell)
let storyboard = UIStoryboard(name: "Main", bundle: nil)
print("Error while creating package : " + error.localizedDescription)
}
getVC.editor.delegate = self
What's problem in my method.How can we achieve that feature?
K
Kannan Balasubramanian
said
almost 2 years ago
Hi Gwelnaelle,
Above my query was solved.But I have another problem.
My writing view(EditorViewController's View) was imported in my UITableviewCell.
1) When i draw something in my writing view there are no drawing lines was formed in writing view.But editor engine show the letters what i draw in writing view.
Ex:If i draw letter "A" there are no sketch line was formed in writing view but my editor engine show the letter "A".
2) If i put that writing view in my UITableviewCell and i draw the some letter on vertical type at that time UITableview was scroll to bottom.I can't able to write the any letter in that writing view because UITableview's scroll was activated when i try to draw something in writing view.
how can i solve this two issues?
G
Gwenaelle @MyScript
said
almost 2 years ago
Hi Kannan,
It looks like you are having a problem with your rendering.
Hi Gwelnaelle,
I was lookup that above link.But i didn't get any solutions for that(Rendering).
I have attached my project source code Github link below here,
https://github.com/kannan333/hello-world.git
Can you help me?
O
Olivier @MyScript
said
over 1 year ago
Dear Kannan,
please follow the instructions given by Gwenaelle, i.e. you cannot use the UI Reference implementation as it is, since it uses "UIViewController".
Please note we will not update your code, the idea is that we help you when you have questions, not that we develop for you.
Best regards,
Olivier
K
Kannan Balasubramanian
said
over 1 year ago
Hi Olivier,
Thanks for your response.
Imported text size was too large.Can i change that imported text's size to small?
O
Olivier @MyScript
said
over 1 year ago
Dear Kannan,
when you say that imported text is too large, I am not sur to understand:
-Are you using the "import" function, and the length of the text that is imported is much longer than your field can afford?
-Or you are using a batch mode and the strokes are too big?
-Or anything else?
Best regards,
Olivier
K
Kannan Balasubramanian
said
over 1 year ago
Hi Olivier,
Actually i want to import the text into the writing area by following code,
Kannan Balasubramanian
When i draw the "A" letter can i get that text after recognition for show in my custom UITEXTVIEW in iOS SDK?
Dear Kannan,
did you try changing the
font-size
parameter: https://developer-support.myscript.com/support/discussions/topics/16000026063 ?Let us know if this helps.
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstGwenaelle @MyScript
Dear Kannan,
This error is due to the fact that "UITableViewCell" cannot contain "UIViewController".
So if you want to use "iink" in "UITableView", you cannot use the UI Reference implementation as it is, since it uses "UIViewController".
You have to implement your own UI implementation and replace all "UIViewController" by "UIView".
Regards,
Gwenaëlle
Kannan Balasubramanian
Hi Gwelnaelle,
Thanks for response.
Yes ,we can't add the UIViewController to the UITableViewCell.
But we can add the UIViewController's View.Add that EditorViewController's View But it doesn't make any change in UITableviewCell.(Only Blank page showed in UITableviewCell.Didn't show any lines)
My "CellForRowAtIndexPath"(Tableview Datasource method) Code was:
var cell: WritingSummaryNewTableViewCell? = (tableView.dequeueReusableCell(withIdentifier: "WritingSummaryNewTableViewCell") as? WritingSummaryNewTableViewCell)
let storyboard = UIStoryboard(name: "Main", bundle: nil)
cell?.editorVC = storyboard.instantiateViewController(withIdentifier: "EditorViewController") as! EditorViewController
self.addChildViewController(cell!.editorVC )
setupEditorsVC(editorsVC: cell!.editorVC)
cell?.writingBase_View.addSubview(cell!.editorVC.view)
cell?.editorVC.didMove(toParentViewController: self)
cell?.writingHgt_Constrnt.constant = 200
setupEditorsVC Function Code Was:
var getVC = editorsVC
getVC = childViewControllers.first as! EditorViewController
let appDelegate = UIApplication.shared.delegate as! AppDelegate
getVC.engine = appDelegate.engine
getVC.inputMode = .forcePen
do {
if let package = try createPackage(packageName: "New") {
try getVC.editor.part = package.getPartAt(0)
}
} catch {
print("Error while creating package : " + error.localizedDescription)
}
getVC.editor.delegate = self
What's problem in my method.How can we achieve that feature?
Kannan Balasubramanian
Hi Gwelnaelle,
Above my query was solved.But I have another problem.
My writing view(EditorViewController's View) was imported in my UITableviewCell.
1) When i draw something in my writing view there are no drawing lines was formed in writing view.But editor engine show the letters what i draw in writing view.
Ex:If i draw letter "A" there are no sketch line was formed in writing view but my editor engine show the letter "A".
2) If i put that writing view in my UITableviewCell and i draw the some letter on vertical type at that time UITableview was scroll to bottom.I can't able to write the any letter in that writing view because UITableview's scroll was activated when i try to draw something in writing view.
how can i solve this two issues?
Gwenaelle @MyScript
Hi Kannan,
It looks like you are having a problem with your rendering.
Please take a look at https://developer.myscript.com/docs/interactive-ink/1.3/ios/fundamentals/rendering/#layer
Best regards,
Gwenaëlle
Kannan Balasubramanian
Hi Gwelnaelle,
I was lookup that above link.But i didn't get any solutions for that(Rendering).
I have attached my project source code Github link below here,
https://github.com/kannan333/hello-world.git
Can you help me?
Kannan Balasubramanian
Olivier @MyScript
Dear Kannan,
please follow the instructions given by Gwenaelle, i.e. you cannot use the UI Reference implementation as it is, since it uses "UIViewController".
Please note we will not update your code, the idea is that we help you when you have questions, not that we develop for you.
Best regards,
Olivier
Kannan Balasubramanian
Hi Olivier,
Thanks for your response.
Imported text size was too large.Can i change that imported text's size to small?
Olivier @MyScript
Dear Kannan,
when you say that imported text is too large, I am not sur to understand:
-Are you using the "import" function, and the length of the text that is imported is much longer than your field can afford?
-Or you are using a batch mode and the strokes are too big?
-Or anything else?
Best regards,
Olivier
Kannan Balasubramanian
Hi Olivier,
Actually i want to import the text into the writing area by following code,
try editorViewController.editor.import_(.text, data:"Sample Text", block: nil)
But the text size was too large.How can i reduce that text?
Olivier @MyScript
Dear Kannan,
did you try changing the
font-size
parameter: https://developer-support.myscript.com/support/discussions/topics/16000026063 ?Let us know if this helps.
Best regards,
Olivier