The Reawakened Series (3)
Published in
3 min readSep 10, 2019
#42 埃及王子詩情畫意
身為一個(假)文青,沒事讀兩句情詩也是合情合理
今天的練習是讓畫面一進入後,就自動朗讀畫面上的情詩
參考內容
此篇內容延續前一篇
朗讀內容
- 進入畫面會,會自動朗讀textView的埃及情詩
Poem1 — THE WINE OF LOVE
An Ancient Egyptian Love Poem
Oh! when my lady comes,
And I with love behold her,
I take her into my beating heart
And in my arms enfold her;
My heart is filled with joy divine
For I am hers and she is mine.
Oh! when her soft embraces
Do give my love completeness,
The perfumes of Arabia
Anoint me with their sweetness;
And when her lips are pressed to mine
I am made drunk and need not wine.
程式碼
簡易說明
- 由於每次進入畫面都要念情詩,因此寫在viewWillAppear()事件中
- language 參考Apple文件為 BCP-47
- 由於三個畫面UI相同內容不同,因此UIViewController用同一個,Outlet也拉到同一個