Autorotation And resizing - iphone

M developing an application which starts with a login page.
After loggin the user will see a tableview.Selecting a row he will be directed to a web view showing a HTML content.
Till here everything went fine.Now i want to see the webview in a landscape
mode.I have dismissed the login view.The project template is view based.
Okay one more thing the table view is on the root view controller,after dismissing the login page when I rotate the simulator the webview rotates but it does not resizes.
Upper half of the screen is the webview but the lower half(in landscape mode) is the login page.
How can get rid of this ?
ThankYou All .

You need to make sure the autoresizingMask is set properly for things that are not resizing. This is easiest in IB where you can set a view to resize both vertically and horizontally.

Related

iOS6 Rotation bug with popViewController

I have struggled to find a solution with the many similar questions and answers so I'm going to post my project here
My code does the following:
1) Creates a "container" view controller which is actually a scrolling view with 3 pages (left page, middle page, right page).
2) I just coloured the pages so you can tell the difference
3) The middle page has a view controller attached to it which contains a button
4) Pressing the button on the middle page will display a UITableViewController
5) Tapping the "Done" button should dismiss the UITableViewController
In portrait mode, no problems can be seen. In landscape mode, the UITableViewController pops up just fine with the correct (landscape also) orientation. However, when popViewController is called, this seems to make the device think that it is is portrait mode, so it rotates the tableview to portrait mode prior to the disappearing animation.
My view controller with the button is then also messed up because of this portrait change. If I rotate the device again, it returns back to normal.
This is a problem on both iPod and the iPhone 6.1 simulator for me.
Can somebody please have a look at my code and tell me what I'm doing wrong? (Big ask, I know, but hopefully that will also help somebody else out).
Thanks
I found the solution according to Apple's documentaton. If I create a separate portrait VC and landscape VC - as per the AlernateViews sample, it works correctly.

iPhone Loading Popup Scroll Down

is there anyone knows a lib for creating a simple view that scroll down from the top of the screen for "Loading.." message?
Like http://github.com/matej/MBProgressHUD but the view should scroll down when begins to loading and scroll up when finish.
It might seem a little jarring to the user to scroll down and then back up. It shifts the users view of the data down and then back up without user interaction ...
I would simply overlay the loading view ...
Objective C: Adding Loading View to View Controllers
Check the code here: Simple Notifications for iPhone. Sorry for Russian, but the idea should be clear. You just need to add transition from the top of the page when notification label is shown.

View moves up when status bar hidden

I have an app where i have set the status bar to be hidden, in the plist.
At first all looks fine, but then in one place in my app i use presentModalViewController to show another view. (this view is to show the twitter login screen)
When i get out of the view (twitter login screen) and i get back in my app all my views move up.
After reading a lot i know its because all the views think that the status bar is hidden and we should move up 20 pixels, but i have already accounted for the status bar being hidden and i dont want the views to move up.
Is there any way i can fix this?

Rotation of NIBs

I've been digging at this for a few days and can't seem to figure it out.
My app launches in landscape and supports only landscape orientations. Works fine.
My app delegate instantiates a root view controller, view is built from an XIB and populated with an image in viewDidLoad. The underlying image is landscape size (1024x768). Looks fine on the screen.
Once the app is launched, I wait for user interaction, and then present a new view controller along with a new view from a new XIB. This second vc/XIB is also landscape (as specified in interface builder). For practical purposes my first and second XIBs are near identical - both landscape views containing one imageview outlet occupying the entire screen.
I'm using off-the-shelf UIAnimationTransistion when I move between my root view (basically a splash screen/menu) and my first real content view. My problem is that, no matter what I do, the first animation transition is generated as if the view is in portrait mode. If I specify a left flip, it flips top to bottom. If I specify a right flip, it flips bottom to top. If I specify a curl up, it curls horizontally.
Once I've transistioned into my second view controller (where most of my apps content is), all the animations work exactly as they should.
How can I get the first view that is loaded (from my rvc) to orient itself properly so that my animations are consistent moving between this first rvc and the second content vc?
Like jmont said, it could be a -shouldAutoRotateToInterfaceOrientation problem. It could also be that you need to specify 'InitialInterfaceOrientation' in the info.plist with a value of 'Landscape (left home button)' or 'Landscape (right home button)'. The last possibility would be to directly set the interface orientation.

Swip from one view to the next view

I have an app with two views and ViewControllers. How can I let the user swip from one view to the next view like in the homescreen or the weatherapp.
I know that there is a page control in the Interface Builder, but it is just an Indicator on what page the user is.
Thanks and sorry for my bad english!
Check out the PageControl.xcodeproj from Apple's iPhone sample code. It provides a template for doing exactly what you want.
The actual paging is done using a UIScrollView in page mode with horizontal scrolling (which is what causes the scrolling to "snap" to a page boundary).