There have been numerous times when I have HATED Interface Builder. It can be a pain to launch when all you want to change to change is 1 little thing in an NIB. It can be extremely slow. If you change 1 thing you have the risk to have to reconnect all Outlets and Actions and there have been times when I spend hours making the view in Interface Builder and when I want to do something that Interface Builder does not support I have to create my own custom view from scratch. I have decided to avoid Interface Builder completely, unless I absolutely have to and I am not regretting my decision at all. I am now starting all of my new projects without a single NIB and I have an incredible amount of control now. Here is how to set up a iPhone app with out any NIBs.
**PROJECT is the name of you iPhone project.
1) Delete MainWindow.xib
2) Open Info.plist and remove the line that says “Main NIB File base name”
3) In main.m change
int retVal = UIApplicationMain(argc, argv, nil, nil);
to
int retVal = UIApplicationMain(argc, argv, nil, @"PROJECTAppDelegate");
4) Create the window that was in the NIB as soon as the application launches by adding this code to the beginning of the applicationDidFinishingLaunching: method
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
Thats it! Now you don’t need a single NIB file in your project.
Happy Coding!
分享到:
相关推荐
2. Storyboards & Nibs:创建用户界面的图形工具,Storyboards用于构建应用程序的导航流程。 3.手势识别:通过GestureRecognizer处理用户的触摸事件。 4.推送通知:实现远程消息推送,增强用户互动。 5.性能优化:...
笔尖和 iBeacon 此自述文件概述了在此应用程序上进行协作的详细信息。 它基于 ,并经过修改以与 iBeacon 通信。...记下您的 iBeacon 的 UUID、Minor、Major 和标识符,并将其更改为client/js/app.js文件
Create app interfaces with nibs and the nib editor, Interface Builder Understand Cocoa’s event-driven model and its major design patterns and features Find out how Swift communicates with Cocoa’s C ...
NIBS-基于具有MySQL支持的Cistron Radius的中小型Internet服务提供商的计费系统。
The nibs, images, and sounds in this directory will be appropriate for French speakers. At runtime, the app will automatically use the version of the resource appropriate to the user's language ...
Discover how to build interfaces with nibs and the nib editor Explore Cocoa’s use of Objective-C linguistic features Use Cocoa’s event-driven model and major design patterns Learn the role of ...
C works, Learn how instances are created, and why they’re so important, Tour the lifecycle of an Xcode project, from inception to App Store, Discover how to build interfaces with nibs and the nib ...
虽然用户已经可以在其iPhone上找到“App Store”和“iTunes Store”这样的官方应用,但开发一个自定义的搜索应用依然有其教育意义。因为Apple提供了搜索整个iTunes商店的网络服务,开发者可以通过这个服务学习网络...
2. **NIBs(Interface Builder)与Xcode**:Cocoa使用Xcode作为集成开发环境,其中Interface Builder用于可视化设计用户界面。NIB(Next Interface Builder)文件存储了界面元素的布局和连接信息,使得开发者可以...
Hue 快速入门 iOS Swift 端口 该项目是将 Objective-C Hue 快速入门应用程序移植到 Swift。 可在此处获得: : 我已经这样做了作为 Swift 的学习练习以及拥抱故事板。 完全欢迎拉取请求和 Swift 指针:-) ...
项目描述中的“Nibs”可能是指该项目的一个特定组件或工具,但由于信息有限,我们无法提供更详细的解释。建议查阅相关文档或源代码以获取更多信息。 在标签中提到了“JavaScript”,这意味着该项目的主要编程语言是...
查看以了解有关Nibs的更多信息并设置您自己的实例。 变化 更新时间:2018年10月2日 Updated the node version to be compatible with the Heroku-18 stack 更新日期:2018/2/23 The repo differs from earlier ...
Learn how nibs are loaded Understand Cocoa’s event-driven design Communicate with C and Objective-C In this edition, catch up on the latest iOS programming features. Multiline strings and improved...
6. **Nibs和Storyboard**:在Swift中,我们可以通过Nibs或Storyboard来创建和设计UITableViewCell。Nibs是独立的UI文件,而Storyboard是一个包含多个屏幕和导航的单一文件。两者都可以帮助我们实现界面的可视化设计...
在界面构建方面,本书会指导如何使用nibs和nib编辑器创建应用界面,并理解Cocoa的设计模式和特性。 书中还会探讨Objective-C API在Swift中的应用,以及如何在Cocoa Touch框架下进行事件驱动模型的开发,这对于理解...
9. **Storyboard和NIBs**: 故事板(Storyboards)和NIBs(Nib files)是构建iOS应用界面的可视化工具。在Swift之前,开发者通常用它们来组织屏幕布局。 10. **Unit Testing和UI Testing**: 在Swift之前,iOS开发者...
"AdmiNIBS-开源"是一个专门为NIBS计费系统设计的Web管理平台,旨在提供便捷、高效的在线管理工具。NIBS(可能是“网络信息系统”或类似含义的缩写)计费系统可能是一个用于处理账单、计费和服务收费的软件系统,常见...
NSArray *nibs = [[NSBundle mainBundle] loadNibNamed:@"CustomSettingCell" owner:self options:nil]; CustomSettingCell *cell = [nibs objectAtIndex:0]; self.tableView.registerNib:[UINib nibWithNibName:...