uistoryboard

Programmatically set the initial view controller using Storyboards

混江龙づ霸主 提交于 2019-12-14 04:22:55
问题 How do I programmatically set the InitialViewController for a Storyboard? I want to open my storyboard to a different view depending on some condition which may vary from launch to launch. 回答1: How to without a dummy initial view controller Ensure all initial view controllers have a Storyboard ID. In the storyboard, uncheck the "Is initial View Controller" attribute from the first view controller. If you run your app at this point you'll read: Failed to instantiate the default view controller

Crash when pushing cell to DetailView when it's a UISCrollView using XCode 4

情到浓时终转凉″ 提交于 2019-12-14 03:19:43
问题 I use this code to move to DetailView from TableView: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:TRUE]; if(indexPath.row==0) { //Initialize the detail view controller and display it. Detail1ViewController *firstDetailController = [[Detail1ViewController alloc] initWithNibName:@"Detail1ViewController" bundle:nil]; [self.navigationController pushViewController:firstDetailController animated

iOS Swift 2.0 UITextView freezes app depending on text

不想你离开。 提交于 2019-12-14 01:56:57
问题 I'm experiencing a weird issue with my Swift 2.0 app. I have a (editable) UITextView defined in my storyboard. If I leave the text property empty in the storyboard everything is working as expected. But when I enter the text Kaasje (in the storyboard and recompiling), the app freezes when loading the nib (navigating through segue) and the CPU jumps to 100% (the app remains stuck). The app will never reach viewDidLoad at this point. It makes no difference when changing between fonts or

How do I present a custom view only along the right? [closed]

最后都变了- 提交于 2019-12-13 22:07:40
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I want to present my view as a column on the right side of the screen. This app will be iPad only. 回答1: One way to do this would be to create a view controller that way; drag out a new view controller from the asset library into your storyboard, set the background color to black

How to perform segue inside unwind function

本秂侑毒 提交于 2019-12-13 19:13:52
问题 I have 3 MVCs and name them A, B, C here. A is the main MVC with a button "Menu" connected to B with popover segue. A also connected to C with a manual show segue. B is a popover MVC with a button "Detail" connected to A with unwind segue. C is the detail MVC with detail info. Inside the unwind function of A. I call performSegueWithIdentifier to show C. Expected behavior is Click "Detail" button in B B disappear and A show up C show up But running the app I got. Click "Detail" button in B B

How to create a fixed navigation bar iOS Swift

放肆的年华 提交于 2019-12-13 18:43:43
问题 I want to create a fixed header that doesn't scroll with tableViewCells, or other content that I have. The header should stay in place fixed , just like in most iOS apps. Here is the image of the issue I'm facing: I tried embedding it in a NavigationController & a TabViewController. That didn't work. I also tried adding a scroll-view. I referred to this link but it's outdated and didn't help: how iphone facebook app make the navigation bar fixed Thanks. 回答1: I'd really recommend fooling

Proper way to implement a footer in UITableView

 ̄綄美尐妖づ 提交于 2019-12-13 18:19:54
问题 So I read here that I can simply drag a UITableViewCell to the bottom of my UITableViewController in storyboard and have it act like a footer. This footer row has an activity indicator in it that's it. It's width is 320 and height 55 with the indicator centered in the row. Note that it's a UIView rather than a UITableViewCell because I can only get it to work with the former. First , The UITableView doesn't stop at the footer. One can see the footer if he extends his scrolling beyond the

Loading External Bundle Files allowed?

帅比萌擦擦* 提交于 2019-12-13 18:11:46
问题 We are trying to load external NSBundle files remotely using a technique similar to below loading NSBundle files on iOS Does anyone know whether apple allow you to do this? I assume as long as you don't change the functionality it is allowed? Thanks for all your help 回答1: You should ask Apple to be sure, but probably no. The bundle can contain image / data resources but also code, and there is a restriction guideline against running code that wasn't in the app when it was reviewed. If you're

How to manage tab bar item in running app in ios

↘锁芯ラ 提交于 2019-12-13 16:17:14
问题 I have created a storyboard with UITabbarController as initial rootViewController and added 6 items in tab bar Till here it is fine. now i need to manage tab bar items on following conditions : if user not logged in - remove 6th item if user logged in - remove 5th item I am able remove tab item in didFinishLaunchingWithOptions in AppDelegate by following code - (BOOL)application : (UIApplication *)application didFinishLaunchingWithOptions : (NSDictionary *)launchOptions { NSString

Adding navigationItem.titleView in storyboard is failing

为君一笑 提交于 2019-12-13 12:02:21
问题 I can add a titleView to my navigationItem very easily in code: UIImageView *navImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nav_logo"]]; UIView *titleView = [[UIView alloc] initWithFrame:navImageView.frame]; [titleView addSubview:navImageView]; self.navigationItem.titleView = titleView; However, I'm trying to do this within my storyboard, and am failing miserably. Here's what I've done: Drag and drop a UIView on top of my VC's Navigation Item. Drag and drop a