Skip to content

Instantly share code, notes, and snippets.

@DylanVann
Created October 23, 2014 08:23
Show Gist options
  • Select an option

  • Save DylanVann/9f29c46d3a4520e571e1 to your computer and use it in GitHub Desktop.

Select an option

Save DylanVann/9f29c46d3a4520e571e1 to your computer and use it in GitHub Desktop.
DVColorLockView - Objective-C
#import <Foundation/Foundation.h>
@interface DVColorLockView : UIView
@property (nonatomic, strong) UIColor *lockedBackgroundColor;
@end
#import "DVColorLockView.h"
@implementation DVColorLockView
- (UIColor *)lockedBackgroundColor {
return super.backgroundColor;
}
- (void)setLockedBackgroundColor:(UIColor*)color
{
super.backgroundColor = color;
}
- (void)setBackgroundColor:(UIColor *)color
{
//Don't set it.
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment