Image alignment issue after a call interruption - iphone

In my application the images alignment goes wrong after a call interruption. Do any one have some idea about this ? Do I want to code in applicationWillResignActive: for re-align my images in the application. Please tell the reason for it if you know.

In the nib, look at your images in the "size" view, and take a close look at your struts and springs. You should probably have the top and left strut set, but NO springs. If you have springs set, then the image may get squished when the call comes in, the stretched back when the call is over.

Related

Can I fade out a launchImage after it disappears?

I use a launchImage set to launch my app, instead of .xib. In AppDelegate.swift I set a NSThread.sleepForTimeInterval(2.0) to delay it, but when launchImage disappears, it doing so immediately.
What I would is that my launchImage disappears with a fade out effect. Is it possible?
Thanks
Strictly speaking, no, because you don't have control over how the OS uses the launch image.
But what you could do is make a dummy/replacement view of the same.
Upon launch, let the first UIViewController you load simply contain a UIImageView of the same launch image. You may have to do a little work to make it look right in your particular situation, for the interface orientation, etc. But if all goes right, when you load up this ViewController, you shouldn't notice a difference or any sort of transition between it and the actual launch instance -- visually it's all the same, tho technically it isn't.
Then you could have this view/image fade out. Essentially this gets the effect you want.

UIImageView in UIScrollView

I have a series of UIImageViews in a UIScrollView. The user can zoom into each one, but after a bit of usage the images start disappearing, and then various images in the app disappear. I'm wondering if anybody has any any experience with this and has any idea why this could be happening?
Its a complete guess until you give us source, but chances are that you are doing something like not retaining your image views or are adding them to another view – effectively removing them from the first view they were in.

How to re-arrange UI Elements when screen is rotated

I am building an iphone app that has a small button at the right corner of the screen. Ideally, I should be able to see the button no matter what orientation I hold the phone. However, for now I can only see the button when the screen is upright/vertical, when I turn it sideways, the button is not visible.
What is the easiest way to solve this problem? Can I move the button manually when I rotate the screen ( this may be easier since the button is the only IB OUlet that is not showing up correctly, other elements are fine).
Or I thought of making two different views with two different nib files. ( But I am not sure how to do that?)
Please help. Thanks
in interface builder, you should be able to specify which corner the button should stick to, in the button's properties.
that's the easiest way. if you have a more complex interface then you'd need to either write code to move the button, or as you say, create a new view for the "other" orientation.
Redrawing the frame of the buttons in willRotateToInterfaceOrientation fixes the issue. or for just rotating and make use of autoresizingmask

UIPageControl render quirk with UIScrollView

I'm building an iPhone application and like most I am trying to implement a UIScrollView with a UIPageControl, however I am coming across a very quirky behavior, which I assume may be a bug. Hopefully one of you has seen this before because it is driving me nuts.
Basically, the page control works fine, everything is hooked up and works normally on all accounts EXCEPT, with certain placements of the UIPageControl within the UIView, the UIPageControl will cease to render.
I'll just take screenshots of the XIB window to help illustrate... here's a placement that works perfectly fine:
http://www.jasconi.us/prob1.png
The UIPageControl is placed physically above the UIScrollView. Works great, everything is visible and working.
The next two DO NOT work:
http://www.jasconi.us/prob2.png
http://www.jasconi.us/prob3.png
The first one is simply placed below the scroll view. Doesn't render at all.
The second one is placed above the scroll view without technically being inside of it. Also doesn't render.
What the hell is up with this? I've tried using
[[self view] bringSubviewToFront:pageControl];
...to no avail.
Any ideas?
OK I found the answer to this, it's a little six degrees of Kevin Bacon.
This isn't actually a software bug, but a XIB quirk, for some reason the lower placement of the page control in combination with the default settings for autosize and anchor seem to jettison the control into outer space.
If you turn off all auto-scaling and auto-sizing and auto-anchoring and all that other crap, the controls appear exactly as you expected. The fact that it appears reliably when placed above the ScrollView is an oddity.
shrug.
Hope this helps future iPhone initiates.
Did you check to make sure that numberOfPages is not 0?
If you set a breakpoint can you see that pageControl is not nil?
I was still encountering this exact same problem, even after trying everyone's posted answers. My issue ended up being a little more "DOH":
I was using UIPageControl at the bottom of a modal FormSheet, however, I forgot to set the size of the view as Form Sheet in the xib. This caused my page control to be off the screen and never visible.
Moral: set view size (Full, Form, Page, etc) in your xib on the base view.
This will sound like a real no brainer, but I got caught out by it.
By default, UIPageControl expects to be on a dark background. IE: The dots are light gray, and white for the current page.
I used UIPageControl on it's own with no scrollview to change the time range of a graph I was rendering with drawRect:
Long story short, the graph background was white, so the page controller worked, I just couldn't see it. The solution was putting the graph itself in a subview, and making the parent that contained the page control have a dark background.

How to create a full-screen modal status display on iPhone?

I'm trying to create a modal status indicator display for an iPhone app, and would like one similar to this one used in Tweetie:
Specifically, this one "shades out" the entire screen, including the toolbar. I don't believe through any normal UIView manipulation, I can extend past the bounds of my window, can I? I believe I've seen a status indicator like this somewhere else on iPhone, possibly when I added an Exchange e-mail account.
I've tried subclassing UIAlertView and overriding its drawRect method. If I don't call [super drawRect:] it doesn't ever display the normal UIAlertView text box, however my drawing rectangle is in an odd size and position.
Anyone have any advice to accomplish this?
Check out MBProgressHUD.
Take a look at the source code to the WordPress application. They have code which you can basically drag and drop into your application to do this.
http://iphone.wordpress.org/development/
I haven't done this myself, but you could layer a UIView at the top of the view hierarchy, and use setHidden to dynamically show or hide it. Since it's at the top of the stack, it should be able to intercept all touch events.