gpt4 book ai didi

ios - View 边框中的边框类型 (iOS)

转载 作者:可可西里 更新时间:2023-11-01 03:09:45 24 4
gpt4 key购买 nike

您知道是否可以在 View 中应用边框类型吗?

我能做到

#import <QuartzCore/QuartzCore.h>
...
view.layer.borderColor = [UIColor redColor].CGColor;
view.layer.borderWidth = 3.0f;

但我不知道如何对我的 View 应用不同的边框(- - - - -、--------等)。我该怎么做?

感谢您的宝贵时间!

最佳答案

如果你想要自定义边框,你需要在 -drawRect: 中自己绘制它们。

关于ios - View 边框中的边框类型 (iOS),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5023799/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com