我正在为 iPad 编写一个 UI,其中一部分 UI 需要某些部分的进度条。但是,我发现配置 UIProgressView 很困难。要求之一是进度视图的端点是方形的,但是,我无法通过图层的角半径属性进行配置:
fProgressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleBar];
fProgressView.layer.borderColor = [UIColor whiteColor].CGColor;
fProgressView.progress = 0.5f;
fProgressView.progressImage = nil;
fProgressView.trackImage = nil;
fProgressView.trackTintColor = self.fPatientListPanelColor;
fProgressView.progressTintColor = [UIColor whiteColor];
[fProgressView.layer setCornerRadius:1.0f];
[self.view addSubView:fProgressView]
我发现我也无法控制它的高度。关于如何克服这些问题的任何想法?