Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6356677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:00:47+00:00 2026-05-24T23:00:47+00:00

I have two controllers in my application navigation controller and tabbar controller. Navigation controller

  • 0

I have two controllers in my application navigation controller and tabbar controller. Navigation controller view does not implement adwhirl and tabbar controller all tabs all view has adwhirl implemented.

@interface myview : UIViewController {

AdWhirlView *awView; 
}
@property (nonatomic, retain) AdWhirlView *awView;


@implementation myview    
@synthesize awView;

- (UIViewController *)viewControllerForPresentingModalView {
return self;
}

- (NSString *)adWhirlApplicationKey {
return @"Mykey";
}

-(void) viewWillAppear:(BOOL)animated{
//  code for Adwhirl banner
self.awView = [AdWhirlView requestAdWhirlViewWithDelegate:self];
[self.awView setFrame:CGRectMake(0, 318, 320, 50)];
[self.view addSubview:self.awView];
}

-(void) viewWillDisappear:(BOOL)animated{
    [self.awView release];
}

I have write this code in each view in tabbar controller. Adwhirl is perfectly work when i shift navigation controller to tabbar controller. But application is crashed when i shift tabbar controller to navigation controller.

The crash error is as follow.

Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[__NSCFArray viewControllerForPresentingModalView]: unrecognized selector sent to instance 0xfd91600’

*** Call stack at first throw:
(
0   CoreFoundation                      0x018525a9 __exceptionPreprocess + 185
1   libobjc.A.dylib                     0x019a6313 objc_exception_throw + 44
2   CoreFoundation                      0x018540bb -[NSObject(NSObject)       doesNotRecognizeSelector:] + 187
3   CoreFoundation                      0x017c3966 ___forwarding___ + 966
4   CoreFoundation                      0x017c3522 _CF_forwarding_prep_0 + 50
5   IDogEvents                          0x0002e30b -[AdWhirlAdapterGoogleAdMobAds getAd] + 2075
6   IDogEvents                          0x00040154 -[AdWhirlView makeAdRequest:] + 1524
7   IDogEvents                          0x0003f501 -[AdWhirlView buildPrioritizedAdNetCfgsAndMakeRequest] + 1569
8   IDogEvents                          0x000402ef -[AdWhirlView timerRequestFreshAd] + 255
9   Foundation                          0x0095b749 __NSFireTimer + 125
10  CoreFoundation                      0x018338c3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
11  CoreFoundation                      0x01834e74 __CFRunLoopDoTimer + 1220
12  CoreFoundation                      0x017912c9 __CFRunLoopRun + 1817
13  CoreFoundation                      0x01790840 CFRunLoopRunSpecific + 208
14  CoreFoundation                      0x01790761 CFRunLoopRunInMode + 97
15  GraphicsServices                    0x01a8a1c4 GSEventRunModal + 217
16  GraphicsServices                    0x01a8a289 GSEventRun + 115
17  UIKit                               0x001cbc93 UIApplicationMain + 1160
18  IDogEvents                          0x00002349 main + 121
19  IDogEvents                          0x000022c5 start + 53
20  ???                                 0x00000001 0x0 + 1

Please help me for this.Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:00:51+00:00Added an answer on May 24, 2026 at 11:00 pm

    I got the solution.
    I made common object for

    AdWhirlView *awView;

    in application delegate.
    In every view i am using this object instead of self class object.

    -(void) viewWillAppear:(BOOL)animated{
    //  code for Adwhirl banner
    appDelegate.awView = [AdWhirlView requestAdWhirlViewWithDelegate:self];
    [appDelegate.awView setFrame:CGRectMake(0, 318, 320, 50)];
    [self.view addSubview:appDelegate.awView];
    }
    
    -(void) viewWillDisappear:(BOOL)animated{
        [appDelegate.awView removeFromSuperview];
    }
    

    And in final view where i shift the controller.

    -(void) viewWillDisappear:(BOOL)animated{
        [appDelegate.awView removeFromSuperview];
        [appDelegate.awView release];    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the thing. I currently have a tabBar controller, with several navigation controllers
I have two view controllers: MyParentViewController and MyChildViewController . The application starts with MyParent
I have a problem in uinavigationcontroller. In my application i have two view controllers
I have a viewController (Planner) that loads two view controllers (InfoEditor and MonthlyPlan) when
I have a UITabbarController with (so far) two navigation controller items. I can get
I have an tabbar-application with four tabs. Every tab loades an nib with its
Here's the setup: I have a tab bar controller with two tabs. There is
I have two controllers which share most of their code (but must be, nonetheless,
I have a query regarding use of navigation Controller and tabBarController together. I will
In my application I have two Master pages and they are used in various

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.