Posts

Post not yet marked as solved
1 Replies
381 Views
I know how to match unknown number of fields with using 'range' and '.regularExpression' option as shown below, but how do i do it with the new RegexBuilder or multi-line literal? func matches(for regex: String, in text: String) -> [String] { var result = [String]() var startIndex = text.startIndex let endIndex = text.endIndex while let range = text.range(of: regex, options: .regularExpression, range: startIndex ..< endIndex) { result.append(String(text[range])) startIndex = range.upperBound } return result }
Posted
by youngn3.
Last updated
.
Post not yet marked as solved
0 Replies
403 Views
Hi, i downloaded the FacePainting app from here https://developer.apple.com/documentation/realitykit/creating_an_app_for_face-painting_in_ar but i don't understand the RaycastResult calculation like how to figure out the uv from the indices, can someone explain or annotate the steps, thanks.
Posted
by youngn3.
Last updated
.