Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

record permission swift 4

import AVFoundation

switch AVAudioSession.sharedInstance().recordPermission {
case AVAudioSessionRecordPermission.granted:
    print("Permission granted")
case AVAudioSessionRecordPermission.denied:
    print("Pemission denied")
case AVAudioSessionRecordPermission.undetermined:
    print("Request permission here")
    AVAudioSession.sharedInstance().requestRecordPermission({ (granted) in
        // Handle granted
    })
}
Comment

PREVIOUS NEXT
Code Example
Swift :: declaring optionals swift 
Swift :: Swift Switch Statement with Range 
Swift :: remove and element from array firebase swift 5 
Swift :: initialize array with zero in swift 
Swift :: swift get file size from url 
Swift :: swift array index of where 
Swift :: swift while loop 
Swift :: xcode execute code after when navigating back to screen 
Swift :: swift int to int32 
Swift :: get last element of array swift 
Swift :: swift uilabel font bold 
Swift :: swift switch statement 
Swift :: swift protocols 
Swift :: swift arkit texture face get position on screen 
Swift :: swift apply changes after a word in string 
Swift :: swiftui divider remove padding 
Swift :: Swift Array With Mixed Data Types 
Swift :: create a dictionary in swift 
Swift :: Swift Create enum variables 
Swift :: Swift Operator Associativity 
Swift :: swiftui slide menu 
Swift :: struct exsmple 
Swift :: corner radius with animation swift 
Swift :: swiftui orientation failed after change orientation popup 
Swift :: uitableview disable sticky header 
Swift :: move to nect cell of collection after some time automatically in ios swift 
Ruby :: iterate over string ruby 
Ruby :: ruby format date time 
Ruby :: ruby/rails file get line number 
Ruby :: safe navigation operator in ruby 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =