Is the panel marked as static?
At least one problem you have is the UIRoot manual height. It needs to be set to the height of the screen resolution...so on iphone HD it needs to be either 960 or 640, depending on your app being landscape or portrait.
Maybe it is a refresh problem, but that can not be certain until all other things are correct. You definitely need to set the manual height to 640 for the iphone. Also your pixel size is wrong. Did you set up your ref atlas using the iPad hd resolution? If so, your pixel size needs to be iPad hd height / 640 for your iPhone hd atlas instead of 2.0
After changing your reference atlas, try this:
NGUITools.Broadcast("MarkAsChanged");
Btw, there is a bug in Unity in regards to Awake() execution, my guess is you're running into it here.
Your Awake() function is getting called after OnEnable() of others unless you add an empty OnEnable() function to your script.
Your atlas replacement script should run first.
One other thing you can try is have your atlas get switched in a different scene (usually the load scene), that will then load your actual scene.
Well, then I am at a loss. Assuming you set the replacement atlas correctly, it should get used when the button is created. Methinks you'll need to debug that a bit more.
You're supposed to be working with a manual height to begin with. Pixel size only works with a manually set height. You basically choose the target height you'll be designing your UI in, then stick with it, and if the resolution is high enough, swap to an HD atlas.
Oh and btw you can call MakePixelPerfect on everything by broadcasting it:
NGUITools.Broadcast("MakePixelPerfect");
Another note... colliders on buttons shouldn't update. There is no reason for them to update. As far as they're concerned, the UI size hasn't changed because the scale of UIRoot shouldn't be changing (this is where the "automatic" being turned off comes in).
They will only scale if you've turned the automatic back on for some reason, which doesn't mix with the pixelSize setting.
The collider on the screen shouldn't change. You may have a bigger screen size, but since you are not using it (you're using the manual setting on the root), it is completely irrelevant. The button should stay the same size proportionally. Does your button's size change? If your button is 200x30, it should still be 200x30 after the atlas swap. The whole point of the atlas swapping is to handle doubling (or halving) of resolutions, iOS style.
My curiosity has to the better of me. You mention you use the same art for both atlases. Is your art designed to be pixel perfect for the iPhone 4 or the iPad 3? Which one? Then I cannot help but ask why you are not using different art when you are not keeping pixels 1:1 (which would be setting the UIRoot to automatic). Are you SURE you shouldn't be disabling your atlas switching code, using your single iPad 3 atlas set to pixel size of 1, and setting the UIRoot to automatic? It really sounds like that is what you want. That would make a button that is 100 pixels tall stay 100 pixels tall on any device. For instance in the wacky case of a button that is 500 pixels tall, it would be almost 1/3 of the screen tall on the ipad3 and over half the screen tall on the iPhone 4. It sounds like you want to want to take the pixel perfect button on the iPhone 4 that would be over half the screen and make it twice as big. But instead you are trying to make pixel perfect art two times bigger when switching from the iPad 3 to iPhone 4? I must have misread something. Please set the record straight to make helping easier.
Your pixel size for your iPhone atlas should be 1536/640=2.4
How is that? UIImageButton is not even a widget. It's just a script that uses sprites. And sprites use the pixel size property just fine.
Correct, and as I mentioned the size of the button shouldn't change. Ever. That's what the pixel size is supposed to address. You use the same size on screen, while doubling (or halving) your atlas size. In your case you were not setting the proper pixel size, so your button size was physically changing when you hovered over it -- something that should not happen.
Just to clarify, the point of pixel size is this: MakePixelPerfect before the atlas change should look exactly the same size as MakePixelPerfect after the atlas change.