我需要在我的iOS
应用中添加广告功能。广告屏幕会在一定的时间间隔后出现。我的整个只处于横向模式。当我试图在当前视图上添加视图时,它将以纵向模式显示视图而不是横向模式。我已经设置了视图帧即CGSizeMake(0,0, 568, 320)
在横向模式下添加UIView
time = [NSTimer scheduledTimerWithTimeInterval:2.0f
target:self
selector:@selector(showfirstad)
userInfo:nil
repeats:YES];
-(void)showfirstad {
[[[[UIApplication sharedApplication] windows] lastObject] addSubview:firstad];
}
看来这样。
@Agent我需要以横向模式而不是纵向模式显示视图。 –
请发表一个'firstad'代码片段 – cyborg86pl
@cyborg86pl我在xib中做了视图 –