nib

Performance penalty for using NIB files?

本秂侑毒 提交于 2019-12-07 07:59:05
问题 I am curious to know if anyone has any experience comparing the load time performance of iPhone apps with views laid out in NIBs vs. views laid out entirely programmatically (i.e. instantiating UITextView, adding it to the view, instantiating UIButton, adding it to the view…). If I want a simple app to load lightning fast, would it be better to forgo using a NIB (well, XIB technically) and instead create view elements programmatically? Is the time spent loading and parsing a NIB sufficient

用Lisp(CCL)调用Cocoa的nib文件--Nib-Loading 使用指导(教程翻译)

∥☆過路亽.° 提交于 2019-12-07 07:50:46
用Lisp(CCL)调用Cocoa的nib文件-Nib-Loading 使用指导(教程翻译) === 原文地址: http://trac.clozure.com/ccl/browser/trunk/source/examples/cocoa/nib-loading/HOWTO.html 原文标题: Nib-Loading HOWTO 翻译者: FreeBlues 2013-06-17 === 目录 0 概述 1 Nibfiles 的相关知识 2 对 Nibfiles 的使用 3 如何调用一个 nibfile 3.1 获取区域 zone 3.2 建立字典 3.3 调用 nibfile 4 建立一个 nib-loading 函数 5 如何卸载 nibfile 0 概述 这篇教程说明如何通过对 Lisp 形式(forms)求值, 加载 nibfiles 到正在运行的 Clozure CL 副本中。你可能想通过这种方式加载 nibfiles 来为你正在工作的一个应用程序项目来测试用户界面元素,或使应用程序能够动态加载可选的用户界面元素。 1 Nibfiles 的相关知识 Cocoa应用程序开发有很大一部分是使用Cocoa框架来创建用户界面元素的。虽然它是完全有可能只是通过对框架的方法调用创建任何用户界面元素,设计用户界面更标准的方式是使用苹果的 InterfaceBuilder

Am I right in saying initWithNibName:bundle is used to manually load nib files and that initWithCoder would be used as an alternative?

穿精又带淫゛_ 提交于 2019-12-07 06:07:24
问题 I can't use initWithNibName:bundle seeing as I'm now using the latest XCode (5). After some research I found an alternative: initWithCoder. Example: - (id)initWithCoder:(NSCoder *)aDecoder { self = [super initWithCoder:aDecoder]; if (self){ // code here } return self; } What I'm trying to understand is how this is an alternative to initWithNibName? Currently studying with a big nerd ranch book for ios which was written for ios6 and previous versions of xode and experimenting with the

iOS - UIActivityIndicator causing “Hides when stopped but is neither hidden or animating” warning

放肆的年华 提交于 2019-12-06 18:38:12
问题 I'm getting this warning for every nib file that contains a UIActivityIndicator . The warning states: Unsupported Configuration: Hides when stopped but is neither hidden or animating What am i doing wrong? 回答1: This means, You have set Hides when stopped . So there must be two states only, Hidden Animating But you have set neither Hidden nor Animating. See the image: It must be Hidden or Animating , If you have Checked Hides when stopped . 回答2: You have selected hide when stopped option but

Why doesn't initWithNibName work for my UIViewController subclass?

六月ゝ 毕业季﹏ 提交于 2019-12-06 18:05:36
问题 I have subclassed UIViewController into a new class, PageViewController (I'm writing a simple book app). I want to add a new view loaded from a nib file and am using the following code. It works. PageViewController *viewController1 = [[UIViewController alloc] initWithNibName:@"Page1" bundle:nil]; [viewController1.view setUserInteractionEnabled:YES]; [self.view addSubview:viewController1.view]; However, the first line is wrong because I should be calling alloc on PageViewController. When I

Xcode 4.5: Getting error “loaded the nib but the view outlet was not set”

﹥>﹥吖頭↗ 提交于 2019-12-06 13:55:31
问题 After updating to Xcode 4.5 beta I have this error. I don't get the same error if I run the project by Xcode 4.3.3. 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "LocationList" nib but the view outlet was not set.' "LocationList" is a custom cell and the owner is a subclass of UITableViewController. I tried to subclass it to UIViewController and connect it to "view" in IB but then it doesn't recognize [self.tableview reloadData]; 回答1

How exactly does an NSView, an NSViewController, and MainMenu.xib fit together?

十年热恋 提交于 2019-12-06 11:35:44
问题 I'm going to cut right to the chase: my application has grown quite a bit, and now I think it's time for me to do some tidying up. I want to separate some of my views from my MainMenu.xib file into their own Nib file. The part that's tripping me up is the whole "Interface Builder + My Code" thing. Here's what I've done so far: I've added a view controller proxy object: In the Identity inspector, I've added my view controller's class name to the Custom Class field. In the Attributes inspector,

How to perform segue to a nib from storyboard

核能气质少年 提交于 2019-12-06 11:19:59
问题 I have 90% of my current project done in storyboard but I am also using a single xib view controller for an "enter your pin" view because this is the way it was integrated in a github project that I imported into my project. I need to segue from the xib back to storyboard. Going from storyboard to the xib was easy with a push method but now I would like to modal to another view in storyboard. Any suggestions? First, I tried to convert the xib to a view in storyboard but I failed as it was

Load (and display) a .XIB from the web

别等时光非礼了梦想. 提交于 2019-12-06 11:05:51
问题 I want to be able to download (via a NSURLConnection request) a .XIB file, and have it presented in a view. I have implemented the NSURLConnection, and surely enough, when the connection completes, I am left with a NSString of XML data representing the XIB file. Example: (just the first few lines of many) <?xml version="1.0" encoding="UTF-8"?> <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="7.10"> <data> <int key="IBDocument.SystemTarget">800</int> <string key="IBDocument

Should an outlet to a view controller class be weak or stong? OSX app

点点圈 提交于 2019-12-06 08:47:14
问题 Here's what i did. Make a clean OSX project. went to main.xib and dragged a popover controller. This created 2 visible objects on on interface builder. I went to the appDelegate.h file and did `-@Property ( assign ) IBOutlet NSViewController *popVC; Then i went to the applicationDidFinishLaunching: method and did popVC = [[NSViewController alloc] init]; Result: I get the following error message: Shouldnt objects on a nib be weak since it is already owned by the nib? 回答1: Outlets to view