gpt4 book ai didi

ios - 如何更改 TextView 的文本颜色?

转载 作者:行者123 更新时间:2023-11-28 22:12:03 26 4
gpt4 key购买 nike

我试过使用:

    hintView.textColor = [UIColor greenColor];  



- (IBAction)secondHintq:(id)sender {

if(!btn2Pressed) {
if((coins -10) >= 0){
coins = coins -10;
score = score -2;


coinsLabel.text = [NSString stringWithFormat:@"%d",coins];
hintView.text = @"Type in text here 2";

[_candletwo setImage:[UIImage imageNamed:@"candle2_03.png"] forState:UIControlStateNormal];
coinsLabel.text = [NSString stringWithFormat:@"%d",coins];
self.candlethree.hidden = NO;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];


CGPoint center = [_candlethree center];
center.x = 160;
center.y = 70;
[_candlethree setCenter:center];

[UIView commitAnimations];
btn2Pressed = true;



}
else{
//Show an alert that the user has not enough coins
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"TITLE" message:@"MESSAGE" delegate:nil cancelButtonTitle:@"RETURN BUTTON" otherButtonTitles:nil];
[alert show];

}
}
}

我怎样才能让它发挥作用?

最佳答案

也许尝试做这样的事情:

[hintView setTextColor:[UIColor greenColor]];

如果您使用的是 IB,还要确保 socket 连接正确。

关于ios - 如何更改 TextView 的文本颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22667800/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com