随笔分类 -  ios

摘要:http://stackoverflow.com/questions/9961626/why-am-i-getting-an-integer-to-pointer-conversion-error-in-objective-c用[NSNumber numberWithInteger:id]转化下 阅读全文
posted @ 2013-11-22 15:42 时光独白 阅读(4352) 评论(0) 推荐(0)
摘要:检查- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;返回结果 阅读全文
posted @ 2013-10-28 10:05 时光独白 阅读(204) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/2156015/remove-all-subviews 阅读全文
posted @ 2013-10-24 12:40 时光独白 阅读(343) 评论(0) 推荐(0)
摘要:原文地址: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 时光独白 阅读(429) 评论(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 时光独白 阅读(508) 评论(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 时光独白 阅读(203) 评论(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 时光独白 阅读(726) 评论(0) 推荐(0)
摘要:1. [password setSecureTextEntry:YES];2. 在XIB中拖入一个 TextField ,在Attributes Inspecter 中把 Secure 那个chekbox给勾上 阅读全文
posted @ 2013-10-22 16:36 时光独白 阅读(316) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/4445173/when-to-use-nsinteger-vs-int 阅读全文
posted @ 2013-10-22 16:12 时光独白 阅读(153) 评论(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 时光独白 阅读(320) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/wujian1360/archive/2011/09/05/2167992.html 阅读全文
posted @ 2013-10-21 09:28 时光独白 阅读(121) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/13567455/property-count-not-found-on-object-of-type-nsmutablearray-po-command-in-ll 阅读全文
posted @ 2013-10-20 18:24 时光独白 阅读(447) 评论(0) 推荐(0)
摘要:http://blog.sina.com.cn/s/blog_55f899fb0102dqi2.html 阅读全文
posted @ 2013-10-18 17:38 时光独白 阅读(224) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/elfsundae/archive/2010/11/30/1892544.html 阅读全文
posted @ 2013-10-18 17:37 时光独白 阅读(150) 评论(0) 推荐(0)
摘要:http://www.cocoachina.com/bbs/read.php?tid=62704重启解决 阅读全文
posted @ 2013-10-18 16:35 时光独白 阅读(294) 评论(0) 推荐(0)
摘要:http://blog.csdn.net/totogo2010/article/details/7669837 阅读全文
posted @ 2013-10-18 16:03 时光独白 阅读(97) 评论(0) 推荐(0)
摘要:http://mobile.51cto.com/iphone-392479.htm 阅读全文
posted @ 2013-10-18 15:27 时光独白 阅读(135) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/12328026/how-to-remove-all-references-for-outlet 阅读全文
posted @ 2013-10-17 15:40 时光独白 阅读(171) 评论(0) 推荐(0)
摘要:http://stackoverflow.com/questions/446405/adjust-uilabel-height-depending-on-the-text根据内容动态设置UILabel高度 阅读全文
posted @ 2013-10-17 13:00 时光独白 阅读(135) 评论(0) 推荐(0)
摘要:原文地址:http://blog.csdn.net/likendsl/article/details/7566305我们做iOS程序开发时经常用遇到EXC_BAD_ACCESS错误导致Crash,出现这种错误时一般Xcode不会给我们太多的信息来定位错误来源,只是在应用Delegate上留下像Thread 1: Program received signal:"EXC_BAD_ACCESS",让问题无从找起。比如你对已释放的对象发送消息时就会出现,EXC_BAD_ACCESS,再如release的对象再release,release那些autorelease的对象等也会报这 阅读全文
posted @ 2013-10-17 10:07 时光独白 阅读(325) 评论(0) 推荐(0)