2012-04-20 29 views
0

我有一個巨大的問題,我已經集成的InMobi在我的應用程序,它支持犯規界面的方向,但是當我按下廣告,查看被加載在上面,它轉動,這不會是壞,但是當它旋轉時,角度的扭曲,不覆蓋全屏, 也許有人有過類似的問題? 我的代碼:的InMobi方向iphone,

- (void)showInMobiBanner 
{ 
    if (_inMobView == nil) 
    { 
     _inMobView = [[IMAdView alloc] init]; 
     _inMobView.delegate = self; //optional 
     _inMobView.imAppId  = kInMobiAppId; 
     _inMobView.imAdUnit = IM_UNIT_320x50; 
     _inMobView.autoresizingMask = UIViewAutoresizingFlexibleBottomMargin; 
    } 
    if (self.containerView != nil) 
    { 
     _inMobView.rootViewController = self.containerView; 
    } 
    else 
    { 
     _inMobView.rootViewController = self.navigationController; 
    } 
     IMAdRequest *request = [IMAdRequest request]; 
     request.isLocationEnquiryAllowed = NO; 

     _inMobView.frame = CGRectMake(0, 0, 320, 50); 
     _inMobView.imAdRequest = request; 
     [_inMobView loadIMAdRequest:request]; 
    [self.view addSubview:_inMobView]; 
} 

在此先感謝!

回答

4

看來你正在使用的InMobi SDK的舊版本(3.0.2)。

目前已經推出了最近更新的版本:http://developer.inmobi.com/wiki/index.php?title=IOS_SDK_350

的新方法已經出臺:

- (BOOL)shouldRotateToInterfaceOrientation:(UIInterfaceOrientation)orientation; 

您可以在UIViewController使用這種方法,並解決方向改變像這個:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    return [imAdView shouldRotateToInterfaceOrientation:interfaceOrientation]; 
} 

希望這有助於!

+0

謝謝你,我已經聯繫技術支持團隊,他們在那裏非常有幫助,引導我在所需的步驟。你的回答是正確的:)謝謝! – Lukas 2012-04-23 12:07:41