adding adbannerview to bottom of ipad - iphone

I am trying to ad adbannerview in my ios application i have alredy added it for iPhone which displays correctly at the bottom of the device but when i am trying to do the same for iPad it displays in middle of the screen
please help me out
Thanks in advance

Use autolayouting from Interface Builder and keep the view for your 'Ad' to be Bottom aligned and thats pretty much it.No matter what device you want to support it always will come at the bottom.
Something like this :

Related

iOS 7 SDK view from bottom like maps app

Could anybody please inform me which type of view is shown in the iOS 7 maps app when you touch the small info button in the right bottom corner? It only covers half the screen and I want to reuse it, but have no clue what to search for.
Thanks
That appears to be a UIActionSheet.

How to well adapt height and position of views in iOS without AutoLayout?

I am building a view in Storyboard. I have three parts :
1) top : real-time camera view (adaptive height)
2) middle : small webview (fixed height)
3) bottom : some buttons (fixed height)
I would like to know how to properly make my interface in the storyboard for a compatibility with iPhone 4 or iPhone 5 screens.
My goal is to have the camera having a bigger part of the screen on iPhone 5 (or any bigger screen) and the webview and buttons to have the exact same height on any device.
I did it quite well with the AutoLayout feature. The only problem is that it is available since iOS6 and my app has to work from iOS5 and above.
My Storyboard has an 4' display and when I try to run it on a real device (iPhone 4S) all the bottom of the screen is cropped and I can't see my buttons. I really can't figure it out what is really the best and proper way to do it. For a such simple problem, I shouldn't build two different storyboards.
Maybe should I try to fix the height of the camera view programmatically, but this won't fix the problem of the bottom of the screen cropped on smaller screens (I should then modify the position programmatically).
You can see that I haven't a really nice solution to my problem. Could someone help me in how using well the tools in XCode for this case ?
Thanks
Try this:
Xcode 4.5: How do I fix my text views so they display properly in portrait and landscape mode on an iPad?
I think this could fix your problem and if you are using Storyboards it makes it less difficult.

Weird iPhone 4 simulator behavior - UITextViews stacked on top of each other

I just finished up my storyboard based iPhone app (I'm developing on an iPhone 5). Just before submitting it to the Appstore, I thought of making sure everything looks fine on an iPhone 4. So I launch my app in the simulator with iPhone 4.
And what I see baffles me. Basically every single view object, particularly textview, are stacked on top of each other. Basically everything scrollable's messed up. In some textviews even, the initial scroll position has been set to say 100px, which means that the textview's showing the middle of the content in a textview and there'sno way to scroll to top.
Every time I make an ajustments to the storyboard view to fit the iPhone 4, the view on iPhone 5 instead looks weird. Most of the time, the stacked objects on iPhone 4 simulator can't even be unstacked.
Am I the only one experiencing this? I cant find any post about it. Could it be that there's something messed up with my simulator? Any setting I've missed? The only solution I can think of now is to have a seperate SB for iP4 and iP5, but I really would rather not go through the pain of doing that. Any comment or idea is greatly appreciated.
How it looks
You need to make sure that your autosizing struts and springs are set appropriately.
The views need to either dock to the top, or bottom and the views that you want to stretch should have the flexible vertical set.

Not all custom button photos are showing up in Xcode simulator or device

I have been working on making home screen button link images for my app to take the user to different pages. When I was finally done with making all of the custom photos (all same resolution), only two of them show up on my device/simulator and I can not for the life of me figure out why. You can view what the storyboard vs the simulator looks like here. It looks the exact same on my iPhone 4, and I adjusted all of the view controllers in my storyboard to be compatible with retina 3.5 inch only. If anyone knows whats going on, I would be more than happy to hear your feedback. Thank you.
1)just strech more that means just try to increase the width & height of your images just by pulling or streching them.
2)be sure images has correct Named
3)be sure that images are added in project

My button doesn't detect touch events on iPhone (Retina 4-inch) simulator, but works in iPhone (Retina 3.5-inch) simulator

I'm getting my app ready for the iPhone 5 using the simulator and I've found a weird issue where a couple of my buttons, in one of my views, don't work in the iPhone (Retina 4-inch) simulator, but work fine in the iPhone (Retina 3.5-inch) simulator. The buttons simply don't do anything when they're tapped. Has anyone else experienced this issue?
I having a difficult time figuring out where to start with this one. Any suggestions on where to start?
Thanks so much in advance for all your wisdom!
You need to edit your MainWindow.xib and enable "Full Screen at Launch". For a more detailed explanation, see Apple's docs:
Important: When creating your window in Interface Builder, it is
recommended that you enable the Full Screen at Launch option in the
attributes inspector. If this option is not enabled and your window is
smaller than the screen of the target device, touch events will not be
received by some of your views. This is because windows (like all
views) do not receive touch events outside of their bounds rectangle.
Because views are not clipped to the window’s bounds by default, the
views still appear visible but events do not reach them. Enabling the
Full Screen at Launch option ensures that the window is sized
appropriately for the current screen.
Complete document from Apple
For me, the solution was to set the size ("Simulated Metrics") to "Retina 4 Full Screen" for the MainWindow.xib. I did not need to alter the size of the other screens (they are still set to None). After changing the MainWindow.xib the bottom area becomes clickable again...
The problem was caused by another control overlapping my buttons due to the way the springs and struts were setup. Adjusting the z-order of the buttons fixed the issue. Thanks, all!
There are two solution to this problem :
If you are using MainWindow follow these steps :
a. Select MainWindow.xib.
b. Select Full Screen at Launch from Windows option available in Attributes Inspector.
If your application doesn't contain MainWindow then just add:
self.view.frame = [UIScreen mainScreen].bounds
in ViewDidLoad.
I solved my prob.
view .origin for 3.5 inch and 4 inch screen are different so, when writing common code for both we need to take care at giving CGRectmake(x,y,w,h);
Set temp. diff background color of diff view so you can check if any view is overlapping or not, to fetch event in 4.0 inch.