I've seen many answer on stackoverflow. All answer says method overloading not possible in objective c. But currently i've made a real example so its working for me. So i'm totally confused. May be i'm wrong but according to java concept i'm right. So any one make me more clear and any help will be very appriciated.
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[self show];
[self show:@"Foo......"];
}
- (void)show
{
NSLog(@"Show");
}
- (void)show:(NSString *)str
{
NSLog(@"Str %@",str);
}
Output
Show
Str Foo......