I hereby claim:
- I am w-i-n-s on github.
- I am w_i_n_s (https://keybase.io/w_i_n_s) on keybase.
- I have a public key ASAfAgeYghcRjorMz0tjptfZYBm6hHcVEooxVF0Pb56uNQo
To claim this, I am signing this object:
// Edited by me. Cos I need custom back button | |
// Origin https://www.hackingwithswift.com/articles/216/complete-guide-to-navigationview-in-swiftui | |
// Adult router https://functionalgibberish.com/2020-06-03-RoutingInSwiftUI/ | |
enum NavigationTag { | |
case Second | |
case Third | |
} | |
struct ContentView: View { |
I hereby claim:
To claim this, I am signing this object:
import Foundation | |
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
struct WebPage { | |
let user: String | |
let password: String | |
let urlString: String | |
} |
# 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}'` |
file:///System/Library/Audio/UISounds/3rd_party_critical.caf, | |
file:///System/Library/Audio/UISounds/Modern/camera_shutter_burst.caf, | |
file:///System/Library/Audio/UISounds/Modern/camera_shutter_burst_begin.caf, | |
file:///System/Library/Audio/UISounds/Modern/camera_shutter_burst_end.caf, | |
file:///System/Library/Audio/UISounds/New/Anticipate.caf, | |
file:///System/Library/Audio/UISounds/New/Bloom.caf, | |
file:///System/Library/Audio/UISounds/New/Calypso.caf, | |
file:///System/Library/Audio/UISounds/New/Choo_Choo.caf, | |
file:///System/Library/Audio/UISounds/New/Descent.caf, | |
file:///System/Library/Audio/UISounds/New/Fanfare.caf, |
import UIKit | |
import Photos | |
extension PHPhotoLibrary { | |
// MARK: - PHPhotoLibrary+SaveImage | |
// MARK: - Public | |
func savePhoto(image:UIImage, albumName:String, completion:((PHAsset?)->())? = nil) { | |
func save() { |
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 |
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. |
- (IBAction)tamLanguageChangeButton:(id)sender { | |
__weak __typeof(self)weakSelf = self; | |
UIAlertController *alert; | |
// if user vill tap to already selected language | |
void (^cancelBlock)(UIAlertAction * _Nonnull action) = ^(UIAlertAction * _Nonnull action) { | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
[weakSelf dismissViewControllerAnimated:YES completion:nil]; | |
}); | |
}; |
- (void)fixVideoUrl:(NSURL *)url completion:(void (^)(NSURL *outputUrl))completion { | |
// output file | |
NSString* docFolder = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; | |
NSString* outputPath = [docFolder stringByAppendingPathComponent:@"output2.mov"]; | |
if ([[NSFileManager defaultManager] fileExistsAtPath:outputPath]) { | |
[[NSFileManager defaultManager] removeItemAtPath:outputPath error:nil]; | |
} | |
// input file | |
AVAsset* asset = [AVAsset assetWithURL:url]; |