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
Post a Comment