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
# You have to restart the core audio be pasting the following line into termnal | |
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'` |
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
import UIKit | |
import Photos | |
extension PHPhotoLibrary { | |
// MARK: - PHPhotoLibrary+SaveImage | |
// MARK: - Public | |
func savePhoto(image:UIImage, albumName:String, completion:((PHAsset?)->())? = nil) { | |
func save() { |
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
import UIKit | |
class CustomActivity: UIActivity { | |
var actName = "" | |
var actImage: UIImage? | |
var customActionWhenTapped:( ()-> Void)! | |
init(title: String, image: UIImage, performAction: @escaping (() -> ()) ) { | |
self.actName = title | |
self.actImage = image |
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
I wanted to document the process that I went through to compile taglib for my iOS project. | |
At the time of this writing I used TagLib 1.9.1 | |
1. Download taglib at: http://taglib.github.io/ | |
2. Download ios-make at: github.com/plenluno/ios-cmake | |
3. The ios-make file that you need is in the toolchain directory. Copy the whole directory “toolchain” from inside the ios-make directory to taglib directory. |
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
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view, typically from a nib. | |
NSString *info = @"http://codeafterhours.wordpress.com"; | |
// Generation of QR code image | |
NSData *qrCodeData = [info dataUsingEncoding:NSISOLatin1StringEncoding]; // recommended encoding | |
CIFilter *qrCodeFilter = [CIFilter filterWithName:@"CIQRCodeGenerator"]; | |
[qrCodeFilter setValue:qrCodeData forKey:@"inputMessage"]; |
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
erase_sim: | |
./reset_sim.sh 2>/dev/null; true |