nib

How to load a UIView from a NIB?

泪湿孤枕 提交于 2019-12-03 05:01:35
问题 I have been using UIViewController s and initWithNibName with much success, basically using them as a convenient way to design the view with Interface Builder. Unfortunately I have built a hierarchy of views before noticing this line in the UIViewController documentation: Note: You should not use view controllers to manage views that fill only a part of their window My question is this: Having a very simple NIB that only has a UIView in addition to the default First Responder and Owning

iOS Storyboards/NIBs low-level anatomy. How are they implemented?

不想你离开。 提交于 2019-12-03 03:43:56
问题 I became interested in low-level details of NIB/Storyboards mechanisms in iOS. I want to learn more about their implentation - I'm interested in developing of my own mechanism. I found some information about NIB files on the Apple site. They said: a nib file describes these objects exactly as they were configured in Xcode. At runtime, these descriptions are used to recreate the objects and their configuration inside your application. . Ok. But I couldn't find any information on how

calling initWithNibName doesn't initialize items in the nib, it has 0x0

放肆的年华 提交于 2019-12-03 02:58:27
When I call: self.viewController = [[DidItViewController alloc] initWithNibName:@"DidItViewController" bundle:nil]; and then I check self.viewController.navController right after this line is executed in the debugger, I find that it's empty (0x0). On DidItViewController I have my navController defined as: IBOutlet NavigationController *navController; and in my nib file I have the NavigationController bound to this navController property on the File Owner (a DidItViewController). Why doesn't my navController get created? Any ideas? I think I may be missing something about the way

Group views in Interface Builder

左心房为你撑大大i 提交于 2019-12-03 01:52:54
Is there any way to move a group of views within another without grouping all in the center ? Edit: Here some images with the process. 1.- I have a view with separate subviews (labels, buttons, images...) 2.- I create a new view (that will contain all the subviews) 3.- Select all the subviews and put them in the new super view. 4.- When the subviews are in the new "super"view, all of them are centered and I need to relocate all. I found a very nifty solution that you are not gonna believe .. ! I had a group of like 30 labels and buttons positioned pixel by pixel, so I HAD to, no matter what,

iOS9 - UITableViewCellContentView is covering up Controls inside Cell

孤人 提交于 2019-12-02 23:03:17
I have made a custom UITableViewCell called "SwitchCell" that has a switch. In iOS9 Only, using Xcode 7 beta, the Content view in the cell is on top of the switch. (See screenshot of View Hierarchy. You can clearly see that the content view of the cell is on top of the other views. ): So all the touches to the UISwitch are intercepted, and the IBAction does not fire. In iOS8, this is not a problem. See screenshot for iOS 8.4 simulator. You can see that there is no content view on top of the controls: Has anyone had this problem? I tried remaking the NIB from scratch, but the same result occurs

How to disable Interface Builder document versioning from auto updating?

為{幸葍}努か 提交于 2019-12-02 21:44:05
This question is still getting a lot of upvotes. So look at Update3. once you have upvoted, commented, answered, please please please file a radar Viewing a nib / xib, modifies the file, forcing me to either commit the change or undo the change. This is not an issue, until there are merge conflicts. Detail: I work in a team of 5 iOS developers, and the last few versions of XCode, we are experiencing an issue with the .xib / nib files getting touched / modified when anyone opens the file (without making any changes). If one developer thinks "screw it, let me checkin whatever modifications xcode

What do “Use standard value” and “Constrain to Margins” mean in Auto Layout?

戏子无情 提交于 2019-12-02 18:19:50
I have gone through a couple of Auto Layout tutorials such as this . However I am still not clear on what the following options do in the pin dialog What are the differences between standard value, manual values, and canvas values? What does the constrain to margin checkbox do? What does align do? What are the differences between standard value, manual values, and canvas values? Standard value uses "the recommended spacing for constraints that specify distance between items" , which is usually around 10 points. Current canvas value copies the value from how you have the objects currently

iOS Storyboards/NIBs low-level anatomy. How are they implemented?

懵懂的女人 提交于 2019-12-02 15:59:15
I became interested in low-level details of NIB/Storyboards mechanisms in iOS. I want to learn more about their implentation - I'm interested in developing of my own mechanism. I found some information about NIB files on the Apple site. They said: a nib file describes these objects exactly as they were configured in Xcode. At runtime, these descriptions are used to recreate the objects and their configuration inside your application. . Ok. But I couldn't find any information on how storyboards implemented. Does storyboard is just a bunch (pack) of NIB files - one for each UIViewController ? Or

iOS Application launch black screen, UINavigationController, Nib, RootViewController

三世轮回 提交于 2019-12-02 15:10:08
问题 I've got the following app, whose RootViewController is named TopicsViewController . When I run it, there aren't any errors or breaks but the screen is black . No table, populated or empty, just a black screen. Not sure which of the following is happening: Is there something wrong with my application didFinishLaunchingWithOptions method in relation to a parser initlizing in it? Is it something to do with my nib file for the TopicsViewController ? I can show more code from my

UIBezierPath not rendering properly

你离开我真会死。 提交于 2019-12-02 14:24:47
问题 I have a tablviewcell which has uiview in it. Based on some logic I change the background color and make the left and right corner rounded. I make these view corner round from cellForRowat indexPath function. Here is my extension. extension UIView { func roundCorners(corners: UIRectCorner, radius: CGFloat) { let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius)) let mask = CAShapeLayer() mask.path = path.cgPath layer.mask =