Default Show Left Bar Button Item - swift2

I am using a show segue from a Table View cell to a "Detail View" because I am using a navigation controller, the Detail View comes by default with a left bar button to take me back to Table View. Because it is done by default, I cannot figure out how to access it, to change its propertys. More specifically it's color. I am using Swift in the most current Xcode. How do you access the default navigation bar button when using a show segue?

Related

How to show scroller indicator in NSTableview when scrolling , hide when not scrolling

I am new in MacOS ,I want to show scroller indicator in NSTableview when scrolling , hide when not scrolling.
I am thinking to get the delegate of NSScroller , So i can detect when it scrolls,then hide/show it . Please help
Per the NSTableView reference page:
Table views are displayed in scroll views.
A table view itself doesn't know how to scroll. You have to put it inside a scroll view in order to scroll the table. If you're used to iOS and UIKit, that's a difference; UITableView inherits from UIScrollView, so on that platform a table view is a scroll view. In a MacOS project, if you insert a table into a view in Xcode's nib or storyboard editor, Xcode will actually insert a scroll view that contains a table view so you'll already have what you need. If you're creating the table in code, you'll need to also create the scroll view yourself.
Looking at NSScrollView, there's a property called autohidesScrollers which is...
A Boolean that indicates whether the scroll view automatically hides its scroll bars when they are not needed.
So, to get the behavior you're asking for, you need to set the scroll view's autohidesScrollers property to YES.
Of course, you can set that in the storyboard editor too, but again you need to look at the options for the scroll view, not the table view:

NSTabView comes with duplicate buttons in Interface Builder?

If I drag a Tab View Controller to the storyboard of an OS X application, the tab view buttons seem to misbehave. Can you help me understand what's going on?
Here's an minimal example of a fresh project, where I simply replaced the default empty View Controller with a new Tab View Controller:
The highlighted Tab View is shown as No Shadow Tab View by default, which means that the Tab View's style is Tabless in the Attributes Inspector.
There are also two Tab View Items below the Tab View in the Scene's list.
If I build & run, the result looks like this:
The tab controls are visible, but the tab view has no bezel. It seems like the tab buttons that are displayed are actually the two extra Tab View Items, not the native buttons of the Tab View itself.
If I change the Tab View's style to Top Tabs instead of the default Tabless, I get a bezel, but duplicate tab buttons:
And if I change it to Tabless With Bezel, the bezel is below the tab buttons, instead of properly sitting midway under the buttons:
I can't figure this out. Why are there two sets of tab buttons to start with (with the "real" one hidden by default)? The two extra Tab View Items seem to be completely redundant, but they can't be deleted.
Is there a way to have a tab bar with a proper bezel when using Interface Builder and a Tab View Controller?
You need to set the style of the tabViewController to "Unspecified" and setup the included tabView.

How can you keep a new view from covering the tab bar after a segue?

I have a tab bar with 2 tabs. I ctrl-dragged from a button in the first view and released it on the second view and chose "show". The storyboard shows the tab bar on all the scenes, but when I test the button in the simulator, although it does segue to the second view, the second view doesn't show the tab bar.
How can you keep a new view from covering the tab bar after a segue?
Maybe I need to ctrl-drag somewhere else or do this programmatically?
Here is a screenshot of my story board.
When I segue to the "Read Article" view controller I would like to still see the tab bar and star icon at the bottom.
p.s. This may have been answered before with Objective-C, but I am looking for a Swift answer. Thanks.

Top offset of TableView embeded in Navigation Controller in storyboard

I have custom TableViewController with plain style Table View and it is embeded in Navigation Controller. I use Refresh Control on the table view and Black Translucent style of the navigation bar and all is setup in storyboard.
The first row of the table view starts right under the navigation bar item, which is ok, and the rows can scroll under the navigation bar which is semi transparent. When user starts to pull the table down to activate Refresh Control, the animation of the refresh object obviously starts at the edge of the screen under the Navigation Bar, and so the refresh object is always partially covered by the navigation bar which can confuse inexperienced users.
Is there a way to tell the TableView to avoid scrolling under the navigation bar and start the refresh control object animation right under the navigation bar? I tried to play with Scroller Insets on table view without any effect.
Thank you.
If you go into the properties for the tableview controller in your storyboard, you can change the size and positioning of the tableview to start after the navigation bar. The problem isn't an offset, but the size and position of the tableview itself. Just move the y position down to accommodate the nav bar.

xcode 4.2.1 - storyboard - Moving from different view using modal and having Tab bar visible

In xcode storyboard, I have created a Tab Bar Controller that goes to 4 different tabs. One of the tabs is the main menu that has the same links available at the Tab bar. When I use the tab bar to move to the tabs, I do have the tab bar visible. But when I use the main menu links it goes fine to the different views but I lose the tab bar. How can I go from view to other view without losing the tab bar.
I have no header files in my project everything is done through storyboard.
You have to create a class implementation file for the view that you are using as a menu, in it you need to create a function that is called when you press the buttons. In those functions, you should call the following:
// Change 0 to the tab index that you want to display.
[self.tabBarController setSelectedIndex:0];
or
// Change theAppropriateViewController to the view controller that you want to display.
[self.tabBarController setSelectedViewController:theAppropriateViewController];

Resources