xib

Change default xib view in xCode 4.5 to 3.5“ and not 4”

余生颓废 提交于 2019-12-13 07:36:19
问题 Since updating to xCode 4.5, and with the release of the iPhone 5 with the 4" display, each time I create a new ViewController with a xib file, the xib defaults to a 4" display size. At the moment I'm working through Aaron Hillegass's excellent iOS Programming text. All the examples assume a 3.5" Xib. How do I get new views to be 3.5" instead of the taller skinny 4" default xib views? 回答1: Found the answer here: How to make a uitableview in interface builder compatible with a 4 inch iPhone

Xcode: simulators shows correct xib interface, but on device, it's showing old interface [duplicate]

一笑奈何 提交于 2019-12-13 07:08:20
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Xcode shows old, deleted xib files My problem is: I have updated one of the xib file in Xcode, it works well for iPhone/iPad simulators, but when I try to run on device (iPhone), it still shows the old interface. I have tried delete the app on device, clean the project in Xcode and run it on device again. For several times. But still showing old xib file UI. Does anybody know how to solve this issue? 回答1: Two

Connecting actions works. Connecting outlets doesn't

你离开我真会死。 提交于 2019-12-13 00:31:11
问题 I have a XIB file with my controls in it, loaded in the Interface Builder (Xcode 4.0.2 on Snow Leopard). The file's owner is set to, let's say, the someClassController class, and I've also added (in the Interface Builder) an NSObject instance of someClass , as well. I've managed to link e.g. a button with an action in someClassController or someClass - and it works for both of them. However , whenever I link an outlet to ANY of them, it fails to show up; and NSLog reports NULL pointers. Hint

MonoTouch - missing header files when editing xib [duplicate]

时间秒杀一切 提交于 2019-12-12 16:17:00
问题 This question already has answers here : Missing h-files and Assistant Editor not working because of it (monoTouch/MonoDevelop) (3 answers) Closed 6 years ago . I am on Mac OSX Lion 10.7.0 with Xcode 4.2 for IOS 5 and Xamarin's MonoTouch. ("Cross platform mobile development tools that allow you to use C# and .NET to create apps for iOS and Android") and on VMWare 8.0.0 on Ubuntu 11.10. I am testing MonoTouch and when I follow this tutorial then at one step, I have to do my xib file with xcode

Storyboard and xib use in same project

强颜欢笑 提交于 2019-12-12 13:46:48
问题 I am stumbling over what I believe is probably a fundamental misunderstanding of how classes work in Objective-C. I am using Storyboards but in this app I wanted to create a simple custom date picker view for a textfield on one of my view controllers. However, I seem to be having a problem accessing any of the properties of the date picker class from my view controller: First I modeled my CustomDatePicker.xib in IB as follows: I have created a custom class by sublcassing UIView as follows:

Difficulty Localizing xib Files

十年热恋 提交于 2019-12-12 10:45:48
问题 I have localized two sets of xibs and put them in my project navigator as shown in the picture below: My Localized.strings files are working fine, but the xib files are sometimes selected incorrectly. When I set the device language to French, I see the English xib view. When I set the device language to English, I see the French xib view. I removed the xib files from the project, deleting the references only, and then dragged them back into project in the same places, as the picture shows.

Xib for different iOS devices/simulator?

吃可爱长大的小学妹 提交于 2019-12-12 10:23:10
问题 I run the simulator, I go to Hardware and Device, it shows list of Devices iOS Simulator > Hardware > Device iPad iPad (Retina) iPhone iPhone (Retina 3.5 inch) iPhone (Retina 4 inch) I want to make different XIBs for all these devices. But I want to know the way. as I see there are two options in Xib Attribute Inspector Xib Attribute Inspector > Size Freeform Retina 3.5 Full Screen Retina 4 Full Screen Though there iPhone/iPod Touch 320x480 iPhone/iPod Touch having retina display 640x960

Perform segue from button in XIB

梦想与她 提交于 2019-12-12 10:02:52
问题 I'm using storyboards for the most of my project, but i have one UIScrollView that consists of multiple views that are loaded from XIB I'm stuck on how to perform a segue when a button is clicked in the XIB What i've done already. Added the views to a scroll view Added a custom button added an IBAcion on the custom button MainViewController NSString *nibName = @"coverArticleView"; NSArray *nibObjects = [NSBundle.mainBundle loadNibNamed:nibName owner:self options:nil]; coverArticle *pageView =

Instantiating a UIView from a XIB file with itself as the file's owner?

半腔热情 提交于 2019-12-12 09:56:25
问题 Let's say I have a XIB file (MyView.xib) containing a single root UIView whose class is some custom UIView subclass (MyView). I want to create an instance of MyView (in code) from the XIB file but I also want the file's owner to be the instance of MyView itself (so that I can link IBOutlets from the XIB to the code). In other words, MyView is the class of the root view in the XIB and it's also set as the file's owner class. I tried something like this inside the MyView implementation: - (id

Xib loading crashes when it contains NSSCrollView

倖福魔咒の 提交于 2019-12-12 06:47:38
问题 I've noticed that my app crashes if I: Use custom Swift class for NSWindow Add NSScrollView on the window Running a specific target(I have 2 more in this project, and both of them works fine in the same conditions) The code calling it looks like: guard let alertWindow = alert.window else {//It crashes here //other code return false } Class implementation is empty. It's just NSWindow subclass(if I use NSWindow everything is ok) class CustomAlertWindow: NSWindow { } It works fine with an empty