随笔分类 -  ios--[编程技巧]

摘要:从StroyBoard得到一个ViewUIViewController *viewController = [[UIStoryboard storyboardWithName:@"MainStoryboard" bundle:NULL] instantiateViewControllerWithIdentifier:@"ResultsController"];[self presentModalViewController:viewController animated:NO];从NIB中得到一个ViewResultsController *rc = [ 阅读全文
posted @ 2013-08-02 12:33 ejllen 阅读(234) 评论(0) 推荐(0)
摘要://获取日期todaysDate=[NSDate date];//显示日期和时间dateFormat = [[NSDateFormatter alloc] init];//NSDate没有自己的输出,需要借助NSDateFormatter以相应格式输出。[dateFormat setDateFormat:@”MMMM d,yyyy hh:mm:ssa”];//设置格式todaysDateString = [dateFormat stringFromDate:todaysDate];//转化成字符串//计算日期相差多少天NSTimeInterval difference;difference = 阅读全文
posted @ 2013-07-31 16:31 ejllen 阅读(296) 评论(0) 推荐(0)