Created
January 20, 2013 04:44
-
-
Save waynehartman/4576715 to your computer and use it in GitHub Desktop.
In response to: https://twitter.com/chrisintx/status/292826255005450240
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UISwitch+ForChrisLowe.h | |
// | |
// Created by Wayne on 1/19/13. | |
// Copyright (c) 2013 WayneHartman. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UISwitch (ForChrisLowe) | |
+ (id)switchWithTarget:(id)target action:(SEL)action forControlEvent:(UIControlEvents)controlEvents; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UISwitch+ForChrisLowe.m | |
// | |
// Created by Wayne on 1/19/13. | |
// Copyright (c) 2013 WayneHartman. All rights reserved. | |
// | |
#import "UISwitch+ForChrisLowe.h" | |
@implementation UISwitch (ForChrisLowe) | |
+ (id)switchWithTarget:(id)target action:(SEL)action forControlEvent:(UIControlEvents)controlEvents { | |
UISwitch *swidge = [[UISwitch alloc] initWithFrame:CGRectZero]; | |
[swidge addTarget:target action:action forControlEvents:controlEvents]; | |
return swidge; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment