interface-builder

How can I have the only column of my NSTableView take all the width of the TableView?

别来无恙 提交于 2020-08-20 23:08:12
问题 I am currently trying to learn a bit of Cocoa (using the book Cocoa Programming for Mac OS X). In one of the exercises, we set up a NSTableView with only one column, to act as a list of things. What annoys me is that in Interface Builder, I could not find a way to have the (only) column always take the full width of the NSTableView . As a consequence, it always somehow looks like there are 2 columns when there is actually only one. Any idea ? 回答1: This is just an IB problem that happens all

How to change default tint color in Xcode interface builder?

你说的曾经没有我的故事 提交于 2020-07-20 06:54:12
问题 How does one change the global default tint color in Xcode interface builder? 回答1: In the File inspector tab of the Utility panel, the right one, you can find controls about size classes, auto layout and the global tint of your storyboard. 回答2: Interface Builder Way : Select the Storyboard or Xib file you want to set the default tint on. Then in Utilities on the first tab File Inspector look for the Interface Builder Document section and you will see a Global Tint like the image below shows.

Change button text from Xcode?

橙三吉。 提交于 2020-07-04 08:22:08
问题 I have a IBAction connected to a button in my Interface Builder. Is it possible to change the text on the button (in IB) from within my code during runtime? 回答1: If you've got a button that's hooked up to an action in your code, you can change the title without an instance variable. For example, if the button is set to this action: -(IBAction)startSomething:(id)sender; You can simply do this in the method: -(IBAction)startSomething:(id)sender { [sender setTitle:@"Hello" forState

How to add a bar button item in interface builder?

百般思念 提交于 2020-06-25 07:40:33
问题 I am really new to iPhone development and I need help setting up my views. I have a view that is named FirstViewController.xib and a controller class for this view. In my MainWindox.xib I have setup a root controller with a moveToNextView function that is connected to the options bar button item. So when I click on this item the current view switches to the first view and I am able to swticht back. That works fine so far. The navigation bar at the top of the screen from the MainWindow.xib is

UIView `readableContentGuide` in Interface Builder?

对着背影说爱祢 提交于 2020-06-24 22:47:46
问题 The iOS 9 readableContentGuide is a UILayoutGuide (essentially, a thing you can pin constraints to) that all UIViews have. The idea is to keep subviews with text from being too wide on iPad in landscape. It's easy to configure this in code ( v1 is the subview, v is its superview): NSLayoutConstraint.activateConstraints([ v1.topAnchor.constraintEqualToAnchor(v.readableContentGuide.topAnchor), v1.bottomAnchor.constraintEqualToAnchor(v.readableContentGuide.bottomAnchor), v1.rightAnchor

UIView `readableContentGuide` in Interface Builder?

隐身守侯 提交于 2020-06-24 22:45:09
问题 The iOS 9 readableContentGuide is a UILayoutGuide (essentially, a thing you can pin constraints to) that all UIViews have. The idea is to keep subviews with text from being too wide on iPad in landscape. It's easy to configure this in code ( v1 is the subview, v is its superview): NSLayoutConstraint.activateConstraints([ v1.topAnchor.constraintEqualToAnchor(v.readableContentGuide.topAnchor), v1.bottomAnchor.constraintEqualToAnchor(v.readableContentGuide.bottomAnchor), v1.rightAnchor

iOS 13.4 SDK update Navigation Bar title colour is set to Black?

那年仲夏 提交于 2020-04-11 08:16:19
问题 I have a problem with iOS 13.4 update Navigation Bar title is set to Black. the title was set to white in attribute inspector for Navigation Bar before the update but after I update my Xcode to 11.4 and iOS SDK to 13.4. 回答1: On your all xib s, find the root navigation bar , and set their tint color to default . 回答2: Swift 5 IOS 13 Interesting thing its will work only in viewDidLoad & viewWillAppear and not working in viewDidAppear //MARK:- Call this function in viewDidLoad or viewWillAppear

iOS 13.4 SDK update Navigation Bar title colour is set to Black?

吃可爱长大的小学妹 提交于 2020-04-11 08:15:54
问题 I have a problem with iOS 13.4 update Navigation Bar title is set to Black. the title was set to white in attribute inspector for Navigation Bar before the update but after I update my Xcode to 11.4 and iOS SDK to 13.4. 回答1: On your all xib s, find the root navigation bar , and set their tint color to default . 回答2: Swift 5 IOS 13 Interesting thing its will work only in viewDidLoad & viewWillAppear and not working in viewDidAppear //MARK:- Call this function in viewDidLoad or viewWillAppear

Link Storyboard to UIViewController with Generic

烂漫一生 提交于 2020-04-08 10:43:10
问题 I have this view controller, meant to present model object details in a generic way: class APIModelDetailsVC<T where T: APIModel>: UIViewController {...} I'd like my storyboard to use this class. I'm able to assign it in Interface Builder: I do the preparation of this ViewController in a tableview's didSelect method (including specifying the type for the generic placeholder): override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { print(