Created
May 11, 2013 03:00
-
-
Save Alos/5558737 to your computer and use it in GitHub Desktop.
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
var sexLabel = [[CPTextField alloc] initWithFrame: CGRectMake(40, 430, 100, 30)]; | |
[sexLabel setStringValue:"Sex:"]; | |
[sexLabel setTextColor: [CPColor colorWithHexString:"FFFFFF"]]; | |
[sexLabel sizeToFit]; | |
[self addSubview:sexLabel]; | |
maleRadioButton = [CPRadio radioWithTitle: "Male"]; | |
femaleRadioButton = [CPRadio radioWithTitle: "Female"]; | |
otherRadioButton = [CPRadio radioWithTitle: "Other"]; | |
radioGroup = [maleRadioButton radioGroup]; | |
[femaleRadioButton setRadioGroup:radioGroup]; | |
[otherRadioButton setRadioGroup:radioGroup]; | |
[maleRadioButton setFrameOrigin:CGPointMake(100, 430 )]; | |
[femaleRadioButton setFrameOrigin:CGPointMake(CGRectGetMaxX([maleRadioButton frame]) + 8, CGRectGetMinY([maleRadioButton frame]))]; | |
[otherRadioButton setFrameOrigin:CGPointMake(CGRectGetMaxX([femaleRadioButton frame]) + 8, CGRectGetMinY([femaleRadioButton frame]))]; | |
[self addSubview:maleRadioButton]; | |
[self addSubview:femaleRadioButton]; | |
[self addSubview:otherRadioButton]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'll assume
self
is a CPView subclass.