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
" 基本キーマッピング | |
nnoremap <Space>r <C-r> " redo | |
inoremap <Space>p <C-p> " 補完 | |
nnoremap <F9> :%s/\s\+$//ge<CR> " 行末スペース削除 | |
" ウィンドウ移動(複数エディタ分割時) | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-l> <C-w>l |
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 ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// by calling [NSURLProtocol registerClass:[MyURLProtocol class]]; in -application:didFinishLoadingWithOptions:, your protocol will have priority over any of the built-in protocols. | |
URLProtocol.registerClass(ActivityURLProtocol.self) | |
//URLProtocol.unregisterClass(ActivityURLProtocol.self) | |
print(URLSession.shared.configuration.protocolClasses) | |
} |
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
func getURL(ofPhotoWith mPhasset: PHAsset, completionHandler : @escaping ((_ responseURL : URL?) -> Void)) { | |
if mPhasset.mediaType == .image { | |
let options: PHContentEditingInputRequestOptions = PHContentEditingInputRequestOptions() | |
options.canHandleAdjustmentData = {(adjustmeta: PHAdjustmentData) -> Bool in | |
return true | |
} | |
mPhasset.requestContentEditingInput(with: options, completionHandler: { (contentEditingInput, info) in | |
completionHandler(contentEditingInput!.fullSizeImageURL) | |
}) |
NewerOlder