Skip to content

Instantly share code, notes, and snippets.

View matej's full-sized avatar

Matej Bukovinski matej

View GitHub Profile
@matej
matej / CALayer+MBAnimationPersistence.h
Last active February 16, 2023 18:43
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>
#import <UIKit/UIKit.h>
@interface UIImage (Picker)
- (UIColor *)colorAtPosition:(CGPoint)position;
@end
//
// MBStronglyTintedNavigationBar.h
//
// Created by Matej Bukovinski on 21. 10. 13.
// Copyright (c) 2013 Matej Bukovinski. All rights reserved.
//
#import <UIKit/UIKit.h>
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,
@matej
matej / UIAlertView+Blocks.h
Created November 7, 2012 13:49
UIAlertView with blocks support
//
// UIAlertView+Blocks.h
//
// Created by Matej Bukovinski on 19.7.11.
// Copyright 2011 Guerrilla Code. All rights reserved.
//
#import <Foundation/Foundation.h>
#define GCSynthesizeUserDefaultsGetter(cls, key, instance, name) \
- (cls *)name { \
if (!instance) { \
id o = [[NSUserDefaults standardUserDefaults] objectForKey:(key)]; \
if (![o isKindOfClass:[cls class]]) o = nil; \
\
[o retain]; \
[instance release]; \
instance = o; \
} \