This file contains hidden or 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
#! /bin/bash | |
mkdir ./arm64 | |
mkdir ./x86_64 | |
find "./" -name '*.framework' -type d | while read -r FRAMEWORK | |
do | |
echo "Preparing framework: $FRAMEWORK" | |
FRAMEWORK_EXECUTABLE_NAME=$(/usr/libexec/PlistBuddy -c "Print CFBundleExecutable" "$FRAMEWORK/Info.plist") | |
This file contains hidden or 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
let cls: AnyClass = NSClassFromString("NSConcreteValue")! | |
let types = "d@:" // [NSString stringWithFormat:@"%s%s%s", @encode(double), @encode(id), @encode(SEL)] | |
let block: @convention(block) (AnyObject?) -> Double = { (self: AnyObject!) -> (Double) in | |
return 1.0 | |
} | |
let imp = imp_implementationWithBlock(unsafeBitCast(block, to: AnyObject.self)) | |
class_addMethod(cls, Selector("doubleValue"), imp, types) |
This file contains hidden or 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
// | |
// MakeTransparentHoleOnOverlayView.swift | |
// | |
// Created by James Laurenstin on 2015-04-10. | |
// Copyright (c) 2015 Aldo Group Inc. All rights reserved. | |
// | |
import UIKit | |
class MakeTransparentHoleOnOverlayView: UIView { |