git clone git@github.com: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
| tell application "System Events" | |
| tell application process "Books" | |
| set frontmost to true | |
| end tell | |
| end tell | |
| say "start" | |
| set i to 0 |
| // 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 |
| /// 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 |
| 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(); | |
| } |
| 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>` |