MPMoviePlayer Default Control Buttons are unaligned - iphone

I have an MPMoviePlayer, which need to work on all iOS from 3.1 and forward. I modify the showing of controls based on the iOS version but I always use the default controls (i.e. setting control style for iOS 3.2 and 4 models, and control mode for 3.x versions).
A strange issue happens on the iOS 3.2+ MoviePlayer. The Rewind button is displaced some 5 or ten pixels up making it unaligned with the rest of the buttons.

Ok so in this case it turned out that my attempt to change content type and controlStyle didn't turn out very well. One solution I found if this issue appears is to create a completely new instance of the MPMoviePlayer and setting up the controlStyle accordingly...

Related

Xcode Create a working app for iOS 5.1 with xcode 4.6

i can run my app on my 6.1 iOS but can't with 5.1
i have the iOS Deployment Target set to 5.1 on both Project and Target
when i run the simulation for 5.1 it works fine but when i try it on my iPhone it crash's
i committed out all my code thinking that was the problem but the same thing keeps happening
XIB and auto-layout is not enabled
The iPhone simulation works with no errors
I tried to create a new project and have only a label and i still get the same out come
can some one send a link to a single view project that works with 5.1, the program could be blank i just want to compare to mine to see what is different/ wrong.
Sounds like you might be trying to use an API that is specific to iOS6 (UICollectionView or something similar).
You need to plug the device in and run it and see what the console indicates is the problem.
You have Auto Layout turned on for ViewController.xib. There are two ways to work around this. Either disable Auto Layout on that xib:
1) Xcode 4.3 not presenting Autoresizing panel in Size Inspector
Or use one of many methods to enable auto layout while remaining backwards compatible:
2) Enabling auto layout in iOS 6 while remaining backwards compatible with iOS 5

iphone 3.5 and 4 issue

i was making an application is ios6 but i have to make it compatible for ios5 too. i made weak link to the libraries and they are working fine but one issue arises and i still not solve it. the problem is regarding iphone 5 and iphone 4 sizes. i had some questions:
in view under xib what i should pick view size iphone 3.5 or iphone 4?
if i place in buttons and other controls according to 4 size than they goes out when i run it on iphone 4 and vice versa?
should i need to make two xibs to overcome it?
or is there any other method which will resize my view and make it compatible for iphone 4 and 5?
EDIT
iam making application on ios6 and i want my application to run on both iphone 4 and 5.
thanks .
Generally you don't have to worry about this because iOS can move your controls around for you using either:
Auto sizing: If supporting iOS versions prior to 6, use the auto sizing masks (sometimes affectionately called "springs and struts", and when accessing programmatically, it's called the autoresizingMask) so that everything moves arounds appropriately. So select the "size inspector" and adjust the "autosizing" masks:
Autolayout: If you're developing an iOS 6 and above app, you can also use the new the "autolayout". See Cocoa Auto Layout Guide which has tons of relevant links. Also see the Xcode 4 Users Guide.
Turn autolayout on and off: If you want to develop an iOS 4/5 compatible app, you may need to turn off "autolayout". If so, go to Interface Builder, click somewhere on the background, select the "file inspector" in the right panel, and examine/change the "Use Autolayout" flag.
I'd suggest designing for the 3.5" screen. And let it resize or move your controls for the 4" screen.

Adjust iPhone 5 Screen Size Without Using Autolayout

Enabling Autolayout in .xib or .storyboard and adding a splash screen of 640px by 1136px enables iPhone 5 resolution support for the taller screen.
However, doing so, my app started to display some funny things where I assume autolayout is not a great idea.
I am wondering if there is a way to enable iPhone 5 device support, i.e. fix app's resolution without using Autolayout? Maybe I can set in the code?
If yes, then I will have no need to create 2 storyboards or nibs to support iOS5- and iOS6.
If you weren't using Autolayout before, you won't need to use it for iPhone 5 support.
When you're putting your interface together, you just need to check your bindings, and toggle between the taller phone size, and the regular phone size, as described here:
Xcode Storyboard displaying the new iPhone 5 screen size?
If your screens look fine in both screen sizes then you're done.
If you are doing a lot of coding to show your UI, then you'll have more work to do.
I found a great answer a couple weeks ago (link below). You will copy and paste your older iPhone Storyboard, rename it to reflect the iPhone 5, and press the button that expands the screen size, found on the bottom of the layout grid. Some minor coding adjustments might be needed, but this sample code is used in the AppDelegate to detect which device is running, and hence, which Storyboard to use. You'll just have to duplicate your interfaces, but these GUI changes can be made without code and without AutoLayout (also good to note that AutoLayout removes iOS 5--and lower--compatibility)
xcode 4.5 how to pick storyboards at launch

How does a UIStoryBoard change on iphone 5

I have an already shipped app on App Store that made use of Storyboard.
I see from the keynote, comparing to previous model that iPhone 5 has a taller screen.
I wonder how this will impact on my esisting storyboard, because from my 'app point of view' there's only one difference which is the background.png. All the rest is just plain UITableView that can just fit more rows.
I cannot find any document for this on Apple site (I have always been so noob in finding things on Apple developer site).
Has anyone made adjustment to his already developed and published app to match with new layout ?
If yes, do I have to develop a brand new storyboard, or is there an adjustment to be done with code ?
[UPDATE]
I am reporting my experience, now that Xcode 4.5 is long shipped for development.
Xcode itself, as some suggested, asked me if I would like to enable tallest screen support by creating a default png. After saying yes, I had to enter each segue in storyboard for some adjustment, change png background (which was unstrechable by design) with a tallest one, change stretching settings and redeploy.
It has been an annoying work because I have quite some segues, and Xcode doesn't allow to reuse templates within Interface Builder.
Old apps without 1136x640 resolution support will run letterboxed, with black areas on top and bottom.
You can enable new layout support for existing project simply by supplying new Default-568h#2x.png loading screen. Take heed though, you'll have to test your old interface on both old and new resolution (via iOS Simulator) to make sure everything looks good and works as designed.
Its been said when iphone 5 is launched that your app view will be filled with black color on top and bottom if it is not taking account for the increase size ( not designed for iphone5 screen)
so your app will just work fine but will have black border on both and top to filled the extra space..

Setting UIButton stretched background images in Interface Builder (XCode 4)

I'm trying to set up an UIButton background using a stretchable image in Interface Builder. Button is configured as "custom" and I have assigned a background image to it. The view mode is set to "Scale to Fill", but when I set any value in "Stretching" area it doesn't seems to do anything.
I have tried doing it programmatically and it works using the UIImage's stretchableImageWithLeftCapWidth:topCapHeight: message, but its use is not recommended by Apple.
Is there any way to make it work from Interface Builder?
Unfortunately, you can't use stretchable/resizable images in the current version of Xcode 4. You have to do it programmatically.
Assuming that you are talking about iOS 5: the SDK is still under NDA for a few days, so I can't be more specific. But just as a hint:
Apple doesn't discourage the use of stretchableImageWithLeftCapWidth:topCapHeight:. If you look at the documentation (iOS 5 version) of this method again, you will find an answer there.