在Xcode專案中匯入自定義的字型

2021-09-01 22:48:16 字數 379 閱讀 4897

1. 將你的font的ttf檔案匯入到專案裡。

2. 找到專案的info.plist檔案。 如果你沒有手動修改過上述的檔案,它的預設名字應該是[專案名]-info.plist

4. 在裡面的item項裡新增你的font檔案的名字 使用的方法如下: [thelabel setfont:[uifont fontwithname:@"font的名字" size:20]];

※font名字的確認方法如下: 利用mac系統自帶的font book程式開啟你的ttf檔案,在標題欄裡顯示的文字就是你的字型的名字。 例如下圖中,ostrich sans就是字型的名字。

在專案中如何自定義的Eslint配置

在你的前端專案中找到.eslintrc.js檔案,如圖 module.exports env extends plugin vue recommended eslint recommended add your custom rules here it is base on rules vue ht...

php 專案中自定義日誌方法

在現在專案中之前沒有定義日誌的方法,每次除錯起來很麻煩,經常不能輸出引數,只能用寫日誌的方法,一直用file put contents很煩躁,於是用了一點時間,寫了這樣乙個方法 日誌生成類 write by vson time 2017 06 14 for record and check clas...

vue專案中匯入swiper外掛程式的方法

安裝 npm i swiper 3.4.2 s swiper的使用方法分為3個流程 1 載入外掛程式 2 html內容 3 初始化swiper 我也按照這個流程編寫元件 1 載入外掛程式 import swiper from swiper import swiper dist css swiper....