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
import UIKit | |
import TwitterVideoUploader | |
import STTwitter | |
import RxSwift | |
import MobileCoreServices | |
final class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { | |
let 👝 = DisposeBag() | |
override func viewDidAppear(_ animated: Bool) { |
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
extension UITableView { | |
var lastIndexPath: IndexPath? { | |
guard let dataSource = dataSource else { return nil } | |
return dataSource.lastIndexPath(in: self) | |
} | |
} | |
extension UITableViewDataSource { | |
func lastIndexPath(in tableView: UITableView) -> IndexPath? { |
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
#if TARGET_OS_SIMULATOR | |
#import <Metal/Metal.h> | |
#import <CoreVideo/CoreVideo.h> | |
/// CAMetalLayer | |
@class CAMetalLayer; | |
@protocol CAMetalDrawable <MTLDrawable> | |
@property(readonly) id <MTLTexture> texture; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>WFWorkflowActions</key> | |
<array> | |
<dict> | |
<key>WFWorkflowActionIdentifier</key> | |
<string>is.workflow.actions.getcurrentsong</string> | |
<key>WFWorkflowActionParameters</key> |
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
import UIKit | |
import PlaygroundSupport | |
class MyViewController : UIViewController, Interface { | |
lazy var tap = UITapGestureRecognizer(target: self, action: #selector(tapped)) | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
tap.delegate = self | |
view.addGestureRecognizer(tap) |
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
-------------------------------------------- | |
// | |
// ObjCClass.h | |
// ihvaiusdhv | |
// | |
// Created by Tomoya Hirano on 2019/02/18. | |
// Copyright © 2019 Tomoya Hirano. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
enum UnZipPolicy { | |
case none | |
case unzip(isRemoveSrc: Bool) | |
} | |
let manager = Manager() | |
manager.maxConcurrentTasksCount = 4 | |
manager.timeout = 150 | |
manager.automaticallyUnzip = .unzip(isRemoveSrc: true) | |
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
▿ Swift.AnyCollection<(label: Swift.Optional<Swift.String>, value: Any)> | |
▿ _box: Swift._CollectionBox<Swift.LazyMapCollection<Swift.Set<__C.NSObject>, (label: Swift.Optional<Swift.String>, value: Any)>> #0 | |
▿ super: Swift._AnyCollectionBox<(label: Swift.Optional<Swift.String>, value: Any)> | |
- super: Swift._AnySequenceBox<(label: Swift.Optional<Swift.String>, value: Any)> | |
▿ _startIndex: Swift._IndexBox<Swift.Set<__C.NSObject>.Index> #1 | |
▿ _base: Swift.Set<__C.NSObject>.Index | |
▿ _value: Swift.SetIndexRepresentation<__C.NSObject>._cocoa | |
▿ _cocoa: Swift._CocoaSetIndex | |
▿ cocoaSet: 8 members #2 |
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
import Foundation | |
import SwiftSoup | |
let base = "https://developer.apple.com" | |
func getURL(from url: String, viewBox: String) -> [String] { | |
let url = URL(string: url)! | |
let data = try! Data(contentsOf: url) | |
let doc: Document = try! SwiftSoup.parse(String(data: data, encoding: .utf8)!) | |
let taskTopics = try! doc.select("div").filter({ $0.hasClass("task-topic") }) |
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
class RootViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
view.backgroundColor = .red | |
} | |
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) { | |
let vc = ViewController.make() | |
present(vc, animated: true, completion: nil) |