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

Similar Messages

  • Problems displaying CR Viewer when using VS2010

    When I try to display a form containing reference to a CR Viewer I get the following error message:
    *An error occurred creating the form. See Exception.InnerException for details.  The error is: The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw an exception.*
    Other info: Win7 Pro 64 is operating system.  Installed Beta 2 of CR last August and was able to upgrade old CR (Ver 8.5) reports and to display reports albeit by a rather convoluted process.  I created a seperate form for each report, added the viewer, showed the form which then displayed the report.  To display form showing report  the code line = "frm_cr_rpt01.show"
    RECENTLY installed CR13 and this is when the problems started.  I can no longer call up the previously running 'report' forms as I get the same error as above.  I have tried adding the CR viewer directly to the 'calling' form and displaying the report with code line= "me.cr_rpt01.printreport" (similar to the process used in VB6) and get the same error.
    I can open the CRreport.rpt in solution explorer and data and all report formatting displays just fine.
    Suggestions anyone?

    Moved to .NET SDK forum
    Make sure all your references are version 13 now, clean up your app.config file. Search this forum on how to "clean up" your PC if it's the same as the beta PC and then reinstall.
    Make sure you are using the 4.0 frame and not the client version.
    Thank you
    Don

  • [iPhone] Can I display two modal view controllers after each other?

    Hi,
    This is for BETA 7.
    Here is a simplified version of my problem.
    In my application root view controller , the user presses a 'Start Wizard' button and they get modal view controller A presented which contains a 'Step 1 Complete' button. When that 'Step 1 Complete' button is pressed , ModalVC A dismisses itself and delegates an "I'm done" event to the root view controller , which presents another ModalVC B to the user with a 'Step 2 complete'. So basically imagine a Wizard of Modal View Controllers. Try to make one, it doesn't work.
    The problem is that MODALVC B doesn't get displayed. It almost seems that when ModalVC A dismisses itself from the parent , this does not go in effect until the main thread goes back into its message loop for a redraw or something and it ignores the subsequent 'PresentModalViewController : nextcontroller' call.
    The only way to make it work is to have 2 buttons ('Do Step 1' and 'Do Step 2') is the root view controller and have the user press them individually. Of course that's not what I want.
    Message was edited by: Maxm007

    Yes , most of my application uses the navigation bar. The problem is that the two modal views involved are are used separately throughout the application quite frequently. In this specific case I want to reuse them , but consecutively.
    If I do choose to go for a navigation bar for this case , then I'd need to have two versions of these two views , one without and one with my custom toolbar , wouldn't I?
    I'll definitely try the queued posting. Do I use NSNotification center or is there another way to asynchronously post an event?

  • Saving View Controller state

    Hey,
    I'm trying to save state in my application. So far I can successfully save the 'backend' of what the user has changed but not committed to the database via NSCoding and storing the resulting NSData object as a User Default.
    The problem I am having is in restoring the UIViewControllers. My setup consists of a main view controller (loaded when the application starts) and then it can display one of two modal view controllers:
    ...........................MyAppDelegate..............................
    .........................MainViewController...........................
    ....ModalViewController1.....ModalViewController2....
    I originally tried to make the MainViewController/ModalViewController1/2 NSCoding compliant, so when my app terminates it archives MainViewController, which will then go on to archive its modal view controller (and they archive the backed instance). I was then going to restore the MainViewController when my application restarts, presenting the correct modal view controller within its initWithCoder: method, but it didn't really go to plan. I got errors from encoding view controllers that contained UIImage's (I wasn't trying to encode the UIImage directly since it doesn't support NSCoding, but when I call [super encodeWithCoder:coder] the UIViewController seems to try and encode them).
    Am I going about this the right way and just messing something up or is there a different, more correct approach?
    Thanks for your time,
    -Ross

    hai,
    please inform me about how to save object state using RMS in mobile game.

  • [iPhone SDK] Several modal views

    Hello Professionals,
    I have some problems with managing several modal views. So imagine that I have tabBarController with several bars. Then I create another one UIViewController with 2 buttons and display it on top of my tabBarController with help of presentModalViewController method. When I press on one of two buttons I dismiss the first one controller by calling dismissModalViewControllerAnimated and immediately after that create the second controller and display it on the screen (again with help of presentModalViewController). The first controller disappears fine but the second one does not show on the screen at all. tabBarController displays instead of second view controller. What's wrong?
    Thanks.

    Okay, I've run into this same issue. In my case I'm popping up a modal controller to allow a user to enter authentication credentials and then dismissing the modal controller when they select a "login" button. But, if they enter incorrect information, then I pop up a new authentication modal controller to allow the user to correct their authentication credentials. Unfortunately this happens fast enough that the old controller hasn't dismissed yet (using animated:YES) and the attempt to present the new modal controller fails (I presume that the "pending" dismiss zaps both the old modal controller and the new one I was attempting to present).
    So, how does one "wait" for the old modal view controller to finish being dismissed???
    Casey

  • Problem responding to view being popped from navigation controller

    I have a detail view controller which is pushed onto the application's navigation controller stack by a given parent controller. The user is able to select table values in the detail controller, which should update the parent controller when, and only when, the detail view is popped and the parent view is made visible again.
    Is there a way to do this? I couldn't see any appropriate methods in UIViewController which would be called when the child view is popped. I've tried to make the parent controller conform the UINavigationControllerDelegate protocol and provided an implementation for willShowViewController method, but this method doesn't seem to get called when the view is displayed.
    I'm not sure if I'm going about it the right way trying to implement the UINavigationControllerDelegate and there is a bug with my implementation, or there are better ways to go to implement this functionality, such as using a modal controller, etc.

    m_userName wrote:
    The user is able to select table values in the detail controller, which should update the parent controller when, and only when, the detail view is popped and the parent view is made visible again.
    I don't understand why you require the update to be made only when the detail controller is popped, since during the time the detail controller is on top of the stack, the controller underneath isn't visible. It's common practice to pass data to the previous controller any time before the top controller is popped. Note that there's only a short interval between the time the top controller is removed from the stack and the time it's deallocated (unless you've retained that controller elsewhere, which should be avoided for best memory management).
    That said, [viewDidDisappear:|http://developer.apple.com/library/ios/documentation/UIKit/R eference/UIViewControllerClass/Reference/Reference.html#//appleref/doc/uid/TP40006926-CH3-SW20] is called during that interval, so I think it would be a good choice for the requirement you described:
    - (void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
    if (self.navigationController == nil) {
    NSLog(@"%s: *POPPED* level=%d", _func_, level);
    // pass the data here
    The test for a nil navigationController pointer tells us whether the controller is actually off the stack when viewDidDisappear: runs. This is useful in case an instance of this controller class ever pushes another controller on top of it, since viewDidDisappear: will run in that situation as well. But in that case the controller doing the pushing remains on the stack, so its navigationController property won't be nil. If that property is nil when viewDidDisappear: runs, we know self has just been popped.
    You can also find the above example in [Problem with text in detailTextLabel of UITableViewCell |http://discussions.apple.com/message.jspa?messageID=12495708#12495708], so if you build the code in that thread you can see how things work together.
    - Ray

  • Weird event display problem in week view

    Hi. I'm getting a weird display problem in week view. First time this has ever happened.
    Some events appear to be missing, but when i double click on where I know the event is supposed to be, a new event is created (as excepted), and the missing events suddenly appear. When i move forward or back by a week, and then return to the week in question, the missing events are gone again. But, I can see the missing events in day view or month view.
    Any ideas?

    Dean,
    Next, try reinstalling the Mac OS X v10.6.2 Update (Combo).
    If that is unsuccessful:
    1. Use iCal>Export...>for each one of your individual calendars.
    2. Delete all but one of your calendars.
    3. Create a calendar and name it "Test."
    4. Delete the calendar which remained after step #2.
    5. Quit iCal.
    6. Remove the iCal plist, and drag the iCal plist file to your Desktop.
    7. Log out/in or restart.
    8. Restart iCal and use iCal>File>Import...for each one of the calendars that you exported in step #1.
    9. Delete the "Test" calendar, and any "Home/Work" calendar which was automatically created when you opened iCal in step #8.
    ;~)

  • TP CONFIGURATION PROBLEM ( While creating a View Controller in Component )

    Hi All,
         I have a problem in TP Config while creating a View Controller in a component i am getting this Exception 
        Parameter lsm(&1) not in version 0004(&2) of tp configuration .
        This Exception Raised from this Function Module : RS_ACCESS_PERMISSION
    Any on can please help me to come out of this issue.
    Regards And Thank you,
    Nirmala.K

    Sounds like you should be using one of the Apps forums, perhaps {forum:id=210}

  • Problem in dispay of all the content(code) in view controller in NWDS

    Hi,
    when I am opening a view by double clicking it and clicking on implementation tab,all the contents in that view controller is coming properly.
    But  when I am clicking on a particular method in the outline view,then only the implementation of that method is coming and all the other contents are missing.
    Can anyone say,what can be the problem and the solution to it.

    Hi Robert
    I am able to open the view by double clicking on the view.
    and also I am able to see all the code implementation(for example.wdDoIniti,wdDoModifyView,wdDoExit..all other methods).
    In the outline view ,on click of one method(let say wdDoInit),the cursor should come to that particular method(means here wdDoInit) and also we should see all other method  implementations by scrolling on the editor.
    The problem is
    in my case this is not happening. while I am selecting a method(if it is wdDoInit) in the outline view then i can see only the implementation of that method(means here wdDoInit) and all other implementation is missing.
    But it was working fine before.Today I am facing this problem.
    May be unknowingly, I have changed some setting but unable to catch where?

  • UINavigationBar not displaying items for root view controller

    Hi,
    I've stumbled on something that has me completely stumped.
    This works: Add a UINavigationItem and UIBarButtonItems to a .xib (linking up the necessary outlets), push the view controller on to a navigation controllers stack. Result: You see the title and buttons on the nav bar correctly displayed.
    This doesn't work: Repeat the same process, but put these items in the root view controller of a navigation controller.
    The fix: Disconnect the UINavigationItem from the root view controllers "File's Owner" navigationItem outlet, override viewDidLoad in the root view controller class; and programatically set the items there.
    What am I missing? Why does the technique for configuring nav bar items work for additional view controllers pushed on to an existing navigation controllers stack, but not if the view controller is the root view controller? I have a sample project demonstrating this if this doesn't make sense!
    Thanks

    Hi,
    I've stumbled on something that has me completely stumped.
    This works: Add a UINavigationItem and UIBarButtonItems to a .xib (linking up the necessary outlets), push the view controller on to a navigation controllers stack. Result: You see the title and buttons on the nav bar correctly displayed.
    This doesn't work: Repeat the same process, but put these items in the root view controller of a navigation controller.
    The fix: Disconnect the UINavigationItem from the root view controllers "File's Owner" navigationItem outlet, override viewDidLoad in the root view controller class; and programatically set the items there.
    What am I missing? Why does the technique for configuring nav bar items work for additional view controllers pushed on to an existing navigation controllers stack, but not if the view controller is the root view controller? I have a sample project demonstrating this if this doesn't make sense!
    Thanks

  • Problems connecting to Wi-Fi network via 3G and 3Gs (due to modal view?)

    I am trying to connect to a protected network via Wi-Fi using two different devices - a 3G (running 3.0) and a 3Gs. This is a corporate network and is only allowed to visit certain websites that are closed off to the outside world. I don't know the exact type of network configuration, but I am unable to connect to sites such as Google, apple.com, etc.
    In both cases, when I choose the network in the settings app, I first see an activity indicator that clues me in to a connection being established. Then, after a moment a modal view slides up that is titled "Log In", and according to the text above the title it is going to http://www.apple.com As said above, if this is truly the case it would be a problem for me since I can't visit apple.com. So I see an error page served up by my network, and I am disconnected.
    Why is this even going to apple.com? Is the modal view some kind of new feature? Is there anyway to disable it? Note that I am not having this problem using an iPhone 3G or iPod Touch using 2.2.1
    Message was edited by: Brian Papa

    Sun Mar 28 06:02:24 unknown Preferences[292] <Warning>: wifi handler: (null)
    Sun Mar 28 06:02:27 unknown kernel[0] <Debug>: AppleBCMWLAN::setASSOCIATE() [configd]: lowerAuth = AUTHTYPE_OPEN, upperAuth = AUTHTYPE_NONE, key = CIPHER_NONE, flags = 0x0
    Sun Mar 28 06:02:27 unknown configd[22] <Error>: WiFi:[//////////////////>: Failed to associate with Internet: 5
    Sun Mar 28 06:02:27 unknown kernel[0] <Debug>: AppleBCMWLANJoinManager::join(): No such network: "Internet"
    Sun Mar 28 06:02:27 unknown Preferences[292] <Warning>: WiFiManagerAssociationCallback: err(5), err(00000005)
    This is what I get on the Iphone configuration utility debug console. I edited out just a couple of numbers in case this is sensitive information the company wouldn't want me to share.
    Message was edited by: F-22

  • 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.

  • Display thumbnail view of user profile photo in UIview

    I am developing an application where i have to access user profile data from server in XML format, which contains user profile image url also. My problem is that i have to display the photos in a grid like format on the view controller (eg 4 images in a column and 5 rows i.e 20 images) and when a user clicks on the photo he will be displayed with next screen containing profile detail information. Well I am new, please help.

    canitnow wrote:
    >
    >
    > Is there anyway to display a Flash Library in a
    thumbnail view?
    > thanks
    No there is no such option.
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • 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];

  • Data Controls Missing From View Controller Tab

    Good Afternoon,
    I have researched for hours over the internet and this forum but have not found an answer. My problem is this:
    I am using JDeveloper Studio Edition Version 11.1.2.1.0. In my ViewController project no Data Controls are displayed in the Data Controls tab. No matter what I do they are not coming back. I have refreshed, closed, and re-deployed multiple times (As well as multiple other attempts!). I also checked the DataBindings.cpx file. I have been having this problem for DAYS.
    When I try to run my page I get the following exception:
    Error processing viewId: /home URI: /WEB-INF/pages/home.jspx actual-URI: /fragments/myTask/myTaskEdit.jsff.
    oracle.jbo.NoObjException: JBO-25003: Object TaskAMDataControl of type DataControl is not found.
    Does anyone know what to do to have the DataControls display in the Data Controls tab of the View Controller again?
    Kind Regards
    n0vice

    n0vice, is the model project holding the TaskAMDataControl part of the same workspace?
    If yes, open the viewControllers project properties and select the 'dependencies' node. There you should see the model jpr file in the 'dependend projects or archives' section. If not click the pencil and add it.
    Timo

Maybe you are looking for