You are not allowed to add pages
Direct Link
Direct Link
let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String let build = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as? String
button.contentHorizontalAlignment = .right
- (void)initialize { _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; [_tableView setDataSource:self]; [_tableView setDelegate:self]; [_tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone]; [_tableView setBackgroundColor:[UIColor clearColor]]; if (@available(iOS 15.0, *)) { _tableView.sectionHeaderTopPadding = 0; } [self addSubview:_tableView]; }
在ViewController中 viewDidLoad()添加偏移
let screenWidth = UIScreen.main.bounds.size.width let uiWidth = 84.5 * 12 var uiOffsetX = (screenWidth - uiWidth) / 2 if(uiOffsetX<0.0) {uiOffsetX = 0.0}