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 Foundation | |
import AVFoundation | |
class VoiceViewModel : NSObject , ObservableObject , AVAudioPlayerDelegate { | |
var audioRecorder : AVAudioRecorder! | |
var audioPlayer : AVAudioPlayer! | |
@Published var isRecording : Bool = false | |
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 Foundation | |
struct mySortedArray<T: Comparable> { | |
// We are Creating an Array and intialise it | |
var array = [T]() | |
init(array: [T]) { | |
self.array = array.sorted() | |
} |
NewerOlder