uistoryboardsegue

PrepareforSegue not displaying destinationviewcontroller

天大地大妈咪最大 提交于 2019-12-11 20:01:16
问题 Segue destinationviewcontroller pdfviewcontroller not displaying pageviewcontroller - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([[segue identifier] isEqualToString:@"MYSegue"]) { // Get destination view PDFViewController *pdfviewController = [segue destinationViewController]; NSString *path = [[NSBundle mainBundle] pathForResource:@"paper" ofType:@"pdf"]; PageViewController *page = [[PageViewController alloc] initWithPDFAtPath:path]; pdfviewController= page; } }

When I click the back button my view changes from landscape to portrait

江枫思渺然 提交于 2019-12-11 19:34:49
问题 I am using storyboard and have my app set to be only horizontal left and right. I have a view controller where I click to go to my next view and do whatever, and when I am done I click the back button. What happens is when I click the back button the horizontal view switches to portrait and messes my whole app up. I have my segues set as push, but I did have them at modal. Then it goes to my next screen When I click back, it for some reason switches to portrait and looks like this: I have no

Back button is not showing in navigation bar?

烈酒焚心 提交于 2019-12-11 18:49:43
问题 I,m building an article read app for iPad and using split view controller. Master view contains menu list and detail view controller contains list of article. Clicking on list of articles it opens in a new view and i’m using a segue and navigation controller to connect detail view controller and Next view in which article opens. Segue with Modal style.I’m facing a problem there is no back button when article opens in a next view. 回答1: The article view is being presented modally, so there is

Swift 4 func prepare(for segue: UIStoryboardSegue, sender: Any?) not updating Int variable with indexPath.row

半世苍凉 提交于 2019-12-11 17:49:46
问题 all! I'm trying to combine previous lessons with the Audio Player, but I'm running into an issue. I have a variable activeSong which is equal to indexPath.row using the method func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) . What happens is that when I print indexPath.row its value is different form activeSong. Any idea why this might be happening. I think I'm doing something wrong with the func prepare(for segue: UIStoryboardSegue, sender: Any?) method. Thanks!

Where is UINavigationItem disappearing to when refactoring views to storyboard?

若如初见. 提交于 2019-12-11 16:35:51
问题 I'm rewriting an Obj-C project using Swift 4 / Xcode 9.2 I have a large storyboard that I am breaking down into multiple storyboards. I did this previously without any issues. If I refactored a few views to their own storyboard then the views took the navigation item with them. now they disappear... [ My questions are ... Is this an Xcode bug? or a new feature? Obviously you can work around this as I have shown in the pictures but is there a way to stop the vanishing from happening? 回答1: This

Transition to UITabBarController

不打扰是莪最后的温柔 提交于 2019-12-11 14:32:25
问题 I need help with bug fix. I'm use segue to transit between ViewControllers. I have UITabBarController with one UIViewController . When I click on button in my vc I move to second vc. My second vc doesn't have TabBar. (use segue). In my second vc I have button and UIAlertController . When I click on button or alert I must transit to first vc with TabBar, but my TabBar doesn't displayed. How to fix this ? I don't need to use NavigationController . let alert = UIAlertController(title:

Receiver () has no segue with identifier 'secondViewControllerSegue`

自闭症网瘾萝莉.ら 提交于 2019-12-11 11:24:25
问题 I have a custom tableview cell in xib file. I am using this custom cell in my FirstViewController. I want to show SecondViewController on didSelectRowAtIndexPath of first viewController. And I am performing segue in didSelectRowAtIndexPath like -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self performSegueWithIdentifier:@"secondViewControllerSegue" sender:indexPath]; } I am getting error saying - 'Receiver () has no segue with identifier

Attempting to load the view of a view controller while it is deallocating. CoreSpotlight

梦想的初衷 提交于 2019-12-11 10:25:46
问题 I integrate CoreSpotlight in my app. I want that user will find need information in spotlight search and after user will open this information in spotlight information opens in DetailViewController . I made it, spotlight works nice, but when application is opening I see this error Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (UIAlertController: 0x1245a0560) although I don't use UIAlertController . I made in

Use destinationViewController button in a custom segue

南楼画角 提交于 2019-12-11 06:44:10
问题 My goal is to make a custom segue with a custom animation as follows: I want the segue to cover a button from the sourceViewController with a button from the destinationViewController with an effect similar to the navigation controller's push effect, i.e. the new button is supposed to push the old button away from right to left. I have been able to make the old button (from the sourceViewController) move away as desired: [UIView animateWithDuration:1.0 animations:^{ // set the target frame

PerfomSegue's in UITableViewCell Class

寵の児 提交于 2019-12-11 05:56:33
问题 I have TableView and inside TableViewCell I have added UICollectionView . Now when user taps on any UICollectionView , I want to pass the data to next viewController but unfortunately I cannot use perform segue inside UITableViewCell class where I have didselect item. Is there any way to perform segue over here ? Whole Code class UserLibraryViewController: UIViewController { extension UserLibraryViewController : UITableViewDelegate { } extension UserLibraryViewController :