摘要: 原文地址:http://blog.csdn.net/xiaotanyu13/article/details/7711954iOS上面对键盘的处理很不人性化,所以这些功能都需要自己来实现,首先是点击return和屏幕隐藏键盘这个首先引用双子座的博客http://my.oschina.net/plumsoft/blog/42545,他的文章写的很好,对大家的理解很有好处。在 iOS 程序中当想要在文本框中输入数据,轻触文本框会打开键盘。对于 iPad 程序,其键盘有一个按钮可以用来关闭键盘,但是 iPhone 程序中的键盘却没有这样的按钮,不过我们可以采取一些方法关闭它。例如,我们可以实现按下 R 阅读全文
posted @ 2013-10-22 17:38 时光独白 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 方法一:http://blog.csdn.net/xiaotanyu13/article/details/7711954因为屏幕太小的缘故,一个键盘跳出来总是把输入框挡住,所以需要移动屏幕来匹配键盘#pragma mark -#pragma mark解决虚拟键盘挡住UITextField的方法- (void)keyboardWillShow:(NSNotification*)noti{ //键盘输入的界面调整 //键盘的高度 floatheight = 216.0; CGRectframe =self.view.frame; frame.size=CGSize... 阅读全文
posted @ 2013-10-22 17:35 时光独白 阅读(472) 评论(0) 推荐(0) 编辑
摘要: http://site.douban.com/129642/widget/notes/5513129/note/187701199/压入:[menuController popViewController:controller animated:YES];弹出:[self.navigationController popToRootViewControllerAnimated:YES]; 阅读全文
posted @ 2013-10-22 17:00 时光独白 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 从服务器获取的json数据,通过调用dictionary中的objectForKey方法,返回的是一个id类型数据,需要比较这个数据是否为0,所以需要转化成NSInteger方法:NSInteger questionId = [[newQuestion objectForKey:@"question_id"] integerValue];http://stackoverflow.com/questions/6474679/objective-c-convert-id-to-nsinteger 阅读全文
posted @ 2013-10-22 16:43 时光独白 阅读(715) 评论(0) 推荐(0) 编辑
摘要: 1. [password setSecureTextEntry:YES];2. 在XIB中拖入一个 TextField ,在Attributes Inspecter 中把 Secure 那个chekbox给勾上 阅读全文
posted @ 2013-10-22 16:36 时光独白 阅读(301) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/4445173/when-to-use-nsinteger-vs-int 阅读全文
posted @ 2013-10-22 16:12 时光独白 阅读(143) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/zhuqil/archive/2011/08/03/21265241、判断字符串是否相等使用isEqualToString: NSString *astring01 = @"This is a String!"; NSString *astring02 = @"This is a String!"; BOOL result = [astring01 isEqualToString:astring02]; NSLog(@"result:%d",result);2、判断字符不相等:NSStri 阅读全文
posted @ 2013-10-22 15:47 时光独白 阅读(307) 评论(0) 推荐(0) 编辑