Lable的Left属性是能够更改的,可是 Right属性不能够更改,所以我们能够利用 这个特点做自加 自减运算 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using S
一,效果图. 二,代码. ViewController.m - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. //上面的滚动条 UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(5, 50, 500, 40)]; label.text=@"111111
1.设置UIButton的文字居右显示 [button setContentHorizontalAlignment:UIControlContentHorizontalAlignmentRight]; 2.去掉点击默认置灰效果 [button setAdjustsImageWhenHighlighted:NO]; // default is YES. if YES, image is drawn darker when highlighted(pressed)