This file contains 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
// | |
// FWKCIImageView.h | |
// LineEngraver | |
// | |
// Created by Viktor Goltvyanytsya on 8/8/16. | |
// | |
// | |
This file contains 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
func prepareVoiceList() { | |
for voice in AVSpeechSynthesisVoice.speechVoices() { | |
let voiceLanguageCode = (voice as AVSpeechSynthesisVoice).language | |
let languageName = NSLocale.currentLocale().displayNameForKey(NSLocaleIdentifier, value: voiceLanguageCode) | |
let dictionary = ["languageName": languageName, "languageCode": voiceLanguageCode] | |
arrVoiceLanguages.append(dictionary) | |
} |
This file contains 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
searchBar.setPlaceholderTextColor(to:UIColor.searchBarText) | |
searchBar.setTextColor(to: UIColor.white) | |
searchBar.placeholder = "Search this text never show" | |
// let searchField = searchBar.value(forKey: "_searchField") as? UITextField | |
setImage(#imageLiteral(resourceName: "searchBold"), for: .search, state: .normal) | |
setImage(#imageLiteral(resourceName: "closeBold"), for: .clear, state: .normal) | |
UISearchBar.appearance().setImage(UIImage(), for: UISearchBarIcon.search, state: []) | |
This file contains 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 cstr = (str as NSString).utf8String //iOS10+ or .UTF8String otherwise | |
print(String(format: "%-15s", cstr!)) |
This file contains 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
// | |
// UIImage+PixelBuffer.swift | |
// CoreMLDemo | |
// | |
// Created by Alexey Solovyov on 08.06.17. | |
// Copyright © 2017 Handsome LLC. All rights reserved. | |
// | |
import UIKit | |
extension UIImage { |
NewerOlder