// cell选中不变色
cell.selectionStyle = UITableViewCellSelectionStyleNone;
// 隐藏tableView分割线
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
// 隐藏底部tabbar
LoginViewController *loginVC = [[LoginViewController alloc] init];
loginVC.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:loginVC animated:YES];
//此处设置的返回按钮文字为"返回",被修改的页面是下一个页面,自己的返回按钮还是"back",没有变成"返回"
UIBarButtonItem *returnButtonItem = [[UIBarButtonItem alloc] init];
returnButtonItem.title = @"返回";
self.navigationItem.backBarButtonItem = returnButtonItem;
// 隐藏导航栏
self.navigationController.navigationBarHidden = YES;
// tableView禁止滑动
self.tableView.scrollEnabled = NO;
// 设置导航栏颜色
self.navigationController.navigationBar.barTintColor = mainColor;
// 设置导航栏字体的颜色和大小
[self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:k6AutoSize(22)], NSForegroundColorAttributeName:[UIColor whiteColor]}];
// 设置左右两个按钮的颜色
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
// scrollView一页一页的滚动
self.scrollView.pagingEnabled = YES;
// 左侧边缘滑动返回
UIScreenEdgePanGestureRecognizer *screenEdgePanGR = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(backEvent)];
screenEdgePanGR.edges = UIRectEdgeLeft;
[self.view addGestureRecognizer:screenEdgePanGR];
// 给view添加点击事件
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] init];
[tapGesture addTarget:self action:@selector(action)];
[view addGestureRecognizer:tapGesture];
// 给右侧navigationItem添加事件
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"提交" style:(UIBarButtonItemStyleDone) target:self action:@selector(submitIdentityInformation)];
// 禁止TextField编辑
self.textField.enabled = NO;
// tag值的使用
UILabel *label = (UILabel *)[self.view viewWithTag:1001];
// 判断是否是汉字
for (int i = 0; i < self.identityInformationView.nameTextField.text.length; i++) {
NSRange range = NSMakeRange(i, 1);
NSString *subString = [self.identityInformationView.nameTextField.text substringWithRange:range];
const char *cString = [subString UTF8String];
if (strlen(cString) != 3) {
// 是汉字
}
}
// 复制文字到剪切板
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = @"100000";
// 工程目录