Witam! Mam problem ze zrozumienie tej definicji funkcji
(NSString)tableView:(UITableView *)tableView titleForHeaderSection:(NSInteger)section{}
moglby ktos napisac co tu sie dzieje...
Witam! Mam problem ze zrozumienie tej definicji funkcji
(NSString)tableView:(UITableView *)tableView titleForHeaderSection:(NSInteger)section{}
moglby ktos napisac co tu sie dzieje...
to jest niepełne
powinno wyglądać tak:
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
return @"jakis tytuł";
}
Po pierwsze to jest implementacja protokołu (interface'u) UITableViewDataSource
- oznacza metodę wywoływaną na obiekcie
(NSString *) określa typ zwracany
(UITableView *)tableView - określa dla jakiej tabeli należy dostarczyć tytuł
(NSInteger)section - określa numer sekcji dla której potrzebny jest tytuł
tableView: titleForHeaderInSection: to nazwa funkcji (selektor).
To są podstawy składni, dowolny tutorial w sieci wszystko ci wyjaśni.