top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to write a function to accept any type of parameter in SWIFT

0 votes
380 views

How to write a function to accept any type of parameter instead of writing different function for different parameter type. I am facing this situation because i need to do same functionality for different types of parameter.

posted Aug 14, 2014 by Arun

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Use AnyObjects or Generics depends on ur requirement.

answer Aug 14, 2014 by anonymous
Similar Questions
0 votes

I am facing situation to use external parameter name to a function parameter name .. How to achieve this

0 votes

How to set return type for function in SWIFT.

+1 vote

How to declare single parameter which accept multiple values.

+1 vote

How to use default values for parameter in function. What will happens when value is not passed for a default parameters.

0 votes

Is it possible to set multiple return type for function in SWIFT. If yes please provide me syntax .

...