I have an AVAudioEngine,but I don't know how to export the audio in AVAudioEngine to a file. Anyone can help?
Post
Replies
Boosts
Views
Activity
I want to get animation interpolation during animation running.
just like code below:
Animator(begin:100,end:200).addListener({value in
//here will be called when animation updates.
print(value)
})
But I can't find any API like the code above in iOS SDK.And I don't want to use any UIView or CALayer to get presentationLayer to get this value.
So How can I do that?🤔🤔🤔
The new captureTextFromCamera API allow device to use OCR in UIResponder,but how can I know this device support OCR or not ?
eg:
iPhoneX:NO,
iPhone13:YES
What I want is to make video 's rotation be from 0 to 90 degree in 0 ~ 2s.
Here is the code:
let layerIns = AVMutableVideoCompositionLayerInstruction(assetTrack: track)
let endTransform = CGAffineTransform(rotationAngle: CGFloat(Double.pi / 2))
let timeRange = CMTimeRange(start: .zero, duration: CMTime(seconds: 2, preferredTimescale: 600))
layerIns.setTransformRamp(fromStart: .identity, toEnd: endTransform, timeRange: timeRange)
But the center of rotation is top-left corner.. Which makes rotation effect look strange.
I wonder how to change the video layer's anchor point to center point instead of top-left corner...
related question on StackOverFlow :Question Link - https://stackoverflow.com/questions/65575655/how-to-change-the-settransformramp-s-transform-anchor-point
When I set like this:
collectionView.frame = .init(x: 0, y: 0, width: 3000, height: 100)
a lot of cell will be created...But need the collectionView to be wide like this..So I can't let collectonView 's width is as wide as controller's view 's width. So I set it to 3000 (maybe more wide actually..).In this case,a lot of cell will be created and if width is larger than contentSize.width ..the cell's recycle system will be useless...
So ,How can i let collectionView wide like this can just create the cell's I can see?
Is any good idea to implement this video edit track?
image - https://github.com/luckysmg/daily_images/blob/main/D557A5C4-F94B-4209-B058-1F9FC1D28E9F.png?raw=true
I dont want to use UIKit to customize the navigationBar,I want to customize the navigationBar with swiftUI.... but I dont know how to do ....Just like changing navigationBar 's barTintColor...or customize the titleView....