Created
May 5, 2013 09:39
-
-
Save jontelang/5520315 to your computer and use it in GitHub Desktop.
toggle
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
-(void)setToggle:(BOOL)arg | |
{ | |
... | |
[toggleButton removeFromSuperview]; | |
toggleButton = Nil; | |
if(arg) | |
{ | |
... | |
toggleButton = [[UIView alloc] initWithFrame:CGRectMake(295,0,25,25)]; | |
UITapGestureRecognizer* tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(togglePiano:)]; | |
[toggleButton addGestureRecognizer:tap]; | |
toggleButton.backgroundColor = [UIColor clearColor]; | |
[self addSubview:toggleButton]; | |
[tap release]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment