Monthly Archives: December 2012

How to use varargs….

      No Comments on How to use varargs….

Hi Ever wondered how we give multiple button names in alert view other buttons section…and in many more scenarios.. Ok so how we define a function with varargs.. -(void)getMultipleString:(NSString*)firstString ,… NS_REQUIRES_NIL_TERMINATION; Now the definition -(void)getMultipleString:(NSString*)firstString ,… NS_REQUIRES_NIL_TERMINATION { va_list  t; va_start(t, firstString); id obj; for (obj = firstString; obj !=… Read more »