Why does the iOS toolbar view get added on top of my loading view when I hide and show it again? - objective-c

I have a normal navigation based iOS app
I've got "loading view" which I initiate from my app delegate and use across the app, simply by showing and hiding it.
This works fine, but as soon as I hide the bottom toolbar in one of the views in the app and display it again, the toolbar seems now be shown on top of the my generic "loading view"
Any help is much appreciated

How do you add your bottomBar? Obviously not on the view itself, right? Than it would probably be beneath the overlay.
Also you should use an extra window for the loading overlay. That would solve your issues.

I basically ended up deleting the loading view and recreating it each time.
It now appears at the top of the view hierarchy each time. This fixed the problem.

Related

Issue with layout

I've got a small problem with the way my app looks. I don't want to see that shift at the top of the screen. While creating this scene in IB there isn't one, but it appears when I launch the app. I would be really grateful if anyone could help my to solve this issue.
You can fix this as follows:
In your storyboard, select the view controller that is giving the issue (You can use the yellow icon on top of view controller to select it).
Click on the attribute inspector
Uncheck the 'Adjust Scroll View Insets'

Error displaying Tab ios

I'm trying to create an app with two tabs. When I get to the scene where I can choose between tabs, the first one (the one which is loaded automatically) is showing as desired. But, when I click the second tab, it goes behind the Navigation Bar. Both Controllers have the same configuration, as far as I know. I can't find the problem here.
If I swap the order of the tabs the issue is the same. It looks like that the problem is with the Tab Bar Controller.
What can I do to fix it? Thanks.
you can do
self.edgesForExtendedLayout = UIRectEdgeNone;
on your -ViewDidLoad Method of the 2nd view

Writting in a textarea inside a (xcode) WebView, causes the view to being pushed up

Here is the scenario. I'm developing an app for ipad. This app, is just a container for a web site. I created a webview that calls a website which has a textarea.
If I click inside this textarea and the softkeyboard is displayed, the view is pushed up more than the size of the keyboard. I fixed this by using the UIKeyboardWillShowNotification notification to put the view down again.
But check this. If I write inside the textarea, the view is pushed up again, even if is just one letter.
Here are some screenshots:
this is before writting something
this is after writting something
Has somebody had the same issue? Or any clue of what is hapenning?
Ok I figure it out. It was my fault, the cause was that the main view was a TableView. Changed to a simple View and everything is now perfect

iOS layout: alternative to tabs?

I'm working on a iPhone app which shows an mobile webform in a UIWebView. I'm using a default iOS layout with a navigation and tab bar.
The mobile webform is displayed in a UIWebView in the white area. Since the webform has a lot of input fields, we really need as must space for it as possible. Because of this, we are planing to remove the tabs in the bottom. Over time, there will be more tabs/sections, so it is not a solution to just add a button for each section in the left side of the navigation bar. On a iPad a popover could easily be used to handle this.
Is there a standard iOS layout mechanism to handle this change of sections/views without using tabs?
You could do something long the lines of Path or the new Facebook app and have the "table of contents" behind the Navbar and the navbar slides away (along with the child view) to reveal it. When done right (ie smoothly) I think the effect is really cool.
This would also work great as you add more and more options, since the table could just scroll.
Here is a framework that might be you started: http://www.cocoacontrols.com/platforms/ios/controls/iiviewdeckcontroller
I would consider replacing the navigation bar's title with a control that lets you switch between tabs. You can assign the bar's titleView property to a control or a button and it will generally do the right thing.
If you're limited to 2-3 tabs, you could simply use a UISegmentedControl.
If you want more, you could use a button which, when tapped, pops up a view that allows you to select the view you want. This could be a modal table view, or you could slide up a UIPickerView from the bottom of the screen, similar to the keyboard.
I use this technique in an app of my own, screenshots here. Tapping the button cycles between views (in this case, I'm changing the contents of the table cells); tap-and-hold slides up a picker.
Another possibility would be to arrange your different forms on pages in a scroll view with a page control at the bottom, à la Weather. The best option, though, if you’re going to have a particularly long list and want to keep your screen real estate, is probably the FB/Path-style sidebar table.
I ended up using a UIActionSheet but I think it in other situations would be more stylish to use a controller like the IIViewDeckController.

Is there another way than presentModalViewController to show a UITabBarController on just part of the screen?

I have a UITabBarController displaying a number of settings-screens in my app. I want them to be shown on just a part of the screen for layout reasons. In fullscreen, the lists become unreadable (too wide), there are just a few controls per page making the page feel very empty, and the tabbar buttons are far away from the content (Fitts law).
Using presentModalViewController with the UIModalPresentationFormSheet style gives me the size I want. I do this on top of an empty background, since in my case it doesn't make sense to display anything behind it. The "real" working area is displayed with another presentModalViewController in fullscreen mode on top of it all.
This works but feels like a hack. One problem is, I can't make the background behind the settings dialog move in the transition to fullscreen with the UIModalTransitionStyleFlipHorizontal style.
TL;DR
Can I embed a UITabBarController non-fullscreen in another "background"-view? I can't find any information of how I would do this.
Can I embed a UITabBarController non-fullscreen in another "background"-view? I can't find any information of how I would do this.
Why don't you try it out?
Create a container view of the size you want the tab bar controller to have.
Create the tab bar controller.
[containerView addSubview:tabBarController.view];