Swift : Deprecated construct