随笔分类 - IOS
记录一些IOS开发需要用到的函数,或者一些基础知识
摘要:IOS中键盘是在编辑控件获得第一响应者时出现,编辑控件有UITextField,UITextView等,这里以UITextField做为例子。首先实现UITextFieldDelegate中的几个方法:#pragma mark - UITextFieldDelegate-(BOOL)textFieldShouldBeginEditing:(UITextField*)textField{ //注册键盘出现和消失的通知中心 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardW...
阅读全文
摘要:以下代码中dataArray是存储数据的数组,mainTableView是UITableView控件1.在UITableView的最底部插入-(void)loadTheLastCell{ int lastIndex = [dataArray count]-1; if(lastIndex>=0) { NSIndexPath *path = [NSIndexPath indexPathForRow:lastIndex inSection:0]; NSArray* tArray = [NSArray arrayWithObject:path]; ...
阅读全文
浙公网安备 33010602011771号