Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / gist:4468522
Created January 6, 2013 16:53
+ (void)pulseView:(UIView *)view completion:(void (^)(void))block {
// No need for fancy keyframe animation, we can fake this good enough...
[UIView animateWithDuration:0.05 delay:0 options:UIViewAnimationCurveEaseInOut animations:^(void) {
view.layer.transform = CATransform3DMakeAffineTransform(CGAffineTransformMakeScale(0.7, 0.7));
} completion:^(BOOL finished) {
[UIView animateWithDuration:0.12 delay:0 options:UIViewAnimationCurveEaseInOut animations:^(void) {
view.layer.transform = CATransform3DMakeAffineTransform(CGAffineTransformMakeScale(1.1, 1.1));
} completion:^(BOOL finished) {
[UIView animateWithDuration:0.1 delay:0 options:UIViewAnimationCurveEaseInOut animations:^(void) {
@kylefox
kylefox / color.m
Created January 27, 2012 17:45
Generate a random color (UIColor) in Objective-C
/*
Distributed under The MIT License:
http://opensource.org/licenses/mit-license.php
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to