My protocol definition is not visible in another Swift file -


i have 2 files: dbstartviewcontroller.swift , dbfindviewcontroller.swift

when define protocol:

protocol dbviewanimationtransitioning {     var viewforanimation: uiview? { set } } 

in dbstartviewcontroller.swift not visible in dbfindviewcontroller.swift. error:

use of undeclared type dbviewanimationtransitioning.

but when move declaration dbfindviewcontroller.swift ok. why works that?

i need have in dbstartviewcontroller.swift make code clean , clear.

if classes reside in separate app targets, make sure use public access modifier protocol. default it's internal, means it's shared within module, not visible outside.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -