[btn seBackgroundColor: [UIColor blueColor]]; //最后將按鈕加入到指定視圖superView [superView addSubview: btn]; 二、iOS設(shè)置UIButton的文字顯示位置 1 tvnamelabel=[[UIButton alloc]initWithFrame:CGRectMake(5,5,200,40)]; 這樣初始化的button,文字默認(rèn)顏色是白色的,所有如果背景也是白色的話,是看...
www.dbjr.com.cn/article/936...htm 2025-6-4