Skip to content

Instantly share code, notes, and snippets.

View d-ronnqvist's full-sized avatar

David Rönnqvist d-ronnqvist

View GitHub Profile

The UIView animation API results in different CAAnimations being added to the layer on iOS 7 and 8. Changing the bounds of a view like this:

[UIView animateWithDuration:0.3 
                 animations:^{
    self.myView.bounds = CGRectMake(0, 0, 100, 100); // was (0,0) (200, 200)
}];

will result in one animation for the bounds key path being added to the backing layer if you are running iOS 7:

@d-ronnqvist
d-ronnqvist / synthesize-readonly-in-subclass.m
Created July 14, 2014 09:13
Synthesizing a read-only property in a subclass overrides custom accessor
@interface Foo : NSObject
// some read-only property ...
@property (nonatomic, copy, readonly) NSString *bar;
@end
@implementation Foo
// ... with a custom accessor
- (NSString *)bar
{
return @"Foo";

Keybase proof

I hereby claim:

  • I am d-ronnqvist on github.
  • I am ronnqvist (https://keybase.io/ronnqvist) on keybase.
  • I have a public key whose fingerprint is 710B 9F42 55FC B0E9 DB06 9C2A 563F 6E00 ACB3 4F92

To claim this, I am signing this object: