1.新增蓝牙权限描述
Xcode报错:-> 0x1af14395c <+8>: b.lo 0x1af143978 ; <+36>
解决方案:info.plist
文件中增加Privacy - Bluetooth Always Usage Description
字段描述
2.TableViewCell 侧滑按钮
iOS 13改变了侧滑按钮的图层结构,新增一层_UITableViewCellSwipeContainerView
获取方法:
- (void)configSwipeBottonWithIndexPath:(NSIndexPath *)indexPath{
UIView *targetView;
for (UIView *t_subView in self.tableView.subviews) {
if (@available(iOS 13.0, *)) {
if ([NSStringFromClass([t_subView class]) isEqualToString:@"_UITableViewCellSwipeContainerView"]) {
for (UIView *t2_subView in t_subView.subviews) {
if ([NSStringFromClass([t2_subView class]) isEqualToString:@"UISwipeActionPullView"]){
targetView = t2_subView;
}
}
}
} else {
if ([NSStringFromClass([t_subView class]) isEqualToString:@"UISwipeActionPullView"]){
targetView = t_subView;
}
}
UIButton *deleteBtn = targetView.subviews[1];
UIButton *settingBtn = targetView.subviews[0];
[self configDeleteBottonWithBotton:deleteBtn];
[self configSettingBottonWithBotton:settingBtn withIndexPath:indexPath];
}
}