Question: ![enter image description here](https://i.stack.imgur.com/xxvDu.png)

I currently have an AdMob banner underneath my ViewPager TabPager as shown in the image, and I would like the banner to be above the ViewPager. I add in the banner programatically, and have set the ViewPager as the only element inside a RelativeLayout. 

activity\_main.xml

```
<RelativeLayout  xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
    android:id="@+id/layout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal" >

<android.support.v4.view.ViewPager
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/pager"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" 
    android:layout_weight="1">
    </android.support.v4.view.ViewPager>

</RelativeLayout>

```

Adding the Admob Banner to the RelativeLayout in activity\_main.xml

```
adView = new AdView(this, AdSize.SMART_BANNER, "ADMOB_ID");

RelativeLayout layout = (RelativeLayout) findViewById(R.id.layout);

RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(
            LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
params.addRule(RelativeLayout.ALIGN_PARENT_TOP, R.id.layout);

layout.addView(adView, params);

```

Answer: 
What you wanna do is find the location of the touch within your view. So you're gonna need to add this into your touchesBegan method

```
 for(UITouch *t in touches) {
    CGPoint point = [t locationInView:<view>];

    // for use in Sprite Kit
    CGPoint point = [t locationInNode:<node>];
    // make the x position of the object being shot
    // equal to the point location
 }

```

hope that helps
All you need is to replace this row

```
CGPoint location = CGPointMake(self.frame.size.width, _ship.position.y);

```

by this

```
CGPoint location = [[touches anyObject] locationInNode:self];

```