Created
April 10, 2013 19:34
-
-
Save tmaybe/5357731 to your computer and use it in GitHub Desktop.
Snippet for a quick UIButton in Objective-C
This file contains 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
UIButton *tmpButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; | |
tmpButton.frame = CGRectMake(0, 0, 100, 50); | |
[tmpButton addTarget:self action:@selector(pressButton:) forControlEvents:UIControlEventTouchUpInside]; | |
[tmpButton setTitle:@"TEST" forState:UIControlStateNormal]; | |
[self.view addSubview:tmpButton]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment