LoginSignup
4
3

More than 5 years have passed since last update.

ボタンに下線をつける

Posted at

既にボタン(dummyButton)がある前提で、ボタンに下線をつけてみます。

// 下線を生成
UIView *border = [[UIView alloc] initWithFrame:CGRectMake(0, _dummyButton.frame.size.height - 0.5f, _dummyButton.frame.size.width, 0.5)];

// 下線の色を設定
border.backgroundColor = [UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:1];

// ボタンに下線を追加 
[_dummyButton addSubview:border];
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3