This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension CGRect { | |
public static var unbounded: CGRect { | |
return CGRect(origin: .zero, size: .unbounded) | |
} | |
public var center: CGPoint { | |
return CGPoint(x: midX, y: midY) | |
} |
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIColor { | |
/** | |
Creates an UIColor from HEX String in "#363636" format | |
- parameter hexString: HEX String in "#363636" format | |
- returns: UIColor from HexString | |
*/ | |
convenience init(hexString: String) { |