project_files/HedgewarsMobile/Classes/EditableCellView.m
changeset 4211 7dcbd236ca59
parent 4210 caa9b08990eb
child 4284 57a501a69e5f
equal deleted inserted replaced
4210:caa9b08990eb 4211:7dcbd236ca59
    29     if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {
    29     if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {
    30         delegate = nil;
    30         delegate = nil;
    31 
    31 
    32         textField = [[UITextField alloc] initWithFrame:CGRectZero];
    32         textField = [[UITextField alloc] initWithFrame:CGRectZero];
    33         textField.backgroundColor = [UIColor clearColor];
    33         textField.backgroundColor = [UIColor clearColor];
    34         textField.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
       
    35         textField.delegate = self;
    34         textField.delegate = self;
    36         textField.clearButtonMode = UITextFieldViewModeWhileEditing;
    35         textField.clearButtonMode = UITextFieldViewModeWhileEditing;
    37         textField.clearsOnBeginEditing = NO;
    36         textField.clearsOnBeginEditing = NO;
    38         textField.returnKeyType = UIReturnKeyDone;
    37         textField.returnKeyType = UIReturnKeyDone;
    39         textField.adjustsFontSizeToFitWidth = YES;
    38         textField.adjustsFontSizeToFitWidth = YES;
    75         titleLabel.frame = CGRectMake(boundsX+offset+10, 10, 100, [UIFont labelFontSize] + 4);
    74         titleLabel.frame = CGRectMake(boundsX+offset+10, 10, 100, [UIFont labelFontSize] + 4);
    76         offset += 100;
    75         offset += 100;
    77         skew +=2;
    76         skew +=2;
    78     }
    77     }
    79 
    78 
       
    79     // sometimes the bold property gets lost
       
    80     textField.font = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];
    80     textField.frame = CGRectMake(boundsX+offset+10, skew+10, 300, [UIFont labelFontSize] + 4);
    81     textField.frame = CGRectMake(boundsX+offset+10, skew+10, 300, [UIFont labelFontSize] + 4);
    81 }
    82 }
    82 
    83 
    83 -(void) setSelected:(BOOL)selected animated:(BOOL)animated {
    84 -(void) setSelected:(BOOL)selected animated:(BOOL)animated {
    84     [super setSelected:selected animated:animated];
    85     [super setSelected:selected animated:animated];