iPad : Problem after dismissing Split screen - iphone

In my app, I am using split screen for my one view.
but when I use to dismiss that view it gives me screen as below.
The white portion at right side is because of split screen.
How do I solve it ?

If you've got a reference to that left view, can you change the frame position after dismissing the right view?
Something like:
[leftView setFrame:CGRectMake(newX, 0, oldWidth, oldHeight)];

Related

View's origin confuse my project

I got a project ( I' ve already finished it ) I did a uialert view into. When I started my app and pressed the alert view button, the alert view came from the top, not from the middle of the screen. I set the view s origin s to the middle, and it s worked, but if went into a subview and after backed to the start view, the alert view came again from the top left.
Then I set my view s origin back to the top left, and it s still works the same wrong mode( app start: okey, after go into subview and back it s wrong) .
If I start my app,and just tap the alert button it works fine ( appears from the middle with the right animation ), after I go any subview , it s confuse, and I got a uitextfield, and map too in my subviews. If I click into the textfield, the "|" symbol to start writing, comes from the top left, and if I want to zoom in my text for just correct it, the loupe comes from the top left too, and it s really annoying. And if I watch the map, and there is a pin, and during the zooming in or out the pin disappears, when I stop it, it comes from the top left, or bottom right.
I don t know how to fix this problem, my mind is blowing.
I tried to fix it with code:
skroller.layer.anchorPoint = CGPointMake(0.5, 0.5);
levels.layer.anchorPoint = CGPointMake(0.5, 0.5);
but it still works wrong
If I click on the view , and show the size inspector it doesn t look like this:
image
I don t see the Autosize, and example, and arrange. If I click on for example to attributes inspector it appeard for 0.00001 sec .

UIWebView won't fill screen

Edit: This was a result of my own stupidity - the website I was liking to (iphone optimised) was not resizing to take advantage of the extra space, other pages display full screen.
Hi,
I've been trying to create a view that has no navigation bar, just a UIWebView that takes up the entire screen with a button to exit the view. I've managed to find a solution to hiding the navigation bar, but the problem is, it leaves a 44px space at the bottom of the view. So what I have is a webview taking up 460px on the screen, then just a white area below.
In Interface builder I tried to edit the size of the view but it was greyed out and set to 460px. Is there a way to make it so the webview takes up all 480px?
Thanks for any suggestions.
Chris
You can set the size of UIVewView programmatically in this way:
myWebView.frame = CGRectMake(0, 0, 320, 480);
and place it by example in viewDidLoad method.

Tab views on iPad not resizing

My view doesn't stretch to fit the current orientation!
I am creating a tab bar application. I replicated the sample one that you create when you "create a new tab bar application". Everything works except when I change the orientation of the iPad it rotates the view, the tab bar stretches out on the bottom, but the view doesn't resize. Basically if you start in landscape then rotate to portrait, it rotates but the view is still landscape shape even though it rotates.
My tab bar has two tabs (just like the sample application) and so I compared mine against the sample which works property by property. One difference is I noticed my FirstView in IB under the resizing area doesn't show the resize arrows left/right up/down. In other words it isn't marked to auto fill its container. The sample's FirstView and SecondView DO have these arrows. But I can't turn them on!
I even tried creating a fresh new view but I still can't press these arrows on. what am I doing wrong here?'
Thanks a lot.
The solution is this:
self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
Do this in viewDidLoad. There must be a bug in IB.
Another answer is turning off any simulated tabbars, nav bars, or status bars on the view in Interface Builder. Go into the autosizing area and turn on the auto grow arrows. Then turn back on the simulated user elements.

UIView animation

I have a UIView(first view) on top of which I would like to display another UIView(second view). I display the second view using animation which causes the second view to be displayed for about 3/4 of the iPhone screen. The first view is visible underneath the animated second view. I would like to make changes to the first view as the second view is displayed. Any ideas on how I can achieve this. Right now, the animation completes, the second view is displayed and then I can change the first view. I would like to change the layout of the first screen as the second screen is being displayed. Any help is much appreciated.
Basically, just do it.
You can start more than one animation at a time. If you are not animating the changes to the first view, then do them after calling commitAnimations or otherwise starting the animations on the second view. If you want to do them half way through the animation, set up a timer or delayed call.

iPhone - how to show a view as pop up

How to show a small pop up on click of button on a view that will be displayed in small region of the parent view.
You can simply define the frame for your view, and add it as a subview of its parent.
newView.frame = CGRectMake(60, 140, 200, 200);
[parentView addSubview:newView];
Just putting up a view is pretty straightforward (create a UIView, position it, then addSubview it to the parent). But there are a few UI design questions you may want to ask yourself before you pop something up. Things like:
Is the pop-up modal? Once it's up can the user do something else or do they have to 'dismiss' the view before continuing.
How does the user dismiss the view? Do they tap the view itself, some sort of 'close' object, or tap outside of it?
Where do you position the pop-up view if you're too close to the side of the window (otherwise it gets clipped and the user can't see all of it).
Should you offset it from the button itself so the tapping finger isn't covering up the item? How many pixels work best? And does the offsetting bring the view too close to the edge, so maybe show it on the other side so it's not clipped?
And they say UI design is easy ;-)