I am using Xcode 6 and the tutorial I am following is using a version of Xcode 4 and so this is another issue that has turned up (I followed tutorial exactly).
So I created two initial scenes - a log-in and a sign-up scene, both of which have a username textfield at the top and then a password textfield directly below it. I then added buttons below these text fields.
Now I have a problem where my top-most UIelement, the username textfield, seems to be overlapped by the navigation bar, in that I can't see the username field anymore.
I can see that the username text field exists when I look in outline, but have to double click on the navigation bar on top to see that field on the storyboard canvas.
I have a navigation controller set up. Embedded in it is a table view controller which links to the log in and sign up scenes - a show segue goes from the table view to the log in scene, and then another segue goes from the log in button to the sign up scene.
As well as the navigation bar blocking/overlapping my username text field, oddly there doesn't seem to be a Navigation item in outline for these two scenes- only the Button item and the text field items are there under the log in and sign up scene.
I thought that maybe I hadn't added the navigation controller properly and that it wasn't linked to these scenes, but when I run the program the navigation bar is there for all scenes, and anyway I can see it as a rectangular block at the top of my view (again for both scenes).
I need to make my Username text field visible, but also keep the navigation bar.
Is there any straightforward way to do this with interface builder or auto layout?
Would really appreciate any help.
I found a solution. I double clicked inside the navigation bar area where the textfield is hidden, and from there selected Drawing > View > Hidden.
The hidden checkbox was unchecked, so I checked it, and that made the username field visible inside navigation bar (strange!) and I then dragged it out of there and moved it to be underneath the navigation bar.
I would still like to know whether there might be a better way to have done this, I'm sure there is! But this is some kind of solution at least.
(I still cannot see navigation item in my scene outline)
Related
I have looked at all the navigation bars on all the story board scenes of my app, and I have gone through all the view controller m. files and there is no mention anywhere of the navigation bars settings. The mystery is that I have two different pages, one where the back button is in lower case (back), another where it is in title case (Back), and other pages just have the cursor image < or nothing at all. If I click on the storyboard navigation bar area, it highlights in blue, and there nothing obviously there.
I cannot find where this has been defined !!
Any ideas?
In the storyboard check the previous view controller settings (the Controller before Controller with back button).
Select View Controller
Select Navigation Item
Select Attributes inspector tab (triangle icon)
Check Back Button field (there could be invisible symbols like spaces)
There seems to be multiple questions relating to this problem, yet none of them can provide a proper working answer.
I'm using a Navigation Controller in my storyboard to provide navigation to a settings view with a couple of subviews. Table View contains a table with multiple entries, one for each subview. They all have a segue attached to them with identifiers such as SettingsViewToNotificationsSettingsView.
Navigation Controller
-- Relationship to -- >
Table View
-- Perform manual segue -->
Settings subview 1
Settings subview 2
Settings subview 3
Settings subview 4
When selecting an element in the list, the following line of code would be called:
performSegueWithIdentifier("SettingsViewToNotificationsSettingsView", sender: self)
The transition works fine, and the back button does actually transition back to the overview, but it's not visible. I am quite sure, it's not because of the title of the parent view, as it has a title set.
It's even long enough to move the label of each subview off the center to the right, to fit in there. If I programmatically change the title to something shorter (such as ABC), the subview's title is centered again.
Please tell me if any other information is required. Thanks in advance!
I have a pretty unique problem. I have a custom nav controller (https://github.com/cwRichardKim/RKSwipeBetweenViewControllers) and I'm trying to customize it even further. The effect I'm trying to get is this:
What I have is this (ignore the search bar):
The problem that I have is that when you click on any of the tabs in my nav bar ("public" for example), the click doesn't register, and it clicks whatever is underneath instead. For example, if I click "Munchies", it will click the search bar underneath the tab. Also, even if there is nothing clickable underneath it (I've tried this with a blank UIViewController), the tabs (eg: "Munchies") are still not clickable.
I have a theory for why this is. If I raise the tabs by a few pixels, the tops of the tabs become clickable. So, I think the navigationBar has a frame within which you can interact with its objects, but if you interact with anything outside of that frame, it interacts with lower layers. I've tried expanding the nav bar height and it doesn't work (I've looked it up and it's against the rules).
Any thoughts?
Thanks!
I read your code here that is shown here:
https://github.com/cwRichardKim/RKSwipeBetweenViewControllers/blob/master/RKSwipeBetweenViewControllers.m
I'm not exactly sure whether this will work out. But this issue has occured to me in table cell as well. Perhaps you can try typing this in.
[navigationView setUserInteractionEnabled:NO];
I'm pretty sure that your approach is on the right track because as I read Apple documentations it says:
Custom views can contain buttons. Use the buttonWithType: method in UIButton
class to add buttons to your custom view in the style of the navigation bar.
Custom title views are centered on the navigation bar and may be resized
to fit.
We use the standard UISearchDisplayController in a project built on iOS 6.1 SDK. There appears to be a bug when running the application on an iOS7 device - The controller lying underneath the modal controller gets the user interaction instead of the UISearchDisplayController.
Steps to reproduce:
Click on the search bar to give the UISearchDisplayController focus (modal view is shown on top of the viewcontroller lying underneath and the search bar is moved to the top of the window)
Write something in the search field to get the table view with results to show up
Click on the clear search field icon (X) or backspace the text in the search field
Now the modal view is shown instead of the table view
At this point if the user clicks on the modal view, the click is caught by the viewcontroller lying underneath the modal view causing faulty behaviour. This problem still remains even if the table view is shown again after the user has done another search.
Has someone else noticed this bug, and has anyone a solution to this problem?
i am making one iOS tabbar application in that i have put 4 different tabs and whenever i click on 1 st tab and load another view after clicking of the first tab. After that when i press back button then tabbar is not displaying .So that i want hint that how can i show that
back the tabbar when we move from one tab from another and yes how i can use consistent the tabbar in whole application can you just guys help me on this i am new to iOS development.
here i am put the screen shot ...
here first screen is this one..
when i tap the video button that are first in the view then another window open
which are as under and see the tabbar is not there...
when in video controller there is tabbar is there but i drag and connect to that then tabbar is disabled
Looking at your screen snapshots, do I correctly assume you're attempting to transition to the "Videos" scene by touching the big "Videos" button in the center of the "Home" scene (rather than touching the tab bar button at the bottom of the screen, which I assume works fine)? If that's the case, you need to have your button tell the view controller's tab bar controller that you want to change the index of the tab bar, and it takes care of it for you. You cannot do the transition using a segue (or at least not without a custom segue, which is even more complicated than the procedure I outline below). If you're changing the view some other way (e.g. using a standard segue or using presentViewController, pushViewController programmatically, etc.), your tab bar can disappear on you.
You later said:
when in video controller there is tabbar is there but i drag and connect to that then tabbar is disabled
Yes, that's true. You cannot use a segue from one of your big buttons to one of the tabs in your tab bar. (Or technically, if you wanted to use a segue, it would be a custom segue which would do something very much like my below code, though perhaps a tad more complicated.) So, rather than using a segue for your big button, you need to write an IBAction (connected to the big Videos button on the Home scene), that tells the tab bar to change its selection:
- (IBAction)clickedVideosButton:(id)sender
{
[self.tabBarController setSelectedIndex:1];
}
A couple of comments:
My answer was predicated on the assumption that your tab bar works as expected when you tap on the buttons of the tab bar, itself. If you tap the buttons at the bottom of the screen, do you transition to your other views correctly and preserve the tab bar? If so, my answer above should solve your issues in getting the big buttons to work. If not, though, then the problem rests elsewhere and you need to show us your code that might account for that (either you're something non-standard in the UITabBarControllerDelegate methods, or your viewDidLoad of the view is doing something nonstandard).
If I understand your user interface design right, you have the tab bar at the bottom as well as the big buttons in the middle, which presumably do the same thing. That is, no offense, a curious user interface design (duplicative buttons, requiring extra tap on a button, etc.). You might want to choose to either use either big buttons (in which you can retire the tab bar, eliminate the IBAction code I've provided above, and just use a nice simple navigation controller and push segues, for example), or just use the tab bar (and lose the home screen, lose the big buttons, etc.).
You also made reference to "press back button", and I don't see any "back" button on any of your screen snapshots. Do I infer that you have a navigation controller and you're doing a pushViewController or push segue somewhere? If you're doing something with back buttons, you might need to clarify your question further.