I ran into a problem while programming on the new Xcode 5 and iOS 7.
The App is basically some ViewControllers showing different information and they are linked with a TabBarController.
Now, the problem is, that whenever I compile, at first the initial view appears as it should, but when I switch to another tab and go back the view changes.
I have set up the constraints so that the lower part should stick to the bottom and the MapView changes height according to the screen size.
Related
I am setting up a login page in my app and decided to add a navigation bar to display an image/logo. However, after I added this navigation bar and ran my code in the simulator the content of my view is being pushed down. I have attached pictures to show the difference between the interface builder and the simulator. All of my constraints are related to the super view and my view encompasses the whole screen.
interface builder screenshot
simulator screenshot
follow the steps :-
add a new view inside the main view
insert all elements in that 2nd view
give the constrain to 2nd view (if possible then give static height and width)
give constrain to all elements inside of 2nd view
must give 2nd view center x,y constrains
i hope it will work for you ...!
For anyone who comes back here later:
All of the above answers work in their cases, however the issue for me was that I had "under opaque bars" in my storyboard unchecked which caused the view to display lower than it should.
On a brand new MACOS application project (swift, storyboards), using the latest available version of xCode (8.3) I can't get a crossfade transition with a NSTabViewController that I add to my story board. The window is not resizing as well.
What am I doing wrong ?
I start by adding a new window controller, I remove its content view controller that I replace by a tabviewcontroller.
The tabview controller comes with two tabs wired to two view controllers. I resize one of them to make it bigger and put random buttons on both of them to be able to check wether the full view is visible or not at runtime.
Everything is left with default settings, as well as the "crossfade" transition of the tabviewcontroller.
But when running the application, tabs change abruptly, and the window doesn't resize to display the new tab.
My goal is to build a preference panel on my storyboard ans I just fail on the first steps.
For crossfade animation to work, you need to connect delegate outlet of the tab view to the tab view controller.
It does not seem smooth resize is supported by the standard tab view, though.
I tried to update one of my IOS6 app to IOS7 using Xcode 5 GM which was just released couple of days ago.
One of the main problem I met is that some of the table views (UITableViewController) cannot be shown correctly anymore after being recompiled by IOS7 SDK:
Some of them cannot shown the last cells completely: You can see half of the last cell right there, but cannot scroll down to see full of it; some others cannot show the first cells completely: half of the cells was hide and you need to draw down the table view to see it.
BTW, those problematic tableViewControllers are all embedded in tab bar controllers.
Could anybody help me with this? Thanks.
UPDATE:
I tried several ways, and here's my solution:
Delete the tab bar controllers, and add them back through editor->embed in->tab bar controller (I tried to drag out a tab bar controller from the object library directly, but that didn't fix the problem. Don't know why).
Re-link other view controllers to this new tab bar controller and run the app. Now, you probably see the first cell still cannot be show completely as I described before, but the last one can be shown correctly.
Go back to storyboard, select the tab bar controller and deselect "under top bars" in the attributes inspector. Run it again, everything works fine, at least for me.
I think it's not a bug but rather a UI design as intended. As you can see the overlap of Tabbar still have some see through effect.
As I dont want to resize my table view to fit specific above the Tabbar.
Workaround with last cell bottom padding or add in extra last cell with same height as Tabbar?
I have a fairly simple iPhone application that I want to have run on both the iPhone and the iPad. I'd like to just have the iPad version be a bigger version of the iPhone version, scaled up or not -- I'm working on an iPad-specific version of the app that makes better use of the interface, but wanted to make sure my existing customers have something in the meantime.
The app is a simple tab-based application, and within each tab is a navigation controller that presents a table view, each of which can drill down a couple of layers. Everything mostly works -- I have a couple of instances of views not filling the space available, but I can fix that. My biggest problem right now is that the navigation controllers universally break when I try using them. Once I drill down a level or two, I suddenly won't be able to come back up again.
Let me try to explain in more detail:
One tab starts off with a "year" table view, showing all years that have entries; if you tap a year, it pushes another table view with all months in that year that have entries; if you tap a month, it pushes another table view that shows the individual entries; if you tap an entry, it pushes a view (a UIWebView, with some extra widgets) that shows an entry's details.
Each push is done with [self.navigationController pushViewController: foo animated: YES]. The three table view controllers I mentioned above are all created from the same nib (in fact, everything pushed onto a navigation controller in any tab is loaded from the same nib). Since I know there are only up to three levels of navigation, I just allocated three identical view controllers and use one, two, or three depending on how many entries there are.
Popping these controllers off using the "back" button seems to universally mess up the state of the view controller. So, if I drill down to the third view -- showing everything in a single month -- I won't be able to pop all the way back up to the first view: the back button stops working if I pop up one level.
Another example in another tab: it's one table view that you can tap any entry on, and a new view controller will be pushed that shows the details of that entry. If I tap an entry, tap the back button, then tap the entry again, no back button appears, or sometimes, the text that would go inside the back button appears, but no button appears!
This behavior happens if I try running the iPhone app in scaled mode (built with base SDK 4.0, supporting OS 3.2) or in native mode (built with base SDK 3.2). It runs without problems on the iPhone. I'm kind of at a loss here, because this stuff always "just worked" out of the box, mostly from the defaults that were set up back when I first created the project.
My programmer's instincts are telling me that I'm doing something very wrong in my view navigation, and that the iPad is just exposing it, but I can't figure out what it is.
Has anyone run into an issue like this, or suggest something it might be or some better way to debug what's going on?
The issue was that I had a category on NSMutableArray, which added stack-like methods push and pop. Removing this category class fixed this issue.
WTF, though.
Not sure what's going on here, but my iPhone apps nav bar shows back and the title of my detail view controller even when I'm back to the original view. It wasn't happening earlier, it has changed recently (but not sure when exactly).
E.g. I click on a row, view the didSelectRow XIB and then click back on the NavBar controller, but it still shows back even though the view does change back to the original table view. I then have to press back again and then it clears.
Update: It's as if its trying to go back three times instead of two. Because, if you visit another row without removing the back button, it stores it as if you need to go back twice.
It works fine in portrait mode.
Any ideas?
Not all the tables had been set to auto-rotate, so their views were still staying portrait.