クリックしながら、この写真のような大きな文字が欲しいです。
新しいボタン「ក」に対してこれを行うにはどうすればよいですか?これは私がボタンを作成するコードです:
consonantButton = [UIButton buttonWithType:UIButtonTypeCustom];
[consonantButton setTitle:@"ក" forState:UIControlStateNormal];
consonantButton.titleLabel.font = [UIFont fontWithName:@"Hanuman" size:30];
consonantButton.frame = CGRectMake(242.0, 328.0, 27.0, 42.0);
[consonantButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[consonantButton setTitleShadowColor:[UIColor whiteColor] forState:UIControlStateNormal];
// [consonantButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
// [consonantButton setTitleShadowColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
// consonantButton.titleLabel.shadowOffset = CGSizeMake(0, -1);
[consonantButton setBackgroundImage:[UIImage imageNamed:@"doneButtonNormal-khmer"] forState:UIControlStateNormal];
// [consonantButton setBackgroundImage:[UIImage imageNamed:@"doneButtonHighlighted-khmer"] forState:UIControlStateHighlighted];
[consonantButton addTarget:self action:@selector(touchConsonantButton:) forControlEvents:UIControlEventTouchUpInside];
クリックするとこんな形になりますか?それはなんと呼ばれていますか ?これは私がアクションのために行ったコードです:-(void)touchConsonantButton:(UIButton *)sender {// [self.target PerformSelector:consonantAction withObject:sender]; consonantButton.frame = CGRectMake(242.0、310.0、54.0、84.0); consonantButton.titleLabel.font = [UIFont fontWithName:@ "Hanuman" size:50];}
これがスクリーンショットです:(デフォルトでは消えません)