Play-/Source/ui_ios/ResolutionFactorSelectorViewController.mm

23 lines
641 B
Text
Raw Normal View History

2019-04-08 20:27:54 -04:00
#import "ResolutionFactorSelectorViewController.h"
@implementation ResolutionFactorSelectorViewController
2020-12-02 18:37:31 -05:00
- (void)viewDidAppear:(BOOL)animated
2019-04-08 20:27:54 -04:00
{
int index = log2(self.factor);
2020-12-02 18:37:31 -05:00
UITableViewCell* cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:index inSection:0]];
2019-04-08 20:27:54 -04:00
if(cell != nil)
{
cell.accessoryType = UITableViewCellAccessoryCheckmark;
}
}
2020-12-02 18:37:31 -05:00
- (void)tableView:(UITableView*)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath
2019-04-08 20:27:54 -04:00
{
self.factor = 1 << [indexPath row];
2020-12-02 18:37:31 -05:00
[tableView deselectRowAtIndexPath:indexPath animated:YES];
[self performSegueWithIdentifier:@"returnToSettings" sender:self];
2019-04-08 20:27:54 -04:00
}
@end