UIScrollViews won't scroll to top on my app structure - iphone

First of all, sorry about my english.
I have an issue with the scroll views of my app. I know that I can have only one scroll view per view controller in order to avoid problems with the "tap the status bar to scroll to the top"; and I have only one per VC, but all the VC are inside a bigger one, that handles the view sizes and the interface orientation. This is the structure:
Main View Controller
Page 1 (View controller)
Page 2 (View controller)
...
And the only scroll view that works with the status bar is one inside a UITableView on the Page 1.
Finally, the question: Anyone knows how to fix this issue without changing the main structure of the app? (there are a lot of pages).
Thanks in advance, and really sorry if I made some noob mistake :P.
Regards

I just answered a similar question.
scrollToTop is not working on iPhone but it is working on iPad
Since you cannot change the design of your app take the UIWindow subclass / category approach and do the scrolling yourself

Related

Integrating xib file to stroyboard under UI scrollView?

As in the screenshot 1, I am trying to design view that is longer then screen size of iPhone.
and in second screenshot I changed the size to freeform which is giving me liberty to create longer view than iPhone's length.
My question is is it a standard way to solve this problem. where as my understanding was that we are not suppose to use xib files anymore after storyboard because every thing was moved to storyboard.
So to solve this this problem Do I have to use view(xib) and make it as subview of UIscroll view.
is that a standard way to solve these kind of problems or do we have something with storyboard equivalent which is more efficient ?
PS: I have been researching this problem from past few days. All related questions over here and web, are adding UIView programmatically to ViewController but not a single example I found where one is designing the UIView in Xcode thru xib file and adding it to UIScroll View. Which is common real world problem. all the app where views are longer or wider than screen size are not done programmatically all together. At least I think they are being designed and them added to the Viewcontroller. Please correct me If I am wrong.
The answer is, as it's always been on iPhone, modal views which come and go as needed. You can temporarily add child view controllers, alert views, 3rd party iphone compatible popover knockoffs....
Of course UIView still exists - so where is the problem? What you probably mean is that you cannot set an UIView in a storyboard, storyboards only contain view controllers. But you can still make a xib file containing an UIView of any size you like, and add that one to your scroll view.

Load a view controller created inside a storyboard as a subview (into a part of the screen) of another view controller

I am currently developing as app for iPad. And I need to create a tabbar. The problem is that, for design purposes, I need the tabbar to be on the top half of the screen and not on the bottom as it is on the default tabbar controller.
Once the tabbar is on top I want that when a button is touched, the subview bellow the tab is changed. Furthermore, the subview that should be loaded was alson designed inside the storyboard. The following sketch shows what I want it to look like:
On my research I found a solution (here) for putting the tabbar on top. Now my problem is on loading a subview bellow it.
I tried it with [self.view addsubview:theNameOfTheViewCreatedINStoryboad.view] but the application simply hangs when I press the button.
I think that is because I am not specifying anywhere what should be the dimension of the new view or where on the scree should it be placed. The reason for that is because I do not know where it should be done.
Can anyone give me some lights on this matter? Is the referred approach the best one for putting a tabbar on top? How can I solve the subview problem?
Glad to see you are using a toolBar and not a tabBar. Even better would be to create a custom content view controller.
You should be looking into using containment:
UIViewController containment
How does View Controller Containment work in iOS 5?
positioning UIViewController containment children
check out the docs

iPhone Cocoa Touch: Adding additional view or sub view to views

From What I understand based on what I read, most of the time we will be dealing with view when creating apps for the iPhone. Adding sub view to table view, adding table view to a UIView....etc
So my question is how do I go about mix and match all the views? Let say I start off by using a template in Xcode (Tab Bar Application) which basically give me 2 "section", a tab bar controller with 2 UIView to began with. I modified the code for the UIView so that I end up with 2 table view. Now I wanted to an add additional view to the table view whenever I tap on a cell on the table view. I create a new view controller call firstDetailView and hook them up but nothing happen. Surprisingly the app doesn't crash.
I might do it wrongly or have missed something. I am a newbies to programming. Any help would be appreciated.
Thanks.
If you want to deal with different views which are handled by a view controller you should read the View Controller Programming Guide
Navigation through views will be done with a Navigation Controller (Guide here)
Tab bar's are explained as well (Guide here)
Try to read the Apple documentation in the first hand, they are pretty good and all basic stuff is explained there.

Moving a 'UITabBarController with UINavigationController' iPhone app to 'UITabBarController with UISplitView' on iPad

I have an app where the appDelegate has a UITabBarController. Each of the tabs has a navigation controller which I currently use to push a single detail view onto the stack in each tab. I am hoping to replace my navigation controller on each of the tabs with a splitViewController. I use the Interface builder to provide the UINavigationController for each tab. I am having trouble loading a nib for each tab that has a UISplitViewController in it. I am getting an instance of the UITableViewController class displaying on the screen, but I am not getting the UISplitviewController or the Popover or the detail view etc. These classes are all working in a standalone app, but I am not able to get them into each of the tabs in one app. Although I am currently using the Interface Builder I am open to doing this programmatically. If someone has suggestions, or an example small project of a Tab based app with individual split views in the tabs I would appreciate it very much. (As this is my first question I am not sure how much code or other pictures from IB would be helpful for me to post. If you need further detail please let me know and I would gladly amend this post.)
Apple documentation
"The split view controller’s view should always be installed as the root view of your application window. You should never present a split view inside of a navigation or tab bar interface."
Moving on...
Not only shouldn't you -- if you do so, an error is thrown when you run. It's impossible.

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).