Skip to content

Instantly share code, notes, and snippets.

View ourui's full-sized avatar

Ourui ourui

  • iQIYI
  • ShangHai. China
View GitHub Profile
@ourui
ourui / ReversingAsset.m
Created March 5, 2018 08:31
Reversing Video
#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];
@ourui
ourui / CALayer+MBAnimationPersistence.h
Created January 2, 2020 03:36 — 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.
//
// CALayer+MBAnimationPersistence.h
//
// Created by Matej Bukovinski on 19. 03. 14.
// Copyright (c) 2014 Matej Bukovinski. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>