Skip to content

Instantly share code, notes, and snippets.

@DavidBarry
Created May 29, 2013 21:18
Show Gist options
  • Save DavidBarry/5673919 to your computer and use it in GitHub Desktop.
Save DavidBarry/5673919 to your computer and use it in GitHub Desktop.
Because reasons.
//
// UILabel+LegitShadowOffset.h
//
// Created by David Barry on 5/29/13.
// Copyright (c) 2013 David Barry. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UILabel (LegitShadowOffset)
@property (assign, nonatomic) UIOffset legitShadowOffset;
@end
//
// UILabel+LegitShadowOffset.m
//
// Created by David Barry on 5/29/13.
// Copyright (c) 2013 David Barry. All rights reserved.
//
#import "UILabel+LegitShadowOffset.h"
@implementation UILabel (LegitShadowOffset)
- (UIOffset)legitShadowOffset {
CGSize shadowOffset = self.shadowOffset;
return UIOffsetMake(shadowOffset.width, shadowOffset.height);
}
- (void)setLegitShadowOffset:(UIOffset)legitShadowOffset {
self.shadowOffset = CGSizeMake(legitShadowOffset.horizontal, legitShadowOffset.vertical);
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment