xib

UIViewControllerHierarchyInconsistency when trying to present a modal view controller

丶灬走出姿态 提交于 2019-12-17 15:25:18
问题 Trying to present a modal view controller with the following code MapViewController *mapView = [[MapViewController alloc] initWithNibName:@"MapViewController" bundle:nil]; mapView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self.navigationController presentModalViewController:mapView animated:YES]; [mapView release]; Keep getting the following error.. 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time!

Marking some XIB/Storyboard strings as not localizable

淺唱寂寞╮ 提交于 2019-12-17 12:15:33
问题 I am using Base Internationalization for XIB/Storyboard files and the "Export for Localization" method using XLIFF files for translators. I have some labels, buttons, etc. that have text that should be translated, but I also have labels where we use some placeholder text (like a full-name) so you can see what the view would look like when populated with data, but those labels always have their text come from an outlet programmatically. Is there some way to mark this label's .text property

Can't Load UIViewController XIB file in Storyboard in Swift

倖福魔咒の 提交于 2019-12-17 10:41:28
问题 I've read Using XCode storyboard to instantiate view controller that uses XIB for its design but I'm having troubles making this work in Swift (Using Xcode 6 Beta 6). I'm wondering if I've done something wrong or if this functionality isn't available anymore? I created a simple repository, https://github.com/jer-k/StoryboardTesting-Swift, that showcases the above approach. I managed to solve the issue by adding and override to init required init(coder aDecoder: NSCoder) { super.init(nibName:

IOS project showing error “An internal error occurred. Editing functionality may be limited” on xcode 7.1

杀马特。学长 韩版系。学妹 提交于 2019-12-17 10:33:44
问题 I just created one new cordova ios project via CLI, and i opened that project in Xcode 7.1 and while running on simulator am getting some error on mainViewController.xib, if we clicked on that error its showing xib file and on top of that showing one warning message "An internal error occurred. Editing functionality may be limited" . So am unable to run this project. I don't know whether this is due to Xcode bug or cordova bug or any other settings issue in my Xcode. 回答1: I had this issue and

IOS project showing error “An internal error occurred. Editing functionality may be limited” on xcode 7.1

天大地大妈咪最大 提交于 2019-12-17 10:32:29
问题 I just created one new cordova ios project via CLI, and i opened that project in Xcode 7.1 and while running on simulator am getting some error on mainViewController.xib, if we clicked on that error its showing xib file and on top of that showing one warning message "An internal error occurred. Editing functionality may be limited" . So am unable to run this project. I don't know whether this is due to Xcode bug or cordova bug or any other settings issue in my Xcode. 回答1: I had this issue and

Why won't my awakeFromNib fire?

蹲街弑〆低调 提交于 2019-12-17 09:49:48
问题 I am starting to move more of my view hierarchy construction to IB. I have a nib file called "AlignmentViewController.xib" in which I set up my view hierarchy with AlignmentViewController as the files owner. This works fine. One of the methods I remain fuzzy on is awakeFromNib. In the follow code snippet of AlignmentViewController I add the single additional method awakeFromNib. However, it does NOT get called: - (void)awakeFromNib { NSLog(@"AlignmentViewController - awakeFromNib"); [super

Correct way to load a Nib for a UIView subclass

女生的网名这么多〃 提交于 2019-12-17 07:04:33
问题 I am aware this question has been asked before but the answers are contradicting and I am confused, so please don't flame me. I want to have a reusable UIView subclass throughout my app. I want to describe the interface using a nib file. Now let's say it's a loading indicator view with an activity indicator in it. I would like on some event to instantiate this view and animate in to a view controller's view. I could describe the view's interface no problem programmatically, creating the

Reuse a uiview xib in storyboard

孤街浪徒 提交于 2019-12-17 06:22:39
问题 I typically like to create and design my uiviews in interface builder. Sometimes I need to create a single view in a xib that can be reused in multiple view controllers in a storyboard. 回答1: Reuse and render a xib in a storyboard. Tested with Swift 2.2 & Xcode 7.3.1 1 ---- Create a new UIView named 'DesignableXibView' File > New > File > Source > Cocoa Touch Class > UIView 2 ---- Create a matching xib file named 'DesignableXibView' File > New > File > User Interface > View 3 ---- Set the file

Reuse a uiview xib in storyboard

依然范特西╮ 提交于 2019-12-17 06:21:38
问题 I typically like to create and design my uiviews in interface builder. Sometimes I need to create a single view in a xib that can be reused in multiple view controllers in a storyboard. 回答1: Reuse and render a xib in a storyboard. Tested with Swift 2.2 & Xcode 7.3.1 1 ---- Create a new UIView named 'DesignableXibView' File > New > File > Source > Cocoa Touch Class > UIView 2 ---- Create a matching xib file named 'DesignableXibView' File > New > File > User Interface > View 3 ---- Set the file

How can I load storyboard programmatically from class?

蹲街弑〆低调 提交于 2019-12-17 01:38:10
问题 My problem is that I was looking for way to use both storyboard and xib . But I can't find proper way to load and show storyboard programmatically. Project was started developing with xib, and now it's very hard to nest all xib files in storyboard. So I was looking a way to do it in code, like with alloc, init, push for viewControllers. In my case I have only one controller in storyboard: UITableViewController , which has static cells with some content I want to show. If anyone knows proper