小编Osc*_*eli的帖子

iPhone - 关闭多个ViewControllers

我有一个很长的View Controllers层次结构;

在第一个View Controller中我使用此代码:

SecondViewController *svc = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
[self presentModalViewController:svc animated:YES];    
[svc release];
Run Code Online (Sandbox Code Playgroud)

在第二个View Controller中,我使用以下代码:

ThirdViewController *tvc = [[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil];
[self presentModalViewController:tvc animated:YES];    
[tvc release];
Run Code Online (Sandbox Code Playgroud)

等等.

所以有一段时间我有很多View Controllers,我需要回到第一个View Controller.如果我一次回来一步,我会在每个View Controller中使用这段代码:

[self dismissModalViewControllerAnimated:YES];
Run Code Online (Sandbox Code Playgroud)

如果我想直接从第六个View Controller返回到第一个,我必须做什么才能立即解除所有控制器?

谢谢

iphone uiviewcontroller dismiss

45
推荐指数
6
解决办法
4万
查看次数

UILabel淡出淡出问题

我在NSTimer选择器中得到以下代码:

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:2.0];
[infoLbl setAlpha:0];
[UIView commitAnimations];

[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:2.0];
[infoLbl setAlpha:1];
[UIView commitAnimations];
Run Code Online (Sandbox Code Playgroud)

所以我想在UILabel(infoLbl)上实现一个简单的淡入/淡出循环.

好吧,使用这段代码,我只得到了淡入淡出的步骤,因为UILabel突然消失,然后淡入.

一些建议?

谢谢.

iphone animation fade uilabel

2
推荐指数
1
解决办法
7423
查看次数

SQL Server smalldatetime与datetime2

我已经阅读了几篇有关在SQL Server中使用支持日期的数据类型的文章,但是我仍然不确定要使用哪种数据。

所有人都说使用新的强大datetime2类型,但是smalldatetime在内存方面(6字节对4字节)仍然更加方便

这是我的范围:

以这种方式定义的表:

Date: typeof(<Date type to choose>)
Value1: typeof(int)
Value2: typeof(int)
Value3: typeof(int)
Run Code Online (Sandbox Code Playgroud)

然后我有这些要求:

对于Date列,我需要精确到分钟。

在这个表中,我每天将存储多达一百万条如此大的大数据。

我的问题是:我是否必须使用smalldatetype每天为我节省2 mb 的旧机?

要么

我应该使用新的功能强大的datetime2数据类型吗?

谢谢

sql-server smalldatetime datetime2

2
推荐指数
1
解决办法
7735
查看次数