Posts

Post not yet marked as solved
5 Replies
3.0k Views
Hi guys,I want to apply a CIFilter to a video. I already can apply it to an image but somehow not to a video.Currently my code looks like: let contentFilter = CIFilter(name: chosenFilter) let challengeCIImage = CIImage(image: challengeImage) contentFilter!.setValue(challengeCIImage, forKey: kCIInputImageKey) let editedChallengeImage = contentFilter!.value(forKey: kCIOutputImageKey) as! CIImage challengeImageView.image = UIImage(ciImage: editedChallengeImage) if (IS_VIDEO_SELECTED) { playerItem = AVPlayerItem(asset: avAsset!) playerItem!.videoComposition = AVVideoComposition(asset: avAsset!, applyingCIFiltersWithHandler: { request in let seconds = CMTimeGetSeconds(request.compositionTime) contentFilter?.setValue(seconds * 10.0, forKey: kCIInputRadiusKey) // Provide the filter output to the composition request.finish(with: editedChallengeImage, context: nil) }) }To be more specific about my problem. During runtime, the content of the asynchronous block starting at line 13 is never reached. The playerItem variable and the avAsset variable are not nil.Does anyone have an idea?Thanks in advance!
Posted Last updated
.
Post not yet marked as solved
4 Replies
2.9k Views
Hello everyone,I have following use case:I have a search bar to query my database depending on the input of the user. The results will be person data information displayed within a table view. Whenever a user clicks on a specific record, the name of the person object should be added to another textview but kind of highlighted.To be more clear, let's say, I select "Nazar Medeiros", then ideally the whole string "Nazar Medeiros" should be used as one long string.In case, I decide to remove it from the text view, then the whole name "Nazar Medeiros" should be removed at once and not with deleting each character one by one. Highlighting could mean having an underline for example.Can you follow me? 🙂 Unfortunately, I don't have any code to show because I still don't know where to start.You will select persons one by one in my case and all the names should appear on that text view like:Nazar Medeiros, Kaan CayogluAfter selecting a person from the table view, I also want to add the object into an array of persons. If the highlighted value is removed, the corresponding object should be removed from the array as well.
Posted Last updated
.