Last active
April 5, 2023 14:37
-
-
Save DevGW/ab84144bb549e34dbdcef8b1cd55368c to your computer and use it in GitHub Desktop.
Objective-C :: UITableView Methods #objc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma table view methods | |
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { | |
return <#number of sections#> | |
} | |
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |
return <#number of rows in section#> | |
} | |
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |
return <#row height#> | |
} | |
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
static NSString* cellIdentifier = @"CellIdentifier"; | |
UITableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; | |
if (cell == nil) { | |
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; | |
} | |
cell.textLabel.text = @""; | |
return cell; | |
} | |
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment