xcode-storyboard

Swift - Title Not Appearing for Navigation View Controller

为君一笑 提交于 2019-12-12 08:44:34
问题 I have a navigation view controller that upon action sends a segue to a tab bar view controller. Because of this segue the tabbed view controller inherits the navigation bar. I am trying to apply a title to one of my view controllers attached to the tab bar view controller, but setting the title via code is not working for me. does anyone know the reason why that could be? Here is a picture of my storyboard: The view controller with the logout button is where I am trying to set the title in

Obtaining a View Controller Reference

喜欢而已 提交于 2019-12-12 04:33:07
问题 I read quite a few questions and answers no this problem. Some are for Ojective C. Some are for iOS. The ones that were close to what I need didn't work. I've set up a protocol for delegation. It doesn't work. The problem is that delegate variable isn't set. I need the reference to an active controller. Delegator protocol SwitchTabDelegate: class { func selectTab(tab: Int) } class ViewController: NSViewController { weak var delegate: SwitchTabDelegate? override func viewDidLoad() { super

Xcode storyboard is masking uitabbarcontroller elements with blue colour

假如想象 提交于 2019-12-12 03:45:34
问题 When I launched my project, all the uitabbarcontroller views are covered in blue. I didn't set the background to blue in code or by using the storyboard. And all of the elements that I add onto the storyboard go behind this mask. Here is what it looks like. What could I be doing wrong? Using Xcode 10 and Swift 3. 回答1: This is a bug in Xcode 8 , when you add an image to your tabbar item the blue area will be removed for that specific viewController . So add an image to the tabbar item and the

Gradient Mask is applied multiple times in reused prototype cell

♀尐吖头ヾ 提交于 2019-12-12 03:24:51
问题 I have a tableview, with a customer UITableViewCell class - this is created as a prototype cell in Storyboard/Builder. Because my cell is linked to the Storyboard prototype, I reference it as follows (cellIdentifier matches the ID on the prototype cell): EventsListTableViewCell *cell = (EventsListTableViewCell *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier]; As such, the cell is always initialised and ready (I can't use "if (cell == nil{...} ") This is fine, however I want to

Xcode 7 beta 3 Storyboard bug

混江龙づ霸主 提交于 2019-12-12 03:18:41
问题 I am attempting to make an app without using StoryBoard. I am instantiating my root view controller from the AppDelegate When I run my app I get the following SIGABRT. *** Assertion failure in -[UIStoryboard initWithBundle:storyboardFileName:identifierToNibNameMap:identifierToExternalStoryboardReferenceMap:designatedEntryPointIdentifier:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3486.4/UIStoryboard.m:63 2015-07-26 18:42:54.204 NarwhalFeed[3783:2840317] *** Terminating

Button with IBAction causes “Could not connect action, target class NSNibExternalObjectPlaceholder does not respond to -action” error

一个人想着一个人 提交于 2019-12-12 02:37:06
问题 I have a Storyboard scene which contains an NSTableView with an NSTableViewRow subclass. In this table view row, I have a button which I have wired up to an action in the view controller on the scene. When the table loads, I am seeing this cryptic error from Xcode and the action never fires when I click the button: Could not connect action, target class NSNibExternalObjectPlaceholder does not respond to -playVideo: It looks like the file's owner never gets wired up. Since these

Move between multiple storyboards by replacing the windows root controller

心不动则不痛 提交于 2019-12-12 00:26:34
问题 To move between VCs on a single storyboard, I use the first custom segue from the post : bidirectional storyboard travel without stacking This replaces the window's root view controller with the destination view controller, so the VCs do not stack and cause memory allocation issues. I need to use multiple storyboards and so I am after a method of moving to a second storyboard that replaces the windows root controller with the initial VC of the new storyboard (I.e in a similar way to the

UITextView uncheck Selectable checkbox cause text issues in runtime

二次信任 提交于 2019-12-11 06:13:42
问题 Using text view in storyboard you can make it not editable or not selectable next to Behavior caption or vice versa: Seems options looks very promising and it works good for editable option. But when I uncheck selectable checkbox it cause some issues with font and text in runtime. So let's say that I set font to Helvetica-Bold and set color Red (which are not default settings for text view) and then uncheck selectable box like on image above. Next let me add some code to viewDidLoad: self

Macos app displays view in Xcode, but is totally blank when launched outside of Xcode

旧城冷巷雨未停 提交于 2019-12-11 04:57:32
问题 I'm working on a small macos app, which I'm building with storyboards/interface builder in Xcode 10.2.1 on MacOS 10.14.5 (though I've set a deployment target of 10.13, if that matters). When I run the app within Xcode, i.e., by hitting the "play" button, it loads up just fine and is visible and operates. However, when I "archive" it to a freestanding executable and then try to run the app from the hard drive, it opens up on a blank screen. (See screenshots below.) I've cleaned the build

How to connect Xcode Storyboard's “Simulated Metrics” toolbar to an actual IBOutlet UIToolbar?

早过忘川 提交于 2019-12-11 03:55:16
问题 I'm hitting issues when attempting to design a UIToolbar Accessory View via an Xcode Storyboard. When I drag a UIToolbar object to the top margin of my View Controller, the item is added to the left pane and I am able to connect it to my class's IBOutlets. It appears correctly when I run the app. However, the toolbar is not visible anywhere on the storyboard. I thus lose the visual editing benefits of using Interface Builder in the first place. The bar button items are only visible in the