hi!
I am quite confused, as the objective C code i see, is generally a mix of syntaxes that sometimes use dot notation and sometimes bracket notation.
like
I wonder why some of the line use dot notation, while some lines use bracket notation ?
Can't everything be written either using dots or using brackets only ?
I am quite confused, as the objective C code i see, is generally a mix of syntaxes that sometimes use dot notation and sometimes bracket notation.
like
Code:
-(void)loadView
{
self.view.backgroundColor = [UIColor whiteColor] ;
UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect] ;
[button setTitle:@"click" forState:UIControlStateNormal];
[self.view addSubview:Button ] ;
}
I wonder why some of the line use dot notation, while some lines use bracket notation ?
Can't everything be written either using dots or using brackets only ?
Last edited by a moderator: