Post

Replies

Boosts

Views

Activity

Need some help with displaying text in ARKit
I have some code that recognizes some text from a camera and then takes that text and makes an amazon search and (sort of) gets the reviews. The part I am struggling with right now is making the reviews show up on the user's camera. Here is my current code: github repo - https://github.com/oofmeister27/BookReviewApp Feel free to run it to see how it works. You can see I already did some ARKit work in the viewDidLoad method of ViewController.swift but it keeps crashing when I try to run it on my iPhone with this exception: Thread 1: Exception: "-[UITextInputTraits length]: unrecognized selector sent to instance 0x1035332b0" Basically I want the user to take a pic and the rating should show up on the user's camera (i have already got the rating, it isn't just displaying on the user's camera) Thanks in advance.
1
0
269
Jul ’20
Unable to extract substring from larger mutli-line string
I extracted some HTML code and it's stored in a string called "html". I want to pull the number of stars from this HTML code. Looking at the html, I thought the easiest way was to look for the word "stars" in the html string and go from there. So I wrote this code: var s = "stars" if (html.contains(s)) { 	 print("Found stars") } However, for some reason this does not work and it does not print "Found Stars" in the bottom right part of xcode. What am I doing wrong?
14
0
696
Jun ’20