I'm following a tutorial to add banner in my app, but I don't understand a thing, here:
"FOR SHOW BannerView FIRST CREATE A UIView AND ADD IT TO TOP OF ROOT UIView :
UIView *adView = [[UIView alloc] initWithFrame:adRect];
[[CCDirector sharedDirector].view addSubview:adView];
" THEN ADD BannerView TO IT:
[[MyAdMobController sharedController] addBannerToView:adView];
where he says to create a UIView, It means that I have to create a new scene? because i don't know exactly what is a UIView (i'm a beginner), someone can give me an example of what i have to do?
In order to add a
UIViewto your Cocos2d project you have to add it to the window. The director creates and handles the main Window and the Cocos2D view.CCDirectorinherits fromCC_VIEWCONTROLLERwhich is equivalent toUIViewController. TheUIViewisn't a new scene it is a "visible object" that is added to your view via theCCDirector.all you are really doing is creating a box to sit on top of the window for the banner to fit into.