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
| using Security; | |
| using Foundation; | |
| public class KeyChain | |
| { | |
| public string ValueForKey(string key) | |
| { | |
| var record = ExistingRecordForKey (key); | |
| SecStatusCode resultCode; |
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
| var myArray = [1,2,3,4,5,6,7,8] | |
| func shuffleArray(array: [Int]) -> [Int] { | |
| var tempArray = array | |
| for index in 0...array.count - 1 { | |
| let randomNumber = arc4random_uniform(UInt32(myArray.count - 1)) | |
| let randomIndex = Int(randomNumber) | |
| tempArray[randomIndex] = array[index] | |
| } |