1

I'm currently using AdWhirl for my iOS app. I want to have my ads in the bottom of a scrollview. How can I achive that without Interface Builder, or can I use Interface builder?

Ken Pespisa
  • 21,989
  • 3
  • 55
  • 63
Philip
  • 11
  • 1
  • Almost like a footer in the scroll view? Why not just make the UIScrollview shorter, and place the ad beneath it? – Jonathan Jun 02 '11 at 00:02
  • No, I'm nice to my users, they can scroll the ad away if they want to! So it has to be in the bottom of the scrollview! – Philip Jun 02 '11 at 00:08

2 Answers2

0

An initial look suggests that its simply a subclass of UIView. You can get the bounds of your UIScrollView add an instance of the AdWhirl view as a subview to the ScrollView and extend the content area.

Like any other view really.

Devraj
  • 3,025
  • 24
  • 25
0

no need to use interface builder for that.

what you have to do is:- you must be adding below lines in your viewDidLoad:-

AdWhirlView *awView = [AdWhirlView requestAdWhirlViewWithDelegate:self]; 
[self.view addSubview:awView];

You need to change [self.view addSubview:awView]; line to

[self.*yourscrollviewname* addSubview:awView];

then ads will be added in your scrollview.

for repositioning them in AdWhirlView.h file find below lines and set the coordinates according to your requirement.

#define kAdWhirlViewDefaultFrame \
                        (CGRectMake(0,50,kAdWhirlViewWidth, kAdWhirlViewHeight))
Gypsa
  • 11,230
  • 6
  • 44
  • 82