Storyboard doesn't contain a view controller with identifier 'myViewController'

I have 3 view controllers on storyboard. One of them has Storyboard Id as 'myViewController'. its runs perfectly on simulator. But when I try to run it on my device it gives following error:
'Storyboard (<UIStoryboard: 0x1cd626d0>) doesn't contain a view controller with identifier 'myViewController''
Please help me out with this.

I'm not sure how "new" you are to Xcode and IB, but just double checking -- did you create the XIB file from Xcode (so that it was added to your project?). Or, if not, did you save it to your project directory somewhere and were prompted to add it to your project? If you created it new from IB it may not be part of your project yet. That's when I have seen my classes missing from the drop down menu on the Identity Inspector.
One final thing -- after setting File's Owner, I don't see from your code how you are actually loading the NIB file (xib file). You are calling plain "init" in your app delegate where you create these view Controllers. You need to call the "initWithNibName" method. It is the designated init method for view controllers that load their interface from a NIB file.
Cheers,
George
Message was edited by: gkstuart

Similar Messages

  • Complete table view controller with XML

    Hello, I'm from Brazil and am new to ios.
    Today I am making an example where I use a table view controller and fill it witharray (NSMutableArray).
    However I would do the same using XML so that now, I'm having so many difficulties to the point of not knowing where to start.
    The code I use to populate this array was.
    It is possible to use something like XML?
    #pragma mark - View lifecycle
    - (void)viewDidLoad
        [super viewDidLoad];
        // Uncomment the following line to preserve selection between presentations.
        // self.clearsSelectionOnViewWillAppear = NO;
        // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
        // self.navigationItem.rightBarButtonItem = self.editButtonItem;
        registros = [NSMutableArray arrayWithObjects:@"1", @"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12",@"13",@"14", nil];
    - (void)viewDidUnload
        [super viewDidUnload];
        // Release any retained subviews of the main view.
        // e.g. self.myOutlet = nil;
    - (void)viewWillAppear:(BOOL)animated
        [super viewWillAppear:animated];
    - (void)viewDidAppear:(BOOL)animated
        [super viewDidAppear:animated];
    - (void)viewWillDisappear:(BOOL)animated
        [super viewWillDisappear:animated];
    - (void)viewDidDisappear:(BOOL)animated
        [super viewDidDisappear:animated];
    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
        // Return YES for supported orientations
        return (interfaceOrientation == UIInterfaceOrientationPortrait);
    #pragma mark - Table view data source
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
        // Return the number of sections.
        return 1;
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
        // Return the number of rows in the section.
        return [registros count];
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
        static NSString *CellIdentifier = @"listax";//este é o identificador da celula
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        cell.textLabel.text = [registros objectAtIndex:indexPath.row];
        return cell;

    If you have a custom XML schema (not a plist), consider two approaches.
    1. Before showing your table view, use NSXMLParserto deserialize the XML document into an NSMutableArray that will be the table view data source.  Typically the array contains custom class instances; one or more class properties are used to set table cell properties in cellForRowAtIndexPath.  If you have never worked with NSXMLParser (or any other SAX parser) before, start by creating a sample app so you understand how that works.
    2. Use a 3rd-party DOM parser like GDataXML.  Load your XML document into a class property in your table view's viewDidLoad.  Then the XML document will be the table view data source since elements and attributes can be directly queried using XPath in cellForRowAtIndexPath.  If you have never worked with XML DOM and XPath before, start by creating a sample app so you understand how that works.
    If your have a lengthy complex XML document, option #1 might be more efficient because indexed array access is faster than XPath queries.  Theoretically that is why Apple's Cocoa provides DOM support on OS X but not iOS.  There are strategies to improve efficiency if necessary, including your own indexing scheme.  The best solution depends on many factors.  For example, if your XML document includes thousands of rows, but users rarely scroll past the first 10, option #1 would waste time parsing everything.
    Both of these approaches keep all data in memory, which is fast but not friendly.  Perfectly fine for reasonably sized data sets.

  • Real Model View Controller with JTextField

    Hi!
    I am new to Java (so please bear with me). I am building a swing application. I already have added a JTable with a corresponding table model that extends AbstractTableModel. Rather than store the data in the table model, I have modified setValueAt and getValueAt to write and read cell data to another location. So far, everything is fine. When doing setValueAt, I have a fireTableCellUpdated statement that I use to update the edited cell. So far, things are all still fine.
    I would like to do the same thing with a JTextField. I found an example in Core Java Volume 1 for create a class that extends PlainDocument. It uses insertString to update the document in a way that ensures that only numbers are entered. I implemented this. Everything is still fine. I changed insertString to update my remote repository (a field in another class). Everything is still fine. Next, I tried to change (override) both getText methods to read from the repository. This works, but is not reflected on the screen.
    I realize that I need the equivalent of a fireTableCellUpdated statement for the class that extends PlainDocument, but do not know how to do this.
    I have looked a lot over the internet for the model view controller implementation. I know that it can be done using event and event listeners, but this seems to defeat the purpose of the model view controller - it seems like you ought to be able to directly modify the model object to access external data.
    My code is below.
    Thanks/Phil Troy
    * PlainDocument class to make it possible to:
    * - Make sure input in unsigned integer
    * - Automatically save data to appropriate locate
    * This will hopefully eventually work by overriding the insertString and getText methods
    * and creating methods that can be overridden to get and save the numerical value
    class UnsignedIntegerDocument extends PlainDocument
         TutorSchedulerPlusSettings settings;
         JTextField textField;
         public UnsignedIntegerDocument(TutorSchedulerPlusSettings settings)
         {     super();
              this.settings = settings;
         public void setTextField(JTextField textField)
         {     this.textField = textField;
         // Overridden method
         public void insertString(int offs, String str, AttributeSet a) throws BadLocationException
         {     if (str == null) return;
              String oldString = getText(0, getLength());
              String newString = oldString.substring(0, offs) + str +oldString.substring(offs);
              try
              {     setValue(Integer.parseInt(newString));
                   super.insertString(offs, str, a);
                   fireInsertUpdate(new DefaultDocumentEvent(offs, 10, DocumentEvent.EventType.INSERT));
              catch(NumberFormatException e)
         public String getText()
         {     return String.valueOf(getValue());
         public String getText(int offset, int length) throws BadLocationException
         {     String s = String.valueOf(getValue());
              if (length > 0)
                   s = s.substring(offset, length);
              return s;
         public void getText(int offset, int length, Segment txt) throws BadLocationException
         {     //super.getText(offset, length, txt);
              char[] c = new char[10];
              String s = String.valueOf(getValue());
              s.getChars(offset, length, c, 0);
              txt = new Segment(c, 0, length);
         public String getValue()
         {     int i = settings.maxStudents;
              String s = String.valueOf(i);
              return s;          
         void setValue(int i)
         {     settings.maxStudents = i;
    }

    Hi!
    Thanks for your response. Unfortunately, based on your response, I guess that I must not have clearly communicated what I am trying to do.
    I am using both JTables and JTextFields, and would like to use them both in the same way.
    When using JTable, I extend an AbstractTableModel so that it refers to another data source (in a separate class), rather than one inside of the AbstractTableModel. Thus the getValueAt method, getColumnCount method, setValueAt method, . .. all call methods in another class. The details of that other class are irrelevant, but they could be accessing data from a database (via JDBC) or from other machines via some other communication mechanism.
    I would like to do exactly the same thing with a JTextField. I wish for the data to come from a class other than an object of type PlainDocument, or of any class that implements the Document interface. Instead, I would like to use a class that implements the Document interface to call my external class using methods similar to those found in AbstractTableModel.
    You may ask why I would like to to this. I have specific reasons here, but more generally this would be helpful when saving or retrieving parameters set and displayed in a JTextField to a database, or when sharing JTextField to multiple users located on different machines.
    As to whether this is real MVC or not, I think it is but it really doesn't matter.
    I know that I can accomplish what I want for the JTextField using listeners. However, I would like my code for the JTables to be similarly structured to that of the JTextField.
    Thanks/Phil Troy

  • Call View controller with some URL parameter

    Hi
    I have a 3rd party system which need to send some data to my CRM system.
    One approch which is being suggested is by sending data by URL parameter.
    I have made a new component for this and have provided the 3rd party with its URL .
    The issue with calling a view controller URL along with some specific URL parameters is that i am not able to access its parameters.when i call method GET_PAGE_URL from the DOINIT method of the controller it does not provide me with the parameter list .
    How can i access these URL parameters ?
    Regards
    Ajitabh

    HI,
    have a look at component CRM_UI_FRAME. In the page default.htm they extract URL parameters.
    You have got the REQUEST variable in your view controller as well.
    cheers Carsten

  • How to go from a View Controller to a View Controller

    Hey everyone, I have asked this question over on Stack Overflow, and really had no luck with it.
         I am wondering how to go from one (1) View Controller that has buttons and another View Controller that has a UIWebViewer in? I know how to do the simple part to get the two to link up. But, the buttons are going to have different URL's hooked up to them, and I want to be able to reuse the Web Viewer. I am using the Swift Programming language to be able to do this.
    below is my current code that is has my buttons sitting on top of my web viewer,
    import UIKit
    import WebKit
    class ViewController: UIViewController {   
        @IBOutlet var wbView: UIWebView!
        var strUrl = ""
            @IBAction func buttonAction(sender: UIButton) {
                switch (sender.tag){
                case 1:
                    strUrl = "https://www.google.co.in/"
                case 2:
                    strUrl = "https://in.yahoo.com/"
                case 3:
                    strUrl = "https://www.facebook.com/"
                case 4:
                    strUrl = "https://bing.com/"
                default:
                    break;
                reloadWebViewWithUrl(strUrl);
            func reloadWebViewWithUrl(strUrl: NSString){
                var url = NSURL(string: strUrl);
                var request = NSURLRequest(URL: url!);
                wbView.loadRequest(request);
            override func viewDidLoad() {
                super.viewDidLoad()
                // Do any additional setup after loading the view, typically from a nib.
            override func didReceiveMemoryWarning() {
                super.didReceiveMemoryWarning()
                // Dispose of any resources that can be recreated.
    How should I go about changing this two allow my buttons to be in their own ViewController and still be able to to the secondary View Controller with the WebViewer?
    Thank You all in advanced with the help on this!

    This is the FirstViewController Code
    import UIKit
    class FirstViewController: UIViewController {
        @IBAction func webAction(sender: UIButton) {
            let index = sender.tag
            chosenURLString = addresses[index]
            performSegueWithIdentifier("WebViewSegue", sender: self)
        override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
            if let controller = segue.destinationViewController as?
                SecondViewController {
                controller.urlString = chosenURLString
                chosenURLString = nil
        private let addresses = ["", "https://www.google.com", "https://www.facebook.com", "https://spca.org", "https://www.facebook.com/wagzpack?fref=photo"]
        private var chosenURLString: String?
    This is the SecondViewController Code
    import UIKit
    class SecondViewController: UIViewController {
        @IBOutlet var webSite: UIWebView!
        var urlString: String?
        override func viewDidLoad() {
            super.viewDidLoad()
            if let urlString = urlString {
                if let url = NSURL(string: urlString) {
                    let request = NSURLRequest(URL: url)
                    webSite.loadRequest(request)
                    println("loading \(urlString)")
                else {
                    println("badly formed URL string.")
            else {
                println("missing URL string.")

  • Af:iterator and view accessors with bind variables

    I have a page with an af:iterator where I list up each row in a form layout. On each row there are 2 SelectOneChoice items where the current value is provided by the row. The 2 LOVs are Master-Detail-LOVs. The value of the first one restricts the values of the second one.
    Each LOV is represented by a LOV view object in a shared application module. The view object for the second LOV contains a view criteria with a selection on the column where the value is provided by the first LOV. The value for the restriction is passed via Bind Variable.
    <af:iterator id="i_images" value="#{bindings.Image.collectionModel}" var="row" rows="0" varStatus="vs">
    <af:selectOneChoice value="#{row.bindings.Master.inputValue}" label="#{bindings.Master.label}" id="soc_master" autoSubmit="true">
    <f:selectItems value="#{row.bindings.Master.items}"
    id="si3"/>
    </af:selectOneChoice>
    <af:selectOneChoice value="#{row.bindings.Detail.inputValue}" label="#{bindings.Detail.label}" id="soc2" partialTriggers="soc_master">
    <f:selectItems value="#{row.bindings.Detail.items}"
    id="si2"/>
    </af:selectOneChoice>
    The view accessor for both LOVs have the settings:
    Row Level Bind Values = true
    SharedInstance = false
    BTW: If I modify one the two view accessor the value for Row Level Bind Values disappear.
    The value for the bind variable on the view accessor is "Master" like the name of the column.
    On loading the page for the first time the LOVs and the values are properly resolved. The master LOV provides the list with all values and the Detail LOV is restricted corresponding the value of the Master LOV. Upon changing the value of the Master LOV the Detail LOV is reloaded, because of the partial trigger, but now the Detail LOV contains all the values as if now View Criteria has been provided.
    We implemented this scenario in an af:query and it worked fine. Are there any restrictions for View Accessors when using an af:iterator??
    Any help is appreciated.
    Thanks,
    Thomas
    P.S.: We're using JDeveloper 11.1.1.4.0
    Edited by: thomas.matzke on Apr 20, 2011 10:07 PM

    Hi Thomas,
    You may be hitting an error that is discussed in the following blog: http://andrejusb.blogspot.com/2011/03/adf-bc-dependent-lov-11g-ps2ps3-bug-and.html
    Hope this helps!
    Russell

  • Problem displaying modal view controller.

    I have created a view controller with view in IB, and am trying to display it as a modal view. But when I press the button all I get is a blank screen. If I look at the view object within the new view controller, I can see it has loaded the subviews, but nothing is shown. I created a test project, so I could figure out what I am doing wrong, but here is the code I have to display:
    ModalView *newView = [[ModalView alloc] initWithNibName:@"ModalView" bundle:nil];
    SubViewNewAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
    [[delegate viewController] presentModalViewController:newView animated:YES];
    ModalView is a generic UIViewController created by Xcode.
    And the xib looks like:
    File's Owner (Class set to ModalView, Outlet view to View)
    First Responder (Blank)
    ViewController (Class set to ModalView, Outlet view to View)
    -View
    --Label

    Hi Maksim
              Info sent to me was very useful.
    I have performed the steps which u have sent in the link,but I didn't get the desired result.
    when I hit the "Exit" button for the first time nothing happens but when agained clicked,It gave me a error saying that "Your Application is Expired :errCode,500"
    Pl tell me wht could be the problem
    Thanks a lot
    sethu

  • Issue with pulling down one view controller and posting another one

    I have a situation where I need to post a modal view when another one is closed by the user.
    Say i have a EULA a user must accept before continuing and once the EULA is accepted I want to show a Splash screen which is another View controller.
    So essentially when the user accepts the EULA, the EULAViewController calls its delegate's eulaAccepted method. In this case the delegate is a view controller inherited from UIViewController object.
    - (void) eulaAccepted {
    // Dismiss the EULA controller first
    [self dismissModalViewController animated:YES];
    // Now show the splash screen to the user
    SplashController *splash = [[SplashController alloc] init];
    [self presentModalViewController:splash animated:YES];
    [splash release];
    When I do this, the code sort of goes into recursive loop with lot of the following in the stack:
    UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:
    If I present the splashController in another method which I invoke after a certain delay then it works fine. But the timing is again an issue since it works on some devices and not on others. So I do not like that solution.
    What is the best practice to handle such situations? I was under the impression that the OS would sequence these animations and perform one after the other and I would not have to worry about them but doesn't look like it works that way.
    Would greatly appreciate your inputs.
    TIA,
    -TRS

    Here is what I did. I overrode the presentModalViewController:animated: and then if a controller is already posted, I start a thread which waits for the old one to be pulled down before the new one is posted.
    There could still be a problem here if postModalViewController is called before another one has been posted since then self.modalViewController will still be nil. But the UIViewController can deal with it. My current issue is posting one when another is being pulled down, not posting 2 views at the same time
    This works but I still would like to know if there is a better way to handle such situations.
    -TRS
    // Invoke the super with animation set to YES
    - (void) presentModalViewControllerWithAnimation:(UIViewController *) vc {
    [super presentModalViewController:vc animated:YES];
    // This method should be invoked in its own thread
    // If there is a modal controller already posted then wait for it to be pulled down before posting this one
    - (void) checkAndPresentModalViewControllerWithAnimation:(UIViewController *) vc {
    while (self.modalViewController != nil) {
    [NSThread sleepForTimeInterval:0.1];
    [self performSelectorOnMainThread:@selector(presentModalViewControllerWithAnimation:) withObject:vc waitUntilDone:NO];
    // Invoke the super with animation set to NO
    - (void) presentModalViewController:(UIViewController *) vc {
    [super presentModalViewController:vc animated:NO];
    // This method should be invoked in its own thread
    // If there is a modal controller already posted then wait for it to be pulled down before posting this one
    - (void) checkAndPresentModalViewController:(UIViewController *) vc {
    while (self.modalViewController != nil) {
    [NSThread sleepForTimeInterval:0.1];
    [self performSelectorOnMainThread:@selector(presentModalViewController:) withObject:vc waitUntilDone:NO];
    // Override the UIViewController method
    // If no modal controller is yet posted then directly invoke the super's presentModalViewController:animated:
    // If one is already posted then start a worker thread to wait for it to be pulled down before posting the new one
    - (void) presentModalViewController:(UIViewController *) vc animated:(BOOL)animated {
    if (self.modalViewController == nil) {
    [super presentModalViewController:vc animated:animated];
    } else {
    if (animated) {
    [NSThread detachNewThreadSelector:@selector(checkAndPresentModalViewControllerWithAnimation:) toTarget:self withObject:vc];
    } else {
    [NSThread detachNewThreadSelector:@selector(checkAndPresentModalViewController:) toTarget:self withObject:vc];

  • Update methode in model-view-controller-pattern doesn't work!

    I'm writing a program in Java which contains several classes. It must be possible to produce an array random which contains Human-objects and the Humans all have a date. In the program it must be possible to set the length of the array (the number of humans to be produced) and the age of the humans. In Dutch you can see this where is written: Aantal mensen (amount of humans) and 'Maximum leeftijd' (Maximum age). Here you can find an image of the graphical user interface: http://1.bp.blogspot.com/_-b63cYMGvdM/SUb2Y62xRWI/AAAAAAAAB1A/05RLjfzUMXI/s1600-h/straightselectiondemo.JPG
    The problem I get is that use the model-view-controller-pattern. So I have a model which contains several methodes and this is written in a class which inherits form Observable. One methode is observed and this method is called 'produceerRandomArray()' (This means: produce random array). This method contains the following code:
    public void produceerMensArray() throws NegativeValueException{
         this.modelmens = Mens.getRandomMensen(this.getAantalMensen(), this.getOuderdom());
    for (int i = 0; i < this.modelmens.length; i++) {
              System.out.println(this.modelmens.toString());
    this.setChanged();
    this.notifyObservers();
    Notice the methods setChanged() and notifyObservers. In the MVC-patterns, these methods are used because they keep an eye on what's happening in this class. If this method is called, the Observers will notice it.
    So I have a button with the text 'Genereer' as you can see on the image. If you click on the button it should generate at random an array. I wrote a controller with the following code:
    package kristofvanhooymissen.sorteren;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    /**Klasse GenereerListener.
    * @author Kristof Van Hooymissen
    public class GenereerController implements ActionListener {
         protected StraightSelectionModel model;
         /**Constructor.
         *@param model Een instantie van het model wordt aan de constructor meegegeven.
         public GenereerController(StraightSelectionModel model) {
              this.model = model;
         /**Methode uit de interface ActionListener.
         * Bevat code om de toepassing te sluiten.
         public void actionPerformed(ActionEvent arg0) {
         this.model=new StraightSelectionModel();
         try{
         this.model.produceerMensArray();
         } catch (NegativeValueException e){
              System.out.println("U gaf een negatieve waarde in!");
         this.model.setAantalMensen((Integer)NumberSpinnerPanel.mensen.getValue());
         this.model.setOuderdom((Integer)NumberSpinnerPanel.leeftijd.getValue());
    StraighSelectionModel is of course my model class. Nevermind the methods setAantalMensen and setOuderdom. They are used to set the length of the array of human-objects and their age.
    Okay. If I click the button my observers will notice it because of the setChanged and notifyObservers-methods. An update-methode in a class which implements Observer.
    This method contains the follow code:
    public void update(Observable arg0,Object arg1){
              System.out.println("Update-methode");
              Mens[] temp=this.model.getMensArray();
              for (int i = 0; i < temp.length; i++) {
                   OnbehandeldeLijst.setTextArea(temp[i].toString()+"\n");
    This method should get the method out of the model-class, because the produceerRandomArray()-methode which has been called by clicking on the button will save the produce array in the model-class. The method getMensArray will put it back here in the object named temp which is an array of Mens-objects (Human-objects). Then aftwards the array should be put in the textarea of the unsorted list as you could see left on the screen on the image.
    Notice that in the beginning of this method there is a System.out.println-command to print to the screen as a test that the update-method has been called.
    The problem is that this update method won't work. My Observable class should notice that something happened with the setChanged() and notifyObservers()-methods, and after this the update class in the classes which implement Observer should me executed. But nothing happenens. My controllers works, the method in the model (produceerRandomArray() -- produce random array) has been executed, but my update-method won't work.
    Does anyone has an explanation for this? I have to get this done for my exam an the 5th of january, so everything that could help me would be nice.
    Thanks a lot,
    Kristo

    This was driving me nuts, I put in a larger SSD today going from a 120GB to a 240GB and blew away my Windows Partition to make the process easier to expand OS X, etc.  After installing windows again the only thing in device manager that wouldn't load was the Bluetooh USB Host Controller.  Tried every package in Bootcamp for version 4.0.4033 and 5.0.5033 and no luck.
    Finally came across this site:
    http://ron.dotsch.org/2011/11/how-to-get-bluetooth-to-work-in-parallels-windows- 7-64-bit-and-os-x-10-7-lion/
    1) Basically Right click the Device in Device manager, Go to Properties, Select Details tab, Choose Hardware ids from Property Drop down.   Copy the shortest Value, his was USB\VID_05AC&PID_8218 
    2) Find your bootcamp drivers and under bootcamp/drivers/apple/x64 copy AppleBluetoothInstaller64 to a folder on your desktop and unzip it.  I use winrar to Extract to the same folder.
    3) Find the files that got extracted/unzipped and open the file with notepad called AppleBT64.inf
    4) Look for the following lines:
    ; for Windows 7 only
    [Apple.NTamd64.6.1]
    ; No action
    ; OS will load in-box driver.
    Get rid of the last two lines the following:
    ; No action
    ; OS will load in-box driver.
    And add this line, paste your numbers in you got earlier for USB\VID_05ac&PID_8218:
    Apple Built-in Bluetooth=AppleBt, USB\VID_05ac&PID_8218
    So in the end it should look like the following:
    ; for Windows 7 only
    [Apple.NTamd64.6.1]
    Apple Built-in Bluetooth=AppleBt, USB\VID_05ac&PID_8218
    5) Save the changes
    6) Select Update the driver for the Bluetooth device in device manager and point it to the folder with the extracted/unzipped files and it should install the Bluetooth drivers then.
    Updated:
    Just found this link as well that does the same thing:
    http://kb.parallels.com/en/113274

  • When I update apple driver, a pop-up error message "The folder you specified doesn't contain a compatible driver for your device. If the foldre contains a driver, make sure it is designed to work with Windows for x64-based systems."

    When I update apple driver, a pop-up error message "The folder you specified doesn't contain a compatible driver for your device. If the foldre contains a driver, make sure it is designed to work with Windows for x64-based systems."

    Hi,
    Please also check Event Viewer if it identify this problem.
    In addition, also check Device Manager, if similar driver already installed, try to uninstall them and reinstall new driver again for test.
    Roger Lu
    TechNet Community Support

  • Call method with an argument from another view controller

    I have a UIViewController MainViewController that brings up a modal view that is of the class AddPlayerViewController. When the user clicks 'Save' in the modal view I need to pass the Player data (which is a Player class) from the modal view to the MainViewController in addition to triggering a method in the MainViewController. What's the best way to accomplish this? I'm new to cocoa and have only tried using delegates and some ugly hacks to no avail.
    Thanks for the help.

    If I understand correctly, you have:
    1. A model object, Player.
    2. A top view controller, MainViewController.
    3. Another view controller, AddPlayerViewController, which MainViewController displays modally.
    I'm guessing that AddPlayerViewController creates a new Player object and lets the user set its values, and you need a way to get that new Player into MainViewController once they're done.
    So, here's what I'd do:
    1. Create an AddPlayerViewControllerDelegate protocol. It should declare two methods, "- (void)addPlayerViewController:(AddPlayerViewContrller*)controller didAddPlayer:(Player*)newPlayer" and "- (void)addPlayerViewControllerNotAddingPlayer:(AddPlayerViewController*)controll er".
    2. Add an attribute of type "id <AddPlayerViewControllerDelegate>" called delegate to AddPlayerViewController. Also add a property with "@property (assign)" and "@synthesize".
    3. Modify AddPlayerViewController so that if you click the "Save" button, addPlayerViewController:didAddPlayer: gets called, passing "self" and the new Player object as the two arguments. Also arrange for clicking the "Cancel" button to call addPlayerViewControllerNotAddingPlayer:.
    4. Modify MainViewController to declare that it conforms to AddPlayerViewControllerDelegate. Implement those two methods (addPlayerViewControllerNotAddingPlayer: might be an empty method if you don't want to do anything).
    5. When you create your AddPlayerViewController, set its delegate to your MainViewController.
    If you need more detail, let me know what parts you need me to elaborate on.

  • This disk doesn't contain an EFI system partition. If you want to start up your computer with this disk or include it in a RAID set, back up your data and partition this disk.

    As stated above. I get this when I try to resize my HD. Was having issues with BootCamp so I removed it and got this.
    This disk doesn’t contain an EFI system partition. If you want to start up your computer with this disk or include it in a RAID set, back up your data and partition this disk.

    the same problem...
    any help?

  • Smart Collection bug with Title doesn't contain rule

    Hi,
    There are various articles on smart collections that check if the "Title" field is filled or not. Because the "Title" field doesn't have an "is empty" like function, the sugested solution is to use the rule:
      Title   doesn't contain   a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
    But there is a bug in this rule. I found that the letter 't' is causing a problem. The letter 't' seems to include all characters.
    Situation:
    Four images that have a their Title field as follows:
      Image 1:
      Image 2: 2014-01 - Street Photography.dng
      Image 3: 2014-01
      Image 4: Some Image
    (Image 1 has an empty title)
    Four smart collections with the following rules:
      Collection 1: Title   doesn't contain   a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z
      Collection 2: Title   doesn't contain   0,1,2,3,4,5,6,7,8,9
      Collection 3: Title   doesn't contain   a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,u,v,w,x,y,z
      Collection 4: Title   doesn't contain   t
    My expected result of the smart collections is:
      Collection 1: Image 1 and Image 3
      Collection 2: Image 1 and Image 4
      Collection 3: Image 1 and Image 3
      Collection 4: Image 1, Image 3 and Image 4
    The actual result of the smart collections is:
      Collection 1: Image 1
      Collection 2: Image 1 and Image 4
      Collection 3: Image 1 and Image 3
      Collection 4: Image 1
    I'm using Lightroom 5.7 on a MacBook Pro 17" (mid 2010), i7 @ 2.66GHz, 8GB RAM and 2 x 240GB SSD's running on OS X 10.10.1
    My questions are:
    Can anyone, specially from the Adobe Lightroom team, confirm this?
    How to solve this issue?
    With kind regards,
    Dennis
    www.idemi.nl

    That is a bizarre bug.  There is an even simpler way to reproduce the problem: Have two pics, one with title "a" and the other with title "t".  The criterion "Title Contains a" correctly shows just the first picture, but the criterion "Title Contains t" shows both.
    Searching with smart collections and filters has numerous bugs, but this one is by far the most surprising.  As a geek programmer, I'd love to know what causes this!
    Adobe rarely reads this forum -- I suggest you post this in the official Adobe feedback forum, which Adobe does faithfully read (but only infrequently responds).

  • Problems with smart collection "doesn't contain"

    I have photos with keywords like
    xxxxx, grand canyon,xxxxx
    xxxxx, grand island, xxxxx
    xxxxx, grand sable dunes, xxxxx
    What I need is the abilty creat a smart collection that excludes grand canyon, but leaves in grand island, grand sable dunes
    I can't get doesn't contain to work with
    grand canyon
    "grand canyon"
    Any ideas?

    Tudor asks, "What I need is the ability to create a smart collection that excludes grand canyon, but leaves in grand island, grand sable dunes".   Tudor wants to exclude "grand canyon", but include "grand island", "grand sable dunes", "red rock canyon", and presumably every other keyword except "grand canyon".
    BKKDon's suggestion of
    Match all: Keywords contains grand; Keywords doesn't contain canyon
    doesn't quite work, because it excludes "red rock canyon".   A somewhat better query might be:
    Match none: Keywords contains words grand canyon
    The "contains words grand canyon" will match all images with the words "grand" and "canyon" in the keywords, and "Match none" inverts that and selects all other images.  
    But this still isn't right, because it will exclude an image having the two keywords, "Grand Island" and "Canyon Drive".  As Rob explained, the Keywords criterion splits all the keywords up into "words", and then treats all the words in all the image's keywords as a single field to be searched.
    Two possible workarounds:
    - If you just want to manually exclude images with the keyword "grand canyon", use this recipe: 
    In the Keyword List pane on the right, click the arrow to the right of the keyword "grand canyon".  This will filter just those images with exactly "grand canyon". 
    Select all the images.
    Turn off the filter by clicking None in the Library Filter bar.
    Do Edit > Invert Selection to select all the images that don't have exactly "grand canyon".
    Add the selected images to the Quick Collection or another collection, if necessary.
    - Use the plugins Space Urchin or Any Filter, as Rob suggested.
    In general, LR's text-matching operators are a mess.  Inexplicably, LR doesn't have exact match, the most basic keyword operator, and without exact match, it's difficult to work with a controlled vocabulary of keywords, as this discussion and many others have highlighted.  Users repeatedly get all twisted up trying to understand how to use LR's weird text-match operators.

  • Has anyone been able to combine OpenGL ES with another View controller?

    Looking at all the sample code, I still can't find any example of combining OpenGL ES with another View controller. So that one could have a view that the user could input values, and another that draws OpenGL ES stuff in. Is this possible, or does one have to draw the UI stuff OpenGL? I haven't downloaded any iPhone Apps store stuff that uses any OpenGL drawing.
    Thanks for any suggestions....

    I have been able to add a second UIView to the app's window. And I set the bg color for the view to be transparent and I use the view for drawing quartz objects over the opengles scene. It's a little Heads Up UI that is not too hard to deal with. And it can blend better as an iphone app.
    You could easily add views and force them in size to be side by side, or top/bottom, whatever works.
    Have fun,
    ceder

Maybe you are looking for

  • HELP No Audio Device Installed on HP dv4-145dx running Windows Vista Home Premium Service Pack 2

    I recently completed a Windows update and now my audio device is not functioning at all.  I am being told that NO AUDIO OUTPUT DEVICE IS INSTALLED. I have tried to use the Update Driver function and keep receiving the message " WINDOWS FOUND DRIVER S

  • About initial value in the dropdown

    I am using codes below to add two options. The problem is that, i didn't choose any option and value in dropdown is also empty on the screen. However, the value of the corresponding variable of the dropdown will be defaulted to '1'. in my opition, th

  • Actobat 9 Execute Menu Item problem

    I have a new PC with Window 7 and have successfully loaded Acrobat 9 pro - but a lot of the Acrobat functionality is now missing (it all worked under the XP platform). For example, when creating a form, using a buttom with an 'Execute menu item' comm

  • Ipod wont charge in ihome

    I just got the ihome for my 30gb ipod and it wont charge while it is the ihome.HEEEEELLLLLLLLLPPPPPPPP

  • I have version 3.6.22 and it is not loading...shows "not responding"

    It started Friday afternoon. I have never had this problem before, and I installed originally on 2/15/09. I have not updated to the current version because I do not feel there is the same flexibility offered regarding available add-ons. Please help!!