OGeek|极客世界-中国程序员成长平台

标题: objective-c - 如何在页面中添加评论框? [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-11 20:16
标题: objective-c - 如何在页面中添加评论框?

我正在尝试使用您在下图中看到的内容来模拟我的“添加评论”界面。但是,我在 XCode 库中找不到这样的 UI 元素。

这是一个自定义的 UI 元素吗?或者我能否找到与您在图表中看到的外观和感觉相同的 UI?

enter image description here



Best Answer-推荐答案


您可以使用 UIImageView(银灰色背景)和其顶部的 UITextView 来近似它,该 UITextView 具有适当的cornerRadius 集。你需要:

#import <QuartzCore/QuartzCore.h>

为了能够像这样设置 UITextView 的cornerRadius 属性:

    textView.layer.cornerRadius = 1.0f; // play around to see what gives you the above rounded effect to your needs.

关于objective-c - 如何在页面中添加评论框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7560056/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4