我是xcode的新手,想要为1px宽的UIButton添加黑色轮廓。我在Xcode中通过检查员搜索了UIButton,但找不到设置。我已经阅读了有关UIButton的文档,但它似乎没有这个特定的功能。是否可以为UIButton添加彩色轮廓?
答案 0 :(得分:3)
您可以通过访问其图层并修改
来为视图添加轮廓 borderWidth
和borderColor
答案 1 :(得分:2)
在viewDidLoad()中我放了:
<div class="container">
<form class='form-group search-form'>
<div class="grid">
<div class="row">
<div class="col-sm-4" >
<label for="gif-search" class='lead'>What type of gif are you looking for?</label>
<input type="text" id="gif-search" class="form-control" placeholder='dancing bears' />
</div>
</div>
<div class="row">
<button type="submit" class='btn btn-danger search-form' id="gif-search-button">Find that gif</button>
</div>
</div>
</form>
<div id="resultGif">
</div>
</div>