在做导航时,可能会从镜子里看手机界面,于是有了“镜像转换”的需求,镜像转换很容易实现,按如下命令即可解决:(线性代数里的仿射变换就有镜面转换)
self.View.transform = CGAffineTransformScale(self.View.transform, 1.0, -1.0);
- (void)setTimer{
if (_timeCount)
{
[_timeCount invalidate];
[_timeCount release];
_timeCount = nil;
}
_timeCount = [[NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(hideTitleView) userInfo:nil repeats:NO] retain];
}
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
self.titleView.hidden = NO;
[self setTimer];
}
注意2:给nil对象发送消息,尽管不会报错,但是也不会有任何效果;但是给一个release的对象(没有赋值为nil)发送消息则会崩溃。