iOS textField 和textView的一些用法
(会慢慢补充)
textField:
多个TF取消第一响应: [self.view endEditing:NO];//取消所有textfield 的第一响应
改变TF的placeholder 字体样式:
self.passwordTF.placeholder = @"请输入您的账号(手机号)";
[self.passwordTF setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"];
[self.passwordTF setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];
textView:
设置textView 的文本置顶(YES为居中): self.automaticallyAdjustsScrollViewInsets = NO;
滑动到指定的cell
[self.tableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:YES scrollPosition:UITableViewScrollPositionTop];
取出屏幕可见cell
NSArray *cells = self.tableView.visibleCells;