Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Method naming in Objective-C  RSS feed

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,
This Objective-C method takes two parameters.
-replaceSubview:oldView with:newView;
replaceSubview is the method name
oldView is the first parameter name.
What is 'with' and 'newView'?
Thanks for help and time.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66182
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Objective-C uses smilies in its syntax?
 
Campbell Ritchie
Marshal
Posts: 55668
161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It must take two parameters, replacing the first parameter in the object with the second parameter. It seems a peculiar method to write, passing a value which might or might not be a field of your object already, then another value to replace it with which might already be a field of your obect (or might not).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!