Post

Replies

Boosts

Views

Activity

CMTimeMultiplyByRatio in iOS 16
let videoURL = URL(fileURLWithPath: path ?? "") let asset = AVURLAsset(url: videoURL, options: nil) let imageGenerator = AVAssetImageGenerator(asset: asset) imageGenerator.appliesPreferredTrackTransform = true let time = CMTimeMultiplyByRatio(asset.duration, multiplier: 1, divisor: 2) // THIS LINE GIVES ISSUE: "'duration' was deprecated in iOS 16.0: Use load(.duration) instead". I CANNOT FIGURE OUT THE CORRECT SYNTAX FOR CHANGING asset.duration TO REPLACE WITH load(.duration). HELP WITH THE CORRECT SYNTAX WOULD BE HELPFUL.
1
0
791
Sep ’22
Prevent Large Title from Moving Down when Refreshing TableView
I have implemented the Large Title for UITableView correctly. The Navigation bar collapses when scrolling down the table view. However, when pulling to refresh, the Large Title moves down the screen instead of staying stationary. I suspect that this is the default behavior. Is there a way to keep the large title stationary when pulling downward to refresh the UITableView?
0
0
417
Jul ’24
Large Title Navigation Bar Problems with Two Views
As has been posted a number of times, the large title navigation bar only collapses on scrolling for the UIView listed first in an .xib or storyboard file. In my case, I have an enclosing view containing 2 Views, a TableView and a CollectionView in an .XIB file. This is connected to a UIKit class. Tapping a button switches between the two views. If the TableView is the first view listed, the navigationbar collapses with scrolling but with the CollectionView listed second, the large title navigation bar doesn't collapse with scrolling. Alternatively, if the CollectionView is the first view listed, the navigation bar collapses with scrolling but with the TableView listed second, the large title navigation bar doesn't collapse with scrolling. I have not been able to figure out a way to enable the collapsable large title navigation bar to work in such a scenario as mine for both views within a container view. Is there a way to do this? I have tested this capability through iOS 17.
2
0
677
Jul ’24
Implementing Picture in Picture on iPhone in iOS 14
I thought this would be a no brainer and automatically work when AVPlayerViewController was implemented. Here is the implementation of AVPlayerViewController on iPad and Picture in Picture works perfectly: (void)finishCellSelectVideo:(id)videoPath {     NSURL *videoURL = [[NSURL alloc] initFileURLWithPath:videoPath];     AVPlayer *videoPlayer = [AVPlayer playerWithURL:videoURL];     videoPlayer.allowsExternalPlayback = YES;     AVPlayerViewController *videoPlayerViewController = [AVPlayerViewController new];     videoPlayerViewController.delegate = self;     videoPlayerViewController.player = videoPlayer;    [self presentViewController:videoPlayerViewController animated:YES completion:nil];        [videoPlayer play]; } However, with this same code Picture in Picture doesn't work on the iPhone in iOS 14. Does this code only work on iPad? Any clues as to what I am doing wrong with the iPhone code?
3
0
1.8k
Sep ’20