ios - How to Declare Global Variable in Swift? -


this question has answer here:

i creating app in have declare constant global. in obj c use pch file don't know how define in swift? example

in obj c .pch file if declare

define red [uicolor redcolor]

then works through out application.

all need create constants.swift (or ever want name it) file , add ever constants need it.

let myvariable = "some value" let myothervariable = "something else" 

they available throughout application.


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

php - Improving script execution time -

How to provide Authorization & Authentication using Asp.net, C#? -