nib

Cannot instantiate UIView from nib. “warning: could not load any Objective-C class information”

我与影子孤独终老i 提交于 2019-12-01 09:16:50
问题 I get "could not load any Objective-C class information. This will significantly reduce the quality of type information available." warning in the console while initializing an instance of this class: @IBDesignable class SystemMessage: UIView{ @IBOutlet weak var lbl_message: UILabel! var view: UIView! override init(frame: CGRect) { super.init(frame: frame) setup() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) setup() } func setup(){ view = loadViewFromNib() view

Cocoa - loadNibNamed:owner:topLevelObjects: from loaded bundle

﹥>﹥吖頭↗ 提交于 2019-12-01 08:38:29
In a document based Cocoa app, I am instantiating several objects (plugins) from external bundles using: - (NSMutableArray *)getPluginsOfType:(Class)type; { NSBundle *main = [NSBundle mainBundle]; NSArray *allPlugins = [main pathsForResourcesOfType:@"bundle" inDirectory:@"../PlugIns"]; NSMutableArray *availablePlugins = [NSMutableArray array]; for (NSString *path in allPlugins) { NSBundle *pluginBundle = [NSBundle bundleWithPath:path]; [pluginBundle load]; Class principalClass = [pluginBundle principalClass]; [availablePlugins addObject:principalClass]; } return availablePlugins; } Within each

UIView default styling has rounded corners?

一个人想着一个人 提交于 2019-12-01 07:26:15
问题 I am using a UIPopoverController to display a UIView . The layout is somewhat similar to a UISplitViewController so it is very strange looking to have rounded corners on the "detail view" because it leaves a small gap. I have not been able to find anything at all relating to other people having this problem, but these rounded corners seem to be the default style. Is it possible to remove them? Things that might help: I load my view from a nib file, but I have currently made no changes to the

Cocoa - loadNibNamed:owner:topLevelObjects: from loaded bundle

为君一笑 提交于 2019-12-01 07:19:55
问题 In a document based Cocoa app, I am instantiating several objects (plugins) from external bundles using: - (NSMutableArray *)getPluginsOfType:(Class)type; { NSBundle *main = [NSBundle mainBundle]; NSArray *allPlugins = [main pathsForResourcesOfType:@"bundle" inDirectory:@"../PlugIns"]; NSMutableArray *availablePlugins = [NSMutableArray array]; for (NSString *path in allPlugins) { NSBundle *pluginBundle = [NSBundle bundleWithPath:path]; [pluginBundle load]; Class principalClass = [pluginBundle

Endless recursive calls to initWithCoder when instantiating xib in storyboard

扶醉桌前 提交于 2019-12-01 05:46:07
In order to re-use a certain subview throughout my application (which is storyboard based), I decided to build the subview as a nib, and load it in. To do this, I have done the following: I have a UIView subclass we can call Widget. I create a corresponding xib file, set the File owner property to my new subclass, hook up the IBOutlets. Then, in my storyboard, I have a uiview inside of a view controller, and I set its class to the Widget class I created. Within the widget class, I override initWithCoder, and in there load the nib as follows: -(id)initWithCoder:(NSCoder *)aDecoder{ if ((self =

Xcode “-[UIViewController _loadViewFromNibNamed:bundle:] loaded the nib but the view outlet was not set.” error

感情迁移 提交于 2019-12-01 03:22:37
I'm using Xcode 4 and when I run my app, the first screen doesn't load. It fails in the simulators and on a device. I've searched for answers and they all say to make sure I've dragged the circles in Files Owner to the correct views. Sorry I don't remember the names of the things, I'm new to Xcode. I've dragged the circles to the correct view and tried many things but none of them worked. What could I be doing wrong? Here is the full error: 2012-02-19 12:59:54.655 Ponyboard[271:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController

Could not load “my-icon.png” image referenced from a nib (iPhone)

瘦欲@ 提交于 2019-11-30 22:52:35
I am receiving the following error message: 2011-02-11 14:47:13.815 myProject[13177:207] Could not load the "icon-troubleshoot.png" image referenced from a nib in the bundle with identifier "com.myCompany.myProject" This file is an old file that was being used before, but has now been deleted. As far as I know icon-troubleshoot.png is not used anywhere in my project. I tried cleaning and rebuilding, emptying caches but it didn't work. Searching for the string troubleshoot as a textual reference and "contains" selected returned nothing. Does anyone know how I can find what is causing this error

Adding constraint to a UITableVIew headerview

让人想犯罪 __ 提交于 2019-11-30 21:17:34
So I'm new to the constraints. I've a nib file which contains multiple Views as siblings. The ViewController's view contains a tableView and I've another view which is going to be added to the tableHeaderView (let's call it self.tableHeaderView). The problem i'm facing is that I want to resize the self.tableHeaderView based on certain conditions. I've added constraints to all of my UI elements and I can't, for whatever reason, add a height constraint to the self.tableHeaderView via the nib. I tried changing the frame of the self.tableHeaderView programmatically but that has no effect when i

Converting an iPhone NIB to iPad NIB in Xcode 5

给你一囗甜甜゛ 提交于 2019-11-30 16:21:58
问题 I'm working on a universal app. Well there's this: Converting iPhone xib to iPad xib? and also this: Xcode 4 .xib Create iPad Version. Am I the only one that still doesn't manage to convert my nib to iPad? I refresh Xcode and under "size" still only see Retina 3.5 and Retina 4. I even used two of the SO questions scripts attached as answers and still remain with the same iPhone nib... Please help! 回答1: I was just having this same problem! I use that answer all the time regarding editing the

Creating a custom view using a xib

江枫思渺然 提交于 2019-11-30 15:15:11
问题 Using MonoTouch, I'm trying to make a custom view, so I can reuse this view multiple times in a screen. (it's a bunch of labels and buttons) After reading the answer to this post: How to add a custom view to a XIB file defined view in monotouch I must be getting close, but this only seems to allow me to add a custom view, defined in in myCustomView.CS, but what I'm looking for is a way to use a separate .XIB to design my custom view in the interface builder and only use the corresponding cs