摘要: 最近在一个数独网站玩数独游戏,网站地址为:http://www.sudokufans.org.cn/。 阅读全文
posted @ 2013-02-05 13:48 xiaoxiaoxigua 阅读(172) 评论(0) 推荐(0) 编辑
摘要: NSDictionary *dic = [NSDictionarydictionaryWithObjectsAndKeys:[UIColorblackColor],UITextAttributeTextColor, [UIFontfontWithName:@"SnellRoundhand-Bold"size:14],UITextAttributeFont ,[UIColorwhiteColor],UITextAttributeTextShadowColor ,nil]; [segment setTitleTextAttributes:dic forState:UIContr 阅读全文
posted @ 2013-02-05 11:55 xiaoxiaoxigua 阅读(7474) 评论(0) 推荐(0) 编辑
摘要: 只是修改了官方的demo- (void)viewDidLoad{ [superviewDidLoad];// Do any additional setup after loading the view, typically from a nib. [[NSNotificationCenterdefaultCenter] addObserver:selfselector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotificationobject:nil]; [[NSNotificationCenterdefaultCe... 阅读全文
posted @ 2013-01-24 17:51 xiaoxiaoxigua 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-01-07 15:21 xiaoxiaoxigua 阅读(2292) 评论(0) 推荐(0) 编辑
摘要: 1、定义一个要保留的常量 #define NUMBERS @"0123456789.\n"2、实现delegate3、- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ NSCharacterSet *cs; cs = [[NSCharacterSetcharacterSetWithCharactersInString:NUMBERS] invertedSet]; NSStri 阅读全文
posted @ 2012-12-20 10:31 xiaoxiaoxigua 阅读(478) 评论(0) 推荐(0) 编辑
摘要: //获取当前时间 NSDate *now = [NSDate date]; NSLog(@”now date is: %@”, now); NSCalendar *calendar = [NSCalendar currentCalendar]; NSUInteger unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; NSDateComponents *dat... 阅读全文
posted @ 2012-12-17 11:31 xiaoxiaoxigua 阅读(792) 评论(0) 推荐(0) 编辑
摘要: 以下代码转自CocoaChina会员的博客(FLYBLOG),能实现从iPhone压缩图片并上传至服务器的功能http://www.cocoachina.com/iphonedev/sdk/2010/0506/1349.htmlhttp://www.189works.com/article-80022-1.html 阅读全文
posted @ 2012-12-04 11:55 xiaoxiaoxigua 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 一、{ } 大括号,表示定义一个对象,大部分情况下要有成对的属性和值,或是函数。如:var LangShen = {"Name":"Langshen","AGE":"28"};上面声明了一个名为“LangShen”的对象,属性名和值用(冒号)隔开,多个属性或函数用,(逗号)隔开,因为是对象的属性,所以访问时,应该用.(点)来层层访问:LangShen.Name、LangShen.AGE,当然我们也可以用数组的方式来访问,如:LangShen["Name"]、LangShen["AGE& 阅读全文
posted @ 2012-12-03 15:29 xiaoxiaoxigua 阅读(3427) 评论(0) 推荐(0) 编辑
摘要: NSCharacterSet *whitespace = [NSCharacterSetwhitespaceAndNewlineCharacterSet];NSString *username= [mUsernameField stringValue];username = [usernamestringByTrimmingCharactersInSet:whitespace]; 阅读全文
posted @ 2012-11-28 10:27 xiaoxiaoxigua 阅读(226) 评论(0) 推荐(0) 编辑
摘要: CGRect rect = [tableView convertRect:[tableView rectForRowAtIndexPath:indexPath] toView:[tableView superview]]; 阅读全文
posted @ 2012-11-26 16:38 xiaoxiaoxigua 阅读(297) 评论(1) 推荐(0) 编辑