I am reading an iOS tutorial, I have a .h and .m file. In the .m file, I write, define some methods like –
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 1;
}
or,
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ChecklistItem"];
return cell;
}
I am not calling these methods anywhere. Still, the output changes on running. How? Are these overriding methods?
If I get your question properly, “you did not call some method but they will be run”
that is true, in
Xcodeyou do not call some of the methods and they will be run automatically. when you put one object in your.xibthere are some related methods that will run on your project.If you want to get ride of them you can simply delete them.