UIButton

UIButton, . , (.. , ) , .

:

valueButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [valueButton addTarget:self action:@selector(openList:) forControlEvents:UIControlEventTouchUpInside];
    valueButton.frame = CGRectMake(160.0, decalageLabel+6.0, 120.0, 20.0);

    [valueButton.titleLabel setTextAlignment:UITextAlignmentRight];
    [valueButton.titleLabel setFont:[UIFont fontWithName:@"Helvetica-Neue-Light" size:17.0]];
    UIColor * colorLabelValue = [[UIColor alloc] initWithRed:131.0/255.0 green:159.0/255.0 blue:86.0/255.0 alpha:1.0] ;

    [valueButton setTitleColor:colorLabelValue forState:UIControlStateNormal];

    if(txtValueField == NULL){
        txtValueField = @"";
    }
    valueButton.titleLabel.text = [NSString stringWithFormat:@"%@", txtValueField];
    NSLog(@"button : %@ ", valueButton.titleLabel.text);
    [self.contentView addSubview:valueButton];

      

, , , NSLogging , . , . ?

+3




1


[[button titleLabel] setTitle:]

. [button setTitle:@"blah" forControlState:UIControlStateNormal]

.



, , ..

+9









All Articles