码迷,mamicode.com
首页 > 移动开发 > 详细

Delphi 取得 iOS 辅助使用里的字型大小

时间:2015-11-20 07:02:17      阅读:285      评论:0      收藏:0      [点我收藏+]

标签:

说明:在 iOS 里有一个人性化的辅助设定,可以将字体放大,但这个设定对 Delphi 是不起作用的,还好 Delphi 提供了这个 iOS API 可以取得。

开发环境:Delphi 10 Seattle

运行系统:iOS 7.0 以上

参考资料:Apple 官网

技术分享 技术分享
技术分享 技术分享
技术分享 技术分享

 

源码:

function iOSFontSize: Single;
var f: UIFontDescriptor;
begin
     f := TUIFontDescriptor.OCClass.preferredFontDescriptorWithTextStyle(UIFontTextStyleBody);
     Result := f.pointSize;
end;

 

Delphi 取得 iOS 辅助使用里的字型大小

标签:

原文地址:http://www.cnblogs.com/onechen/p/4979655.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!