*testLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 28)];
testLabel.text = @"测试文本"...,然后设置文本,显示到屏幕上,没有修改坐标。...所以按照UILabel.layer默认的坐标(0, 0),在左上角进行了绘制。
接着,我们尝试使用CoreText来渲染一段文本。...*testLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 20)];
testLabel.text = @"测试文本"...UILabel *testLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 20, 100, 28)];
这是因为frame是在上一层view中坐标的偏移