Navigation Controller not showing Root View (just white space) - ios

long time lurker first time poster here. My question is about Navigation Controllers in Xcode 6.1.1.
Basically I've created a feed app that grabs posts from my Wordpress Site and shows them in a table list. When an item from the list is selected, a web view shows the url from the selected item. I want to manage moving between these two views (table and webview) with a navigation controller, so I embedded one into the table list view on my storyboard establishing the table view as the Root. When I run the app, I get a blank screen with an empty navigation bar at the top of the screen (nav controller is set to initial view). I expect to see the list view inside the controller but I get nada. In the past I've been able to do this without writing any code and it's worked no problem.
Not sure why this is happening, but I'm sure it's something really simple that I'm overlooking. Any help would be awesome. Thanks for looking.

Fixed the issue. I knew it was going to be something really small. All I had to do was add a Navigation Item to the Table View Controller. Once I gave the nav item a title, I embedded the Navigation Controller and everything works as expected now.
I got the idea by throwing a navigation controller object onto my story board and cross referencing the canned relationship against my own and that's the only thing that was missing. Thanks for all your help.

Related

Implementing a back button without navigation controller

I'm kind of new to programming in swift and in general in xcode. I'm creating my first app and i've run into this issue that i cant seem to find a fix for online..
my first scene is a view controller with two buttons where you pick a language and it redirects you to the appropriate tab controller in that language.. now I'd like to add a back button to those tab controllers in order to go back in case you picked the wrong language.
what I've tried so far doesn't really work..
I have tried using a navigation controller but they dont show on the first view controller so that doesnt help me, ive tried putting just a navigation bar and adding a navigation item (see pictures below) but the back button isnt rendered correctly and cannot be reached..
help is much appreciated !!
You can use first UIView and set top constraint 0 with safe area. See image
Hope it helps.

Split Controller master table view pushes to master nav stack not detail

I am trying to set up a very basic Split View Controller. The left side (master) is a table view, which when a row is tapped, I expect to load details into the right side (detail).
I do not know what I'm doing wrong. I have an example project that functions exactly how I want it to, but I'm missing something in my main project. I've very carefully scoured the example project and as far as I can tell, everything is done exactly the same in my main project.
The problem I'm having is, when I tap a cell in my table view, the view controller that is invoked, appears in the master (left side), not in the detail (right side).
My question is: what exactly do I have to do to get the right side to display the detail?
I'm testing on an iPhone 7 Plus Simulator in landscape mode. Portrait mode works fine.
As far as I know I have all the correct delegate setup complete. Thanks in advance!
Wow! Okay, I figured out what was wrong. This has got to be a bug in the storyboard UI, because it does not make sense that this would be the problem.
When I ctrl-dragged from the table view cell to the nav controller so as to create the detail segue, I chose "show". I then realized that it should actually be "show detail", so I went into the attributes of the segue that I just created and changed "Kind" to "Show Detail (e.g. Replace)", which as far as I know, should end up being the same thing as if I would have selected "Show Detail" when creating the segue. It is not.
After a great deal of trial-and-error, I discovered that I had to delete the segue I originally created and re-create the segue, selecting "Show Detail".

Same tab bar on every view

I'm trying to create an app with three primary views (maybe even more in the future) that you can always get to from anywhere.
The tab bar controller works great for that, I have 3 icons in the bar for every view. However, when branching off from any of those to other modal views, the tab bar is obviously no longer there.
I got around it by embedding one view in a container, so it is not overlapping the tab bar, but I cannot do the same thing for another view. (fx. on the screenshot you can see Zastavky Table View, I would like to be able to get to another view by clicking cell in this one, yet still have a tabbar on the bottom)
Screenshot of storyboard:
Do you guys have any idea how this could be done? Is my whole concept wrong here? Thank you very much! :)
Use navigation with show segue.
UITabBarController
|--UINavigationController
| `--UIViewControllerA
|--UINavigationController
| `--UIViewControllerB
`--UINavigationController
`--UIViewControllerC
This construct may help you.

Yelp Middle UITabBar Navigation

I am trying to do a UX like Yelp's middle UITabBar item with navigation. I saw https://github.com/BasheerSience/BROptionsButton and am using it to get the pop-up UIButtons. However, when I try to navigate to other view controllers from the buttons I can't get anything working. Note, I am using the storyboard. I need a navigation controller since each of the pop-up buttons will navigate to separate VCs. I am probably missing something very basic, but am not seeing it. Thanks!!
I finally came back to this. I ended up using a container view where the ...didSelectItem:(BROptionItem*)item method dictates which child view to navigate to.
I found this to be the most helpful for my situation:
https://github.com/mluton/EmbeddedSwapping

master controller with buttons needs to load pageviewcontroller. master buttons not accessible after first load

I am new to xcode and IOS (and this board. First post).
I am completely flummoxed by a design problem and unsure how to approach.
I have three buttons, each of which calls a new array of pages that need to navigate horizontally with swipe gestures and have their own buttons.
The three buttons in the parent work exactly like a tab bar except they have to be bigger and higher than a tab bar would be. The called page arrays mostly work like a pageviewcontroller except that the pages need to have a button/indicator below to allow non sequential navigation. The target HAS TO LOAD WITH A SEGUE.
The problem I'm encountering is that using a modal segue to load a pageviewcontroller and prepareForSegue to keep the master/parent view controller visible results in my buttons being inaccessible. I assume its because I cant click thought the child view controller.
Secondly, I don't know if its possible to customize the page indicator dots of a pageviewcontroller so they can look like a bar with graphics.
Here are my specific questions:
Is it possible to load a view controller with a modal segue and still access my buttons? Can the child be resized?
can i customize the buttons/indicators in a pageviewcontroller. Can you point me to some code?
should navigation like this be done with some completely different approach? What about a view controller container?
Here's a diagram (cant post images directly yet)
I've found the answer to my second question: It seems that pageViewController's indicators are not customizable in any way. This rules out pageViewController for what I need.
9 Views in 10 hours. Is this not the best forum for questions like this or is there something wrong with my post?

Resources