How do I pass multiple parameters in Objective-C?

前端 未结 6 1580
感情败类
感情败类 2020-12-02 04:58

I have read several of the post about Objective-C method syntax but I guess I don\'t understand multiple names for a method.

I\'m trying to create a method called

6条回答
  •  温柔的废话
    2020-12-02 05:13

    The text before each parameter is part of the method name. From your example, the name of the method is actually

    -getBusStops:forTime:
    

    Each : represents an argument. In a method call, the method name is split at the :s and arguments appear after the :s. e.g.

    [getBusStops: arg1 forTime: arg2]
    

提交回复
热议问题