Tag: Developer

It’s been a while since Apple added Swift fading support to AVAudioPlayer. I can’t remember when exactly, but I think it might have been since iOS 10.0. I have not used it in quite some time and recently had the …

AVAudioPlayer setVolume with fading – properly Read More »

Tagged with: ,

I spotted this extension somewhere online a while ago (kjmcneish?) that can come in pretty handy. extension String { // Returns a range of characters (e.g. s[0…3]) subscript (r: Range<Int>) -> String { let start = advance(self.startIndex, r.startIndex) let end …

String extension for range of characters/character at nth position Read More »

Tagged with: , ,