Resizing AdBannerView in iOS 6.0 - ios

Using an AdBannerView, I'm confused about how to respond to device orientation changes under iOS 6.0. I haven't used iAd before, but it seems that the relevant properties and methods that were used in earlier releases are now deprecated. (These being currentContentSizeIdentifier and sizeFromBannerContentSizeIdentifier:, plus a small number of others.)
Also, two of the NSString content size identifiers constants have been deprecated and replaced by two others. But there are no properties of methods that I can see where they are used in iOS 6.0.
Can someone provide a brief tutorial or link to one that explains how this works in iOS 6.0? Existing tutorials that aren't written for iOS 6.0 don't cover this, as far as I can tell.

I've been trying to update an app with ads and I've noticed some pretty unintuitive behavior myself. Look at the XIB in landscape on a 4in form factor shows the ad going only partially across the page, but when run in simulator or on device it works like expected.
As for the question, I'm still using currentContentSizeIdentifier(which is deprecated) and setting it as either ADBannerContentSizeIdentifierPortrait or ADBannerContentSizeIdentifierLandscape (which are not deprecated).
I've searched the API and don't see any other way to set it. NSURLConnection is another place where I've wound up using deprecated API because no replacement API exists.

Related

Choose custom iOS compatibility

I have an app that recently got rejected because it doesn't work well on iPhone 4/4s or iPad. Is there a way in Xcode to say that it's only for certain models?
I dont think so, try to optimize your application for those devices
You don't define models as such; you define capabilities. You can sometimes use these to cull models as well, but only if your app legitimately uses whatever it is you're testing for.
An example: Bluetooth LE is only available 4s+. You can set your app to require this (or other certain hardware options) via plist keys (UIRequiredDeviceCapabilities - https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html) but only if your app actually uses BTLE. You will very likely get rejected if you "require" something you're not using.
Between iPad and non-iPad devices, you control that directly by what you select in the Deployment Info:Devices section of your project.
As annoying as it may be, you should totally modify your UI to be compatible, at least, with all iPhone models.
I assume you've built a layout that is made to fit exactly to the 4" screen. An easy solution would be to put your views into a scrollView instead of just on your view controller's view directly. Then you can at least scroll the UI to see it more easily on the iPhone 4.
But really, your solution should be to adopt auto layout and size classes, and make your UI completely compatible with all iOS devices. It's well worth the effort because it opens your audience to more users, and reduces the risk of poor ratings like "looks bad on iPad even though its not made for iPad. One Star."

Developing iOS user interfaces programmatically

I've been developing iOS apps for the past 3 years and learned to do so without the use of nibs and storyboards. With the release of iOS 8 and the new iPhones there are ALOT of factors to take into account when developing for iPhone and even iPad devices (Resolution, Screen size, etc.).
The first problem I ran into with Xcode 6 is you can't create a empty project anymore. The closest option is a single view application. I found the following answer here.
Now it seems that apple is really pushing auto-layout, the use of the size classes and the use of storyboards and Interface builder. Is there any way to support the native resolutions of the iPhone 5, 6 and 6 plus and do this programmatically? The only option I can see is defining the frame of each UI element for each device which will lead to a ton of code.
Auto layout IS programmatic. Apple has given the necessary API's to handle size classes entirely in code if you don't want to use interface builder or storyboards and there has always been ways of adding constraints in code too.
You might think IB is a silly tool for noob developers or is only for basic apps and you need more power or whatever your reason, but maybe trying to do every thing yourself in code is a bet you have now lost. Give tools a try.
It's referred to as VFL or Visual Format Language.
VFL Tutorial

UIButton Differences between iOS 5.1 and 6.1

I placed 3 buttons into my view, set up background image and sometimes I need to disable one of them. I find out that they appear different in iOS 5.1 and 6.1. I like the 6.1 version. What should I do to make the design in 5.1 will be the same as in 6.1?
1) look at the white strip at the bottom of picture
2) third button is disabled and is quite lighter than in 6.1
<-- iOS5.1
<-- iOS6.1
PS: thank you for reputation points :)
The white artifact seems to be a default white rounded rect frame. Did you set button type to UIButtonTypeCustom?
Usually when there's a UI difference between two major versions of an OS, the right thing to do is to go with the flow and use the appearance that comes with each version. Having newer UI elements show up in an older version of the OS looks odd -- like your app doesn't quite fit in. Also, it's a lot of work to try to mimic the new look in the old OS.
Try to design your app so that it looks great with either variety of button, and your app will fit right in with the other apps on the user's device no matter what version they're using.

MonoTouch UISplitViewController - Device and Simulator different

Are there any known issues with UISplitViewController in MonoTouch? I am using MonoDevelop 2.8.8.4, MonoTouch 5.2.10 and xCode 4.3.2 (4E2002)
I have a UISplitViewController. When I go to portrait I display a button which the user can click to view the 'master' view in a popup controller. On the simulator it works exactly as expected - the master is displayed in a popupviewcontroller.
However, on the device (running iOS5.1), the master view will get pushed in from the side (like it would on a UINavigationController.PushController()
and this from iOS 5.1 Release Notes:
In 5.1 the UISplitViewController class adopts the sliding presentation
style when presenting the left view (previously only seen in Mail).
This style is used when presentation is initiated either by the
existing bar button item provided by the delegate methods or by a
swipe gesture within the right view. No additional API adoption is
required to obtain this behavior, and all existing API, including that
of the UIPopoverController instance provided by the delegate, will
continue to work as before. If the gesture cannot be supported in your
app, set the presentsWithGesture property of your split view
controller to NO to disable the gesture. However, disabling the
gesture is discouraged because its use preserves a consistent user
experience across all applications.
Are there any known issues with UISplitViewController in Monotouch?
Nothing specific to MonoTouch and UISplitViewController - but like you found out the later has changed quite a bit internally for iOS 5.1 and this can show up in applications.
I am using MonoDevelop 2.8.8.4, Monotouch 5.2.10 and xCode 4.3.2 (4E2002)
What's even more important is which version of the iOS simulator are you using ? i.e. iOS 5.0 or iOS 5.1 ?
In any case be aware that different version of iOS calls their selectors at different times. This can lead to cases where the same code will behave differently on different iOS versions.
One known case for this is about UISplitViewController. You can read about it (why and how it can occurs) and how to fix this properly to work identically across both versions of iOS.
Disclaimer: link to my own blog
Yes this is the "new Feature".
There is no Popover(UISplitViewController MasterView) anymore.
I tried to change but nothing works. I asked the Monotouch Support for help. But the also dont know anything.
Here is a Link to my Question maybe this can answer your question better;)
UISplitViewController problems with IOS 5.1

Application's view differs in ios 5 compared to ios 4

I have developed a ebook reder which supports ios 3.2 and above versions of ipad.The ebook reader shows a single page in portrait mode and 2 pages in landscape mode. The application works fine on ios 4.3.
I tried the same application on another device which runs on ios 5, the application works fine until i change the orientation.Once the orientation is changed the view sizes are not proper and it seems like it is taking portrait view size in landscape and vice versa.
what is the difference with ios 4 and ios 5 regarding orientation changes ,etc.
I searched on internet but could not find the exact reason or solution.One of the stack overflow search was describing the container view concept in ios 5, but it is not sufficient for me.
Can someone help me in resolving my issue.
Thank you
Not sure how helpful this is but it has caused some troubles for me. iOS5 has improved the forwarding of messages to child views and viewControllers. Things like viewDidAppear, viewDidDissappear, rotation notices, etc. The problem is that since these were not reliably forwarded in earlier versions things you may have done to compensate for that short coming may mean that now those functions are getting called twice. Not sure if that's your issue but it could be.

Resources