UITextField setText has no impact before first draw on screen

I have an interface that looks something like this:
@interface PresentationViewController : UIViewController {
IBOutlet UITextField *titleTextField;
I have another class that is connected to the PresentationViewController and displays its view. The code looks somehing like this;
- (void)showPresentationView {
[self presentModalViewController:presentationViewController animated:YES];
presentationViewController.titleTextField = @"Presentation title";
The view is displayed fine with the textfield, but the textfield is blank. I would have expected it be set to "Presentation title". If I dismiss the view and display it again, the title is set fine!
To me it seems like the titleTextField may not have been initialized when I try to set its value the first time.
The presentationViewController is connected to the PresentationViewController through the IB.
Can somebody please tell me what I am doing wrong.
Thank you.

On reconsideration, you don't actually need to synchronize two variables/fields.
Back to your original posting:
- (void)showPresentationView {
[self presentModalViewController:presentationViewController animated:YES];
In the first viewController, you have the variable that you want to use to control the title.
Make sure that is set before you call "presentModalViewController".
presentationViewTitle = @"Presentation title";
Now, in the viewDidLoad method of the presentationViewController, you can reference the original variable (presumed, it is a field defined in the original view controller)
self.titleTextField = self.parentViewController.presentationViewTitle;
The key here is the use of the view controller field, "parentViewController".
Check out the documentation...
Presenting Modal Views
modalViewController property
parentViewController property
modalTransitionStyle property
– presentModalViewController:animated:
– dismissModalViewControllerAnimated:

Similar Messages

  • AutocapitalizationType only has effect on the first set??!

    Anyone encountered using autocapitalizationType or autocorrectionType? It seems that setting of these properties of a UITextField only has effect on the first set. Once you start typing, you can't stop it. I'm not sure what is required to reset the bahviour. Any ideas?

    Changing it does not affect the passwords already set, but you can expire the passwords of your users and hence making them change their passwords. Which might cause a bit of anger (passwd -f <user>).
    .7/M.

  • Sequencing question: app requires IE settings change before first launch

    hi.
    I need to sequence an app that will open in IE.
    I did  a quick try, got some errors... Found later that it requires IE not above 9. I had 11.
    Sure I will try it again with right browser version and if necessary few tries. So in case of problem I can ask providing the errors
    But as preliminary question I want to ask an advice for the sequencing in the next installation scenario:
    1. Run msi (55MB package, so it is not just a shortcut)
    2. Before first launch, installation instruction requires to open IE and set "use username and password" for Internet and Intranet zones to YES.
    The question is would IE settings be captured during the installation and monitoring process if I will do it as required.
    Or it worth to set IE before starting sequencer, or I can set a registry for IE after editing Appv package after saving.
    Also, domain GPO can be used probably. But I know that I need to enter the app during monitoring.
    What will be appropriate to try?
    Thanks.
    "When you hit a wrong note it's the next note that makes it good or bad". Miles Davis

    I suggest that when you re-sequence you have the correct version of IE on your sequencing VM. Also, ensure IE has been launched before attempting to sequence to ensure any first run user settings are not going to be captured in your virtual package.
    Also, please take a look at this excellent article posted by Dan Gough around overriding Group Policy Settings and consider it's impact for what you may be trying to do:
    http://packageology.com/2014/02/overriding-group-policy-settings-app-v/
    PLEASE MARK ANY ANSWERS TO HELP OTHERS Blog:
    rorymon.com Twitter: @Rorymon

  • Serial number has been registered before!

    I bought a new macbook pro and was trying to register the product online. it is a sucsessful registration on the product. However when i try to update the MAC OS X to Lion, it cannot be updated and request to use the up-to-date program to submit some of the information.
    I did submit twice on the up-to-date program. Cause the first email was reflected that the attached receipt was illegible. Hence, i upload another with a more high and clear pixel jpg. by right it should be clear enough. It still doesn't work out.
    I call up to apple support to ask. With the Serial number check, found out that my serial number has been registered before with another person name, and is not under my name. moreover that the purchase date is on April 2011. Which cause my warranty to be expired on the April 2012.
    I very doubt that my macbook pro is not new. Or been used before and return to the store.
    DId anyone experience that same problem?

    If the item is brand new out of the box then it may just simply be someone accidentally registered their system serial with yours by spelling mistake (S instead of 5, B instead of 8, etc..)
    Best way to resolve this is just call AppleCare and provide them with your proof of purchase and the serial number, I'm sure they can sort it out if you get to the right department.
    Link:
    http://www.apple.com/support/contact/

  • After doing some editing in Lightroom I want to continue the edit in CS 5 but Lightroom is not exporting the edited version, this has not happened before, what am I doing wrong please? anybody

    After doing some editing in Lightroom I want to continue the edit in CS 5 but Lightroom is not exporting the edited version, this has not happened before, what am I doing wrong please? anybody

    You should be getting an error message that PS CS5 requires a higher version of ACR with two options "render using Lightroom" or "open anyway". You should choose the first option. If you are not seeing the error message then go to your Lightroom prefrences >General Tab> under Prompts> select "Reset all warning dialogs", then try the edit in function again. 

  • "XI demo examples must be configured before first use"

    Trying to execute the "Checking Flight Seat Availability" (Proxy-to-Proxy Communication) in Client 105 but there seems to be a problem. A new SAP screen states "XI demo examples must be configured before first use, Read the documentation under Help - Application Help", and unfortunately there is no content in the Help either. I am 100% sure that the example have been properly configured according to the Configuration Guide but obviously I have missed something. The BSP application in the SAP system of the Integration Server (client 105) has been activated.

    Hi,
    please check the following link.
    http://help.sap.com/saphelp_erp2005/helpdata/en/ae/fd773f12f14a18e10000000a114084/frameset.htm
    Please note the following points from SAP help. please note the sentence in bold wich states that you must create the configuration objects yourself. Since different customers have different requirements in an integration scenario, Integration Directory content is not shipped. It is the task of consultants and administrators to configure the data in the Integration Directory at the customer site
    The features of the demo examples include several complete integration scenarios and comprise the following parts:
    ·        Design objects in the Integration Repository
    The design objects are defined and shipped by SAP.
    ·        Configuration objects in the Integration Directory
    You must create the configuration objects yourself. SAP provides comprehensive recommendations to help you.
    ·        Example applications
    SAP has implemented example applications for the communication parties involved. These example applications also contain user interfaces. You use these to execute the demo examples.
    ·        Configuration guide
    Detailed configuration instructions for the standard configuration recommended by SAP are available for the demo examples. These describe all the steps required to configure the demo examples in detail. A basic knowledge of Process Integration is sufficient to be able to make the relevant configuration settings.
    ·        Documentation
    Besides the detailed configuration instructions, additional documentation is also available. This also describes how to use the individual demo examples and explains the technical concepts addresse
    Please award points for helpful answer.
    thanks
    sharmistha

  • I have 200  forms designed in Designer 7.1. If I upgrade my designer to ES4, will I face any potential issues? Any one has done it before? what challenges we might face?

    I have 100 forms designed in Designer 7.1. If I upgrade my designer to ES4, will I face any potential issues? Any one has done it before? what challenges we might face?

    Hi,
    A couple of problems we've had is Designer setting strict scoping on by default (it you added dynamic properties to JavaScript form objects as the garbage collection changed) and the way we used 'proto' elements (or form objects that show up under "reference nodes" in the hierarchy)
    These blogs might help
    http://forms.stefcameron.com/2008/10/28/target-version-tutorial/
    http://blogs.adobe.com/formfeed/2009/06/enforcing_strict_javascript.html
    Regards
    Bruce

  • How to download an app *not* from icloud that has been downloaded before with a different account?

    Greetings,
    If an app has been downloaded before even with an account other than the one I am signed in with, it shows the cloud icon and asks me for the password of the other account.
    How do I download it with the account I am currently logged in with?
    Thanks

    "I'm using the one on the computer, not the device."
    Well I said this is happening on an iPad. Reread what is happening from the beginning of the thread, and tell me if the instructions are correct for the iPad. Are you prompted for passwords from a different account that previously downloaded the app on the iPad?
    Again
    The app is Google Search.
    It is free.
    (I am always promoted for passwords for both free and paid apps.)
    The device is an iPad. That is why I posted this is the iPad discussion.
    I am logged in with my account, let's call it A. It shows account A next to Apple ID in the lower left of the Featured page.
    When I search for Google Search, and click the cloud download icon next next to the Google Search app, it prompts me for the password to a different account. Let's call it B.
    In the app store it shows a cloud download icon next to every app that has ever been downloaded on this iPad, regardless of whether it is account A, B, C, etc
    Have you tried logging in with a different account to test this?

  • TS1424 My Apple ID has been disabled, it won't let me updated my previous purchases. No reason for why it has been disabled or how to enable it again. I reset my password, security questions and billing info. Nothing- Anybody has seen this before?...

    My Apple ID has been disabled, it won't let me updated my previous purchases. No reason for why it has been disabled or how to enable it again. I reset my password, security questions and billing info. Nothing… I even called Apple SUpport 1-800 # and they said they can't help me...Anybody has seen this before?...

    You need to contact itunes support.
    http://www.apple.com/support/contact/
    There is NO telephone support for itunes.  Use the link above.

  • I just updated my 3G to 5.0 and most of my apps and contacts disappeared.  THis has never happened before.  How can I get it back to where it was?

    I just updated my 3GS to 5.0 and most of my apps and contacts disappeared.  THis has never happened before through many updates.  How can I get it back to where it was?
    I did a restore from backup but that did not change anything.
    I can see my apps in iTunes - it is like the update got some apps but not all, no contacts.
    Total waste of my Friday. 
    What steps can I take to bring the phone back.
    I know Steve is not smiling

    I got my contacts back by doing another restore!  Relief..
    But only a very few odd apps are showing up on the 3GS
    Any suggestions?

  • I downloaded several tv shows on my computer and attempted to drag and drop to my iPod touch.  I received an error message indicating that there was a problem syncing to my iPod.  What steps should I take next?  This has never happened before.

    I downloaded several tv shows on my computer and attempted to drag and drop to my iPod touch.  I received an error message indicating that there was a problem syncing to my iPod.  What steps should I take next?  This has never happened before.

    Force Quit .
    Press command + option + esc keys together at the same time. Wait.
    When Force Quit window appears, select the Safari if not already.
    Press Force Quit button at the bottom of the window.   Wait.
    Safari will quit.
    Relaunch Safari holding the shift key down.
    http://www.thesafemac.com/fbi-ransomware-virus-rampant/

  • Script for Document Footnote options change before first footnote above space.

    Hi hope u r all fine,
    Please help for this. I want to change the space in Document footnote option.
    That is Minimum space before first footnote = "12 pt"; and Rule above of First Footnote in Column should be Rule off.
    I need script for this.

    @hasvi – look up the properties and methods here:
    Jongware
    InDesign JavaScript Reference Guide
    http://www.jongware.com/idjshelp.html
    I recommend the chm files listed there for easy searchability.
    There is also a HTML version and a online version in HTML.
    Properties like footnoteFirstBaselineOffset, footnoteMinimumFirstBaselineOffset, ruleOn and ruleOffset with their possible values are documented here:
    http://jongware.mit.edu/idcs6js/pc_FootnoteOption.html
    To set the properties and their values you have to address the document.footnoteOptions:
    var myDoc = app.documents[0];
    myDoc.footnoteOptions.properties = {
        footnoteFirstBaselineOffset : FootnoteFirstBaseline.X_HEIGHT,
        footnoteMinimumFirstBaselineOffset : "12 pt",
        ruleOn : false
    Uwe

  • My icloud emails arent arriving most of the time and a few days ago my iphone and ipad started showing "Can't Get Mail" box. This has not happened before since I set up the iclud email address with the purchase of my ipad about a month ago.

    My icloud emails arent arriving most of the time and a few days ago my iphone and ipad started showing "Can't Get Mail" box. This has not happened before since I set up the iclud email address with the purchase of my ipad about a month ago.

    That's one of the weird things.. it recognizes it maybe 10% of the time. And usually, only after I do the two-button reset. Problem is.. since it won't charge above 2%, anytime I try to do a restore or anything like that using iTunes, my device shuts off and I lose whatever progress I'd made.
    So, an update... after reading through a bunch of similar complaints (there are literally 1000's of them so there's NO WAY this isn't somehow ios7 related, thanks a lot APPLE ) I decided to try a restore in recovery mode. After 3 hours and several disconnections... I ended up having to just set it up as a new iPad, as the restore did nothing. Weirdly though... as I was doing the restore in recovery mode.. I noticed I'd gotten up to a 10% charge.. higher than it's been since September, so after setting it up as a new device, I turned it off and plugged it in using the wall charger. 2 hours later and I was up to 38%. Still not great, as my iPad, before ios7 could've fully charged twice in the amount of time it took for me to now get 28% more of a charge. And that's with a fully cleaned out device.. so that really ***** and I'm now more confused than ever.
    But I'm gonna leave it overnight charging and see what I come up with tomorrow. Sadly, when I paid $600 for it in February, I never expected to have to play "wait and see" with it...

  • IOS7 upgrade has ruined messaging, huge delay in typing before characters appear in screen on iPhone 4

    IOS7 upgrade has ruined messaging, huge delay in typing before characters appear in screen on iPhone 4.  Anyone else experiencing this?

    I have the exact same issue right now!

  • So, I know this has been asked before. But, has anyone heard from Apple?

    So, I know this has been asked before, but I'm just looking to see if anyone had heard from Apple on this at all. The minimum volume on my iPod Classic 160gb is too high, and I can't lower it. (AKA when I kill the volume, I can still hear music).
    I called them today, but the rep was pretty useless. He even dropped the "well, just press pause" line on me. Took him a while to understand that when I'm in bed or studying, etc. the minimum volume is too loud, and I wanted to be able to set it lower.
    The best workaround I've found so far is to buy headphones with their own volume control, but I just can't help but feel that someone shouldn't have to by additonal gear after buying this thing on account of such a basic feature exclusion.
    Anyways, thanks for any help !

    Wow, easy there company boy!
    I've heard all of what you spit up before.  And for your point of "Well, in several cases, people have complained (here in these discussion pages), that they expect the volume to be zero when turned to minimum position" that kind of ties in to why Apple should fix this.
    And yeah....it's pretty much a given that "you and I have different interpretations of what constitues too loud" This is where the option to adjust the minimum volume comes in to play.  (I relly feel bad for you. Honestly. Having to live everyday of your life this way must be just brutal)
    The wording would be pretty simple too. " Be aware there are many instances of the minimum volume being too loud, so think twice before dropping a few hundred bucks on this"
    And, you're right. It is horrible to 'whine' about being ripped off and asking if there is a possible fix for the issue. I really do apologize for that. I should just suck it up and not voice my opinion that this is not fair to consumers, and Apple shouldn't fix a known issue with a product.
    I did reset & restore, I figured that was pretty much implied since I said I spoke to Support.
    And I am not at all surprised that you would say "I - for one - am not surprised that Apple might say, "simply hit the pause button"."  Again, I don't want it on muteReading your post made my eye twitch at least three times.
    This is exactly the reason I was resitant to post on a forum. But, I got a good laugh anyways. Thanks guy!

Maybe you are looking for