xib

how I should send data from xib to viewcontroller?

半世苍凉 提交于 2021-02-11 12:47:16
问题 i have a view that is a xib, this view contains a buttons for a calculator, I did this because I need a custom keyboard for my app, my app has some views that needs this keyboard the problem is, how I send the data from view to my view controller? in my view controller I only has a textfield and a view with xib custom class I use swift 4.2 custom view and textflied this is my code from my xib import UIKit class keyboardView: UIView { @IBOutlet var viewKeyboard: UIView! var textIntroduced = ""

Location of Add/Delete Buttons for an NSTableView in OS X

杀马特。学长 韩版系。学妹 提交于 2021-02-08 01:59:36
问题 I think I must be missing something simple but being new to Xcode... Specifically I am coding in Swift but I believe this is more of a .xib file question. It is easy to have add and delete buttons outside of an NSTableView (like the native Mail app's Preferences->Signatures panel) but how do you integrate these into what seems to be the NSTableView itself? (more like the native Mail app's Preferences->Accounts panel) Ideally I want the option to have more than just add / delete buttons

How to make Xib footer items Clickable in tableView Swift

与世无争的帅哥 提交于 2021-01-29 16:42:11
问题 I am struggling to make my footer items clickable in tableView. In tableView I am using two different Xib's and I have used tableView - didSelect function as a expandable cell on click. 1) Main Xib 2) Child_View - Footer Xib Now on footer items which is childView - I also want to make clickable action so on clicking it will navigate to viewController with their detail information. How can I achieve this because didSelect is already in use for expandable cells? Attaching three images Main Xib

NSSplitViewController/NSSplitViewItem support in XIBs

痞子三分冷 提交于 2021-01-27 14:24:19
问题 Is there support for NSSplitViewController/NSSplitViewItem for XIBs? I see only NSSplitView Can I just drag&drop NSViewController and subclass it as NSSplitViewController? How do I add NSSplitViewItem that it mostly works out of the box? I can easily see support for them in storyboards. 回答1: The split view controller is not part of the object library for xib files. The easiest way to use split view controllers is to use storyboards. If you are unwilling to use storyboards, your best option is

UITableViewCell as UIView from XIB

霸气de小男生 提交于 2020-08-25 05:17:53
问题 I have CustomTableViewClass in XIB, adding it to UITableView like class RestaurantsTableView: UITableView { override func awakeFromNib() { self.register(UINib(nibName: "RestaurantTableViewCell", bundle: nil), forCellReuseIdentifier: "restaurantCell") } } and everything works fine, now I would like to use this CustomTableViewClass as UIView in some other UIViewController , but I do not get how to properly override its init(coder aCoder: NSCoder) function, cause I do not need one for

my custom framework crashing 'Could not load NIB in bundle

ε祈祈猫儿з 提交于 2020-08-10 20:11:47
问题 I have a custom framework which includes one xib and a UIView class for the same. when I connect my test app with the framework, it got crashed *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </private/var/containers/Bundle/Application/10A66571-E4BA-4C82-BDCE-82DA8018CA1C/cam.app> (loaded)' with name 'scanner'' *** First throw call stack: (0x1b318bab0 0x1b2ea5028 0x1b307b2fc 0x1b6efbb4c 0x1b6efc9e4 0x104902338

IBOutlets not being set EXCEPT when creating throwaway variables during initWithNibName:bundle:

你离开我真会死。 提交于 2020-02-08 06:28:04
问题 Let me first say that I've searched Google and, although many have similar issues, I haven't seen anything with the following bizarre behavior and remedy. I've created a UIViewController and associated nib with several IBOutlets. On trying to consume this nib from another class, I discovered that after instantiating it with initWithNibName:bundle:, the IBOutlets are still nil. I confirmed that they are correctly wired up, and yes, they are being synthesized, but still nothing. While