Skip to content

Instantly share code, notes, and snippets.

Ourui ourui

  • iQIYI
  • ShangHai. China
View GitHub Profile
@ourui
ourui / CALayer+MBAnimationPersistence.h
Created Jan 2, 2020 — forked from matej/CALayer+MBAnimationPersistence.h
Persists (pauses) layer animations (including UIView animation generated animations) when the application enters into background and restores (resumes) animations from where they left off upon returning from background.
View CALayer+MBAnimationPersistence.h
//
// CALayer+MBAnimationPersistence.h
//
// Created by Matej Bukovinski on 19. 03. 14.
// Copyright (c) 2014 Matej Bukovinski. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>
View ReversingAsset.m
#import "AVUtilities.h"
#import <AVFoundation/AVFoundation.h>
@implementation AVUtilities
+ (AVAsset *)assetByReversingAsset:(AVAsset *)asset outputURL:(NSURL *)outputURL {
NSError *error;
// Initialize the reader
AVAssetReader *reader = [[AVAssetReader alloc] initWithAsset:asset error:&error];
View NSObject+DLIntrospection.h
//
// NSObject+DLIntrospection.h
// DLIntrospection
//
// Created by Denis Lebedev on 12/27/12.
// Copyright (c) 2012 Denis Lebedev. All rights reserved.
//
#import <Foundation/Foundation.h>
View UIImage+RoundedCorner.h
//
// UIImage+RoundedCorner.h
// SelectTags
//
// Created by jm on 16/2/22.
// Copyright © 2016年 Jim. All rights reserved.
//
//生成带圆角的图片
#import <UIKit/UIKit.h>
View LLImageLogger.h
//
// LLImageLogger.h
// ImageLogger
//
// Created by Damien DeVille on 3/27/14.
// Copyright (c) 2014 Damien DeVille. All rights reserved.
//
#import <Foundation/Foundation.h>
@ourui
ourui / UIButton+LCAlignment.h
Created Apr 10, 2016
A nice categary of UIButton to manage postion of image. Author Repo: https://github.com/lianchengjiang/LCUIKit
View UIButton+LCAlignment.h
//
// UIButton+LCAlignment.h
// Pods
//
// Created by jiangliancheng on 16/4/8.
//
//
#import <UIKit/UIKit.h>
View UIImgage+antialiasing.m
#import "UIImage+Antialiase.h"
@implementation UIImage (Antialiase)
//创建抗锯齿头像
- (UIImage*)antialiasedImage{
return [self antialiasedImageOfSize:self.size scale:self.scale];
}
//创建抗锯齿头像,并调整大小和缩放比。
@ourui
ourui / UIScrollView+ScrollsToTop.h
Created Dec 23, 2015 — forked from hfossli/UIScrollView+ScrollsToTop.h
A simple way to make sure there is only one scrollview which is able to scroll to top at a time
View UIScrollView+ScrollsToTop.h
#import <UIKit/UIKit.h>
@interface UIScrollView (ScrollsToTop)
+ (void)forceNewViewsDefaultValueForScrollsToTop;
+ (void)makeOnlyThisScrollViewScrollToTopOnStatusBarTap:(UIScrollView *)scrollView;
- (void)makeOnlyThisScrollViewScrollToTopOnStatusBarTap;
@end
@ourui
ourui / NSNull+LCFMessageForwarding.h
Created Dec 23, 2015 — forked from leichunfeng/NSNull+LCFMessageForwarding.h
通过重写 NSNull 的消息转发方法,来避免给 [NSNull null] 发消息时的闪退问题
View NSNull+LCFMessageForwarding.h
//
// NSNull+LCFMessageForwarding.h
// NSNull
//
// Created by leichunfeng on 15/12/22.
// Copyright © 2015年 leichunfeng. All rights reserved.
//
#import <Foundation/Foundation.h>
@ourui
ourui / LoadableCategory
Last active Dec 23, 2015
Make all categories in the current file loadable without using -load-all.
View LoadableCategory
/** Make all categories in the current file loadable without using -load-all.
*
* Normally, compilers will skip linking files that contain only categories.
* Adding a call to this macro adds a dummy class, which causes the linker
* to add the file.
*
* @param UNIQUE_NAME A globally unique name.
*/
#define MAKE_CATEGORIES_LOADABLE(UNIQUE_NAME) @interface FORCELOAD_##UNIQUE_NAME : NSObject @end @implementation FORCELOAD_##UNIQUE_NAME @end
You can’t perform that action at this time.