Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-10-2011, 02:23 AM   #1 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 7
sorinescu is on a distinguished road
Default How do you add an UIView over a scroll but the view should stay still?

iPhone Interface Builder question: Does anybody know how to add a small UIView over a ScrollView yet the image should stay still? Basically I already have a full image (320 x 480) over the Scroll, so the image scrolls, but now I need to add a AdMob View (320 x 48) on top of them. The problem is after i build and run, the ad scrolls as well. How do you make it stay still? Thank you!
sorinescu is offline   Reply With Quote
Old 02-10-2011, 04:57 AM   #2 (permalink)
Registered Member
 
Join Date: Oct 2009
Location: Amsterdam, The Netherlands
Posts: 782
TUX2K is on a distinguished road
Default

Dont add the AdMob View to the scroll view but place it ontop of the scrollview.
Code:
- View
  - Scrollview
    -ImageView
  -AdMob View
__________________
If my answer helped you, you might want to help me.
Make a donation via PayPal.
TUX2K is offline   Reply With Quote
Old 02-10-2011, 08:14 AM   #3 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 107
Warp is on a distinguished road
Default

When you add an element in IB by dragging it from the Library window onto the view you are editing, if you drag it onto a subview there, it will make the element a subview of that subview. In this case it's making the element a subview of the scrollview.

You need to take it out. This is can be done for example in the main .xib window of IB, where you can select the listing view mode, open the group for the view you are editing, there open the group for the scrollview, and then drag the element out of the scrollview into the main view (but after the scrollview so that it will remain on top).

It's much simpler than the description above might make it seem.
Warp is offline   Reply With Quote
Old 02-10-2011, 09:36 PM   #4 (permalink)
Registered Member
 
Join Date: Jan 2011
Posts: 7
sorinescu is on a distinguished road
Default

Quote:
Originally Posted by Warp View Post
When you add an element in IB by dragging it from the Library window onto the view you are editing, if you drag it onto a subview there, it will make the element a subview of that subview. In this case it's making the element a subview of the scrollview.

You need to take it out. This is can be done for example in the main .xib window of IB, where you can select the listing view mode, open the group for the view you are editing, there open the group for the scrollview, and then drag the element out of the scrollview into the main view (but after the scrollview so that it will remain on top).

It's much simpler than the description above might make it seem.



Thank you!!!
sorinescu is offline   Reply With Quote
Reply

Bookmarks

Tags
admob, interface builder, scroll, view

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 370
14 members and 356 guests
blasterbr, buggen, Clouds, dre, EvilElf, jeroenkeij, jimmyon122, Mah6447, n00b, nyoe, pungs, Sami Gh, stanny, toon4413
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,667
Threads: 94,121
Posts: 402,900
Top Poster: BrianSlick (7,990)
Welcome to our newest member, host number one
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:51 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0