What does id<…> mean in Objective-C?

后端 未结 5 1592
太阳男子
太阳男子 2021-01-03 22:48

I\'m trying to use Google Analytics in an iOS application, and I saw this portion of code :

id tracker = [[GAI sharedInstance] defaultTrack         


        
5条回答
  •  悲哀的现实
    2021-01-03 23:24

    id

    id can hold any type of object.

    id tracker

    This means the tracker is an id type object, which can hold objects those confirms to GAITracker protocol

提交回复
热议问题