git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
class WebViewWithImage extends Component { | |
render() { | |
const html = `<!DOCTYPE HTML><html> | |
<head> | |
<title>Image from Assets</title> | |
</head> | |
<body> | |
<img src="./image.png" alt="Example"> | |
</body> | |
</html>` |
static inline UIImage *DrawLayerAsImage(CALayer *layer) { | |
UIImage *res = nil; | |
if (layer != nil) { | |
CGSize size = layer.bounds.size; | |
UIGraphicsBeginImageContextWithOptions(size, NO, 0); | |
CGContextRef ctx = UIGraphicsGetCurrentContext(); | |
[layer renderInContext:ctx]; | |
res = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
} |
/// SwitchableProxy.h content: | |
#import <Foundation/Foundation.h> | |
NS_ASSUME_NONNULL_BEGIN | |
@protocol SwitchableObject | |
@property (nonatomic, readwrite, assign, getter=isEnabled) BOOL enabled; | |
+ (BOOL)isSwitchableSelector:(SEL)selector; | |
@end |
// Apple Forum Question https://developer.apple.com/forums/thread/129211?answerId=620460022#620460022 | |
// | |
// SceneDelegate.swift | |
// | |
// Created by Egor Merkushev on 11.07.2020. | |
// Copyright © 2020 Egor Merkushev. All rights reserved. | |
// | |
import UIKit | |
import SwiftUI |
tell application "System Events" | |
tell application process "Books" | |
set frontmost to true | |
end tell | |
end tell | |
say "start" | |
set i to 0 |
https://www.osstatus.com | |
-12884 - Media File not received | |
code -1008, underlying -12884 - Playlist File not received | |
-11819 AVErrorMediaServicesWereReset with NSOSStatusErrorDomain Code=-12178, solution: rebuild AVPlayer|Item and asset | |
-11847 AVFoundationErrorDomain H.264 decoding layer has failed, "Operation Interrupted" Error Domain=NSOSStatusErrorDomain Code=-12084 The operation couldn’t be completed https://stackoverflow.com/questions/28841903/why-does-avsamplebufferdisplaylayer-fail-with-operation-interrupted-11847 | |
HTTP | errorStatusCode | errorDomain | errorComment |
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
NavigationView { | |
ZStack { | |
List { | |
ForEach(1..<20) { idx in | |
if idx == 19 { |
// | |
// CustomFont.swift | |
// BLNC | |
// | |
// Created by Egor Merkushev on 31.05.2021. | |
// MIT | |
// Source: https://stackoverflow.com/a/58971579/602249 | |
import SwiftUI |
-(void)exportVideo | |
{ | |
CGSize renderingSize = CGSizeMake(640, 360); // The desired size of your video | |
float displayDuration = 2.0f; //The duration of the desired video, in seconds | |
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
NSString *documentsDirectory = [paths objectAtIndex:0]; | |
NSString *myPathDocs = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"FinalVideo-%d.mov",arc4random() % 1000]]; | |
NSURL *url = [NSURL fileURLWithPath:myPathDocs]; |