Code
  • 首页
  • cpu-architecture
  • performance
  • c++
  • branch-prediction
  • java
2023-11-09 10:00:00

以编程方式设置UIButton标题UILabel字体大小

ioscocoa-touchobjective-cfont-sizeuibutton

我需要通过编程方式设置UIButton标题UILabel的字体大小。


当前回答

快4.倍

button.titleLabel?.font = UIFont.systemFont(ofSize: 20)
2019-04-25 02:53:30

其他回答

button.titleLabel.font = [UIFont systemFontOfSize:size];

应该帮助

2009-09-23 11:01:59

你可以使用:

button.titleLabel.font = [UIFont systemFontOfSize:14.0];
2015-07-08 10:51:38

希望对你有所帮助

[_button.titleLabel setFont:[UIFont systemFontOfSize:15]];  

祝你好运

2009-11-23 22:59:52

斯威夫特3:

myButton.titleLabel?.font = myButton.titleLabel?.font.withSize(40)
2017-03-10 06:56:00

快4.倍

button.titleLabel?.font = UIFont.systemFont(ofSize: 20)
2019-04-25 02:53:30

推荐文章

  • 如何删除默认的导航栏空间在SwiftUI导航视图
  • 如何在iOS中使用Swift编程segue
  • Swift -整数转换为小时/分钟/秒
  • Swift:声明一个空字典
  • 为什么ARC仍然需要@autoreleasepool ?
  • 在成功提交我的应用程序后,“太多符号文件”
  • 首先添加一个UIView,甚至是导航栏
  • 我如何改变UIButton标题颜色?
  • 如何从UIImage (Cocoa Touch)或CGImage (Core Graphics)获取像素数据?
  • 在Swift中如何调用GCD主线程上的参数方法?
  • NSLayoutConstraints是可动画的吗?
  • iOS -构建失败,CocoaPods无法找到头文件
  • Xcode 4挂在“附加到(应用程序名称)”
  • CFNetwork SSLHandshake iOS 9失败
  • 请求失败:不可接受的内容类型:文本/html使用AFNetworking 2.0

aliyun

最新文章

  • 如何删除默认的导航栏空间在SwiftUI导航视图
  • 我可以列出所有的标准Go包吗?
  • 证书验证失败:无法获得本地颁发者证书
  • 警告:API ' variable . getjavacompile()'已过时,已被' variable . getjavacompileprovider()'取代
  • 打开同一目录两次
  • 实体框架核心:在上一个操作完成之前,在此上下文中开始的第二个操作
  • NullInjectorError: AngularFirestore没有提供程序
  • 如何为构造函数定制Visual Studio的私有字段生成快捷方式?
  • 从元组/数组值派生联合类型
  • 如何在Angular2中截断文本?
  • 安装tzdata非交互式
  • ionic 2 - Error在Android Studio中找不到Gradle的安装版本
  • 如何查看所有地区所有正在运行的Amazon EC2实例?
  • 当使用pip3安装包时,“Python中的ssl模块不可用”
  • 安装APK时出现错误

标签

cpu-architectureperformancec++branch-predictionjavaundogit-commitgitversion-controlgit-remotegit-pushgit-branchgit-pullgit-fetchpythongeneratoriteratorjsonmime-typescontent-typearraysjavascriptgit-addcode-formattingcstandards-complianceoperatorscommentsdynamic-memory-allocationstackmemory-managementheap-memorylanguage-agnosticoverwritebackground-colorbrowserhtmldomjqueryvisibilityuse-strictsyntaxjslintremote-branchgit-checkoutpython-moduleidiomsprogram-entry-pointnamespacesbranch
2025 code 京ICP备15047053号-1