I have a transparent custom navigation bar like the one on this picture:
I would like to have a modal view that appears from just under the navigation bar up to half of the screen and make it feels like the navigation bar is expending until half of the screen. And I would like to animate it like if it is sliding down. It will just contain a UILabel, and it will appear when I click on the "i" information button on the top right corner.
I don't know how to make a translucent modal view appears from the middle of the screen instead of from a border. Especially since my navigation bar is transparent and my modal view should not appears behind it while appearing. Do you have any example or tutorial to help me do that?
I am coding in Swift :)
Related
I have a tableview controller which has an embedded navigation bar. I managed to make my nav bar transparent. Now I am trying to achieve a solid color nav bar when I scroll towards the bottom of the table view. I am relatively new to iOS development. So please answer accordingly. I have no idea about scroll views either. I am not sure if I need to add a scroll view or not. If I do, where do I add it? Above the tableview or below it?
Here are a few images of what I want to achieve:
Image 1: Transparent nav bar, but bar button items are visible
Image 2: Transparent nav bar becoming white, bar button items' color changing from white to red
Image 3: This is the final image, where nav bar becomes white and bar button items become red.
If we scroll back up to the top, everything goes back to being the way it was at the start.
This is my slide menu in cyan color on the left and dark on the right is my actual window having the slide menu. i need a common navigation bar for both of them but i am not getting it.
I have attached my slide menu with a navigation bar "embed in" and which furthure is connected to swrevelviewcontroller. what should i do to get a single top navigation bar in a situation where the slide menu is visible and the screen also.
First go to storyboard select view controller then check properties from right side.
Then after you need to set UIBarButton(menu/back) manually in all view controller as per requirement. Might be your problem will solved.
I have an rss app that I'm working on in xcode and the articles load up in a full screen web view. I need to place a "share" button in the navigation bar but since my uiwebview is full screen it won't show up when I run the app. I even tried cropping the top of the web view lower and placing the button there but still no luck. Here is an example of what I mean:
The share button needs to be on the right side of the navigation bar but i cannot seem to figure out how that make that work.
Thanks in advance
Fist of all, your top navigation bar seems to be missing (judging by your image). Since the nav bar is missing there is no possible way that the share button will be visible. You can do this is the IB or in your code.
For your IB you can move the view controller's 'layer's' so to speak. When you place all the elements down, your VC should look something like this:
On the left hand side we can see what subviews are at the top and which ones are at the bottom.
As we can see here that the UIWebView is at the top of the list, so it'll be at the bottom of the pile. The navigation bars are further down the list so they'll be at the top of the pile. So due to this they'll go over the UIWebView.
The other way to do this is using insertSubview:aboveSubview:. Fist of all you'll add your UIWebView using addSubview: and then add the nav bar using insertSubview:aboveSubview: and finally you'll add your button the someway as you did for the nav bar, but this time you'll be adding the button above the nav bar not the web view.
My best guess is that your forgetting to add another navigation bar to the top of the screen. Hope this helps!!
I want to know can we create 2 bars at top like in this screen shot. one top bar with multiple buttons and search bar and second one with the back button.
You can use the UINavigationBar from the UINavigationController and you can add on the view of your currently displayed UIViewController a UIToolBar right at the top of the view.
As per the picture below, part of the TableView is appearing behind the Navigation Bar.
I had been ignoring it, thinking it was just the way the storyboard drew things because it looks ok in the app. But it can be problematic - sometimes, to select the cell behind the Navigation Bar, one needs to use the Document Outline.
Is that just how it goes? Or is there a way to get Xcode to draw things properly?
It looks like you have selected a translucent navigation bar which will not push down other subviews. Try using the standard or black navigation bar. It probably looks fine in the app because your navigation controller using the non-translucent bar.