segue

iOS How to control the UIContainer View show and disappear?

纵饮孤独 提交于 2019-12-24 12:42:57
问题 I had a UIViewController and a UIContainer View. I want to simulate the UIAlertView effect, But I don't know how to build the Container View show and hide about the great method. I had put the UITableView in my UIContainer View, I use delegate to send selected item to the UIViewController ( ParentViewController ) and show in the label.( segue name with alertSegue ) There have a show button in the ParentViewController ,and I need click the selected item ,it will close(hide/dismiss?) the

UICollectionView and push to detailViewController using Parse

断了今生、忘了曾经 提交于 2019-12-24 11:44:50
问题 I use the tapGesture method to pouch the image from UICollectionView to detailViewController viewController.h as follows: #import <Parse/Parse.h> @interface CardsViewController : UIViewController <UICollectionViewDelegateFlowLayout> { NSMutableArray *allImages; NSArray *cardFileArray; } @property (weak, nonatomic) IBOutlet UICollectionView *imageCollection and viewController.m as the follow - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { return 1; } -

shouldPerformSegueWithIdentifier called before checking other method issue

限于喜欢 提交于 2019-12-24 10:49:41
问题 I'm trying to make a segue but I've a small issue which is that I'm clicking on a button and if the boolean is YES it will return YES in segue else return NO but everytime I have to click twice to check the textfield because it is passing first to shouldPerformSegueWithIdentifier while it should check the IBAction first. Please how I can I fix this issue? - (IBAction)search:(id)sender{ if ([_txtfld.text isEqual:@"test"]) { push = YES; //Bolean } else { push = NO; //Bolean } } - (BOOL

Perform action when segue is closed

时光总嘲笑我的痴心妄想 提交于 2019-12-24 09:38:57
问题 I have a ViewController where I call segue to another ViewController: override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == blogSegueIdentifier { let destination = segue.destination as! Reply let path = tableView.indexPathForSelectedRow let cell = tableView.cellForRow(at: path!) as! QuestionsTabCell destination.blogName = String(cell.labelQues!.tag) } } In the opened segue (ViewController) there is a UITextView and a send button in the UINavigationBar. So

The program duplicate the list on the tableview if I go back from secondviewcontroller

为君一笑 提交于 2019-12-24 07:59:12
问题 I have a viewcontroller with a tableview and with a list of places. If I touch a place from the list, I go to the SecondViewController scene to see more information about the place. But when I go back with the back button, the program duplicate my original list, so the places are two times on the list, then three times, four times... Every time if I go to the SecondViewController and then go back. Here is my ViewController: import UIKit var nev: [String] = [] var cim: [String] = [] var ar:

xcode, reloading table view on exiting seque

匆匆过客 提交于 2019-12-24 07:55:18
问题 I'm trying to reload the values of a table view after exiting from a seque. The process being: I perform the seque manually from the profile selection view, add a new profile name, return to the profile selection view. Then I would like to reload the table view adding the new profile name. It is running the code fine (same code as original entry into the scene), but I can't seem to get the native methods of numberOfRowsInSection and numberOfRowsInSection to repopulate the table view. I

segue from landscape only to portrait only

廉价感情. 提交于 2019-12-24 02:01:51
问题 I have two "pages" in my app. one which should rotate between the 2 landscape modes but not allow portrait mode and the other which should rotate between the 2 portrait modes but not allow landscape mode. How can one set this up so that the orientations are limited correctly when segueing between the two views? 回答1: I will write my own segue if I were you and set the orientation of the destination view in the perform method of your custom UIStoryboardSegue and will also set the orientation i

segue from landscape only to portrait only

守給你的承諾、 提交于 2019-12-24 02:01:11
问题 I have two "pages" in my app. one which should rotate between the 2 landscape modes but not allow portrait mode and the other which should rotate between the 2 portrait modes but not allow landscape mode. How can one set this up so that the orientations are limited correctly when segueing between the two views? 回答1: I will write my own segue if I were you and set the orientation of the destination view in the perform method of your custom UIStoryboardSegue and will also set the orientation i

Why is my segue causing an “unrecognized selector sent to instance” NSInvalidArgumentException?

限于喜欢 提交于 2019-12-23 20:56:03
问题 Trying to move from my first ViewController to my second ViewController (both using same storyboard), using a segue. My first ViewController has two buttons, one that says "Male", one that says "Female" (I know, not everyone associates with one of these two), and I want either, once clicked, to move to the second ViewController. I drag/dropped the button into my code to get the following: @IBAction func femaleButton(_ sender: AnyObject) { Globals.onboardingList.append("girl") print("it's a

App freezes when segue performed from button

岁酱吖の 提交于 2019-12-23 20:03:11
问题 I have a button in my storyboard that presents a view controller with a modal segue. Every time this button is pressed, the app freezes (There is no crash and no error message). prepareForSegue is called and all the view controllers that should be there are there in code in prepareForSegue , but they don't appear onscreen. I can modal segue from the same button to another view controller just fine. Any ideas on why this is happening or how to fix it? Things I have tried: Deleting button or