Skip to content

Instantly share code, notes, and snippets.

View wyanassert's full-sized avatar
🎯
Focusing

wyanassert wyanassert

🎯
Focusing
View GitHub Profile
@wyanassert
wyanassert / gist:07a6e78af730320452f0bad0f34549a2
Created August 9, 2020 13:28
ScreenEdgePop 手动添加思路
SEL action = NSSelectorFromString(@"handleNavigationTransition:");
UIScreenEdgePanGestureRecognizer *edgePanGesture = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self.navigationController.interactivePopGestureRecognizer.delegate action:action];
edgePanGesture.edges = UIRectEdgeLeft;
edgePanGesture.delegate = self;
[self.view addGestureRecognizer:edgePanGesture];
@wyanassert
wyanassert / Snippets Shortcut.m
Created August 14, 2019 12:55 — forked from XcqRomance/Snippets Shortcut.m
开发中Xcode常用的快捷代码块设置
// mystrong
@property(nonatomic, strong)<#propetyclass#> *<#propertyname#>;
// mycopy
@property(nonatomic, copy)<#propetyclass#> *<#propertyname#>;
// myassign
@property(nonatomic, assign)<#propetyclass#> *<#propertyname#>;
// myweak
@property(nonatomic, weak)id<<#protocalname#>> <#propertyname#>;
// mylazyload
@wyanassert
wyanassert / XCode-Doc.xml
Created January 21, 2019 05:04
XCode离线文档
<?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>downloadables</key>
<array>
<!-- These first dicts are to reference the docsets that come installed with Xcode -->
<dict>
<key>identifier</key>
<string>com.apple.adc.documentation.AppleXcode.DeveloperTools</string>
@wyanassert
wyanassert / third.json
Last active December 13, 2018 09:36
无第三方依赖 && star 大于100 && Objective-C && 不调用 runtime(尽量) && 混淆时不会导致混淆失败
[
{
"name": "ABFullScrollViewController",
"url": "https://github.com/andresbrun/ABFullScrollViewController.git"
},
{
"name": "AFBlurSegue",
"url": "https://github.com/AlvaroFranco/AFBlurSegue.git"
},
{
@wyanassert
wyanassert / gist:a01f693a49efaf15020d940803528c71
Created December 7, 2018 11:16
UIImagePicker 涉及到相机相册权限
#import <MobileCoreServices/MobileCoreServices.h>
@interface <#XX#>() <UIImagePickerControllerDelegate, UINavigationControllerDelegate>
@property (nonatomic, strong) UIImagePickerController *imagePicker;
@property (nonatomic, strong) UIImagePickerController *cameraPicker;
#pragma mark - UIImagePickerControllerDelegate
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info {
NSString *mediaType = info[UIImagePickerControllerMediaType];
@wyanassert
wyanassert / gist:b098c5c2849492c6b1dab9d391598952
Created December 7, 2018 11:09
Save and Share Image and Video 因为用掉了相册(写)权限
//Share Image or Video
- (void)shareToFriends:(UIImage *)image videoPath:(NSString *)path
{
[GZToast hideToast];
NSArray *objectsToShare;
if (image) {
objectsToShare = @[image];
}else if(path){
NSURL*urlToShare= [NSURL fileURLWithPath:path];
objectsToShare = @[urlToShare];