不,蓝牙徽标不是字形或字体字符.
就像 Seva 说的,它是符文 Hagall (?) 和 Bjarkan (?) 的组合。我试图通过组合两个符号来做同样的事情。
我通过首先找到具有这两个字符的字体来完成此操作。我最终使用了 LeedsUni。你可以在这里下载:http : //www.personal.leeds.ac.uk/~ecl6tam/。
您需要在 info.plist 中引用字体所在的路径。
<key>UIAppFonts</key>
<array>
<string>Fonts/LeedsUni10-12-13.ttf</string>
</array>
Run Code Online (Sandbox Code Playgroud)
然后我创建了两个相互重叠的UIView对象(UIButton在我的例子中是对象),以便两个字符正确排列。根据您使用的字体,您可能需要调整 UIView 框架的 x 和 y 值。
我的代码在 C# 中,因为我使用的是 Xamarin,但您应该能够在 Objective C 或 Swift 中做同样的事情。
UIView bleView = new UIView(new CGRect(0, 0, 34.0f, 34.0f));
string fontName = "LeedsUni";
UIButton bluetoothToSerialButton = new UIButton(UIButtonType.RoundedRect);
bluetoothToSerialButton.Frame = new CGRect(0, 0, 34.0f, 34.0f);
bluetoothToSerialButton.SetTitleColor(UIApplication.SharedApplication.Delegate.GetWindow().TintColor, UIControlState.Normal);
bluetoothToSerialButton.SetTitle("?", UIControlState.Normal);
bluetoothToSerialButton.Font = UIFont.FromName(fontName, 34.0f);
UIButton bluetoothToSerialButton2 = new UIButton(UIButtonType.RoundedRect);
bluetoothToSerialButton2.Frame = new CGRect(-3.5f, 0, 34.0f, 34.0f);
bluetoothToSerialButton2.SetTitleColor(UIApplication.SharedApplication.Delegate.GetWindow().TintColor, UIControlState.Normal);
bluetoothToSerialButton2.SetTitle("?", UIControlState.Normal);
bluetoothToSerialButton2.Font = UIFont.FromName(fontName, 34.0f);
bleView.AddSubviews(new UIView[] { bluetoothToSerialButton, bluetoothToSerialButton2 });
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8218 次 |
| 最近记录: |