Cut and Paste Ad Pop-Up Code

Discussion in 'iOS Programming' started by roeik, Jan 8, 2010.

  1. roeik macrumors member

    Joined:
    Dec 25, 2008
    #1
    hi,

    I was wondering if anybody know if there is a cut-and-paste code that I can put in my app to display pop-up ads.

    I am thinking about adding my own ads but I am not sure how to do it.

    Thank you.
     
  2. rarindeed macrumors newbie

    Joined:
    Dec 28, 2009
    #2
    What do you mean by a pop up ad in the context of an iPhone app?
     
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    Probably the same technique to popping up any ol' UIView. That is, presentModalViewController.
     
  4. roeik thread starter macrumors member

    Joined:
    Dec 25, 2008
    #4
    well, I don't think modalviewcontroller is the way to go. I need a uiview on a separate thread, i think, that popins, dealyed for some time, and then pops out of the view.

    I saw a lot of apps doing it Any idea how to do it?

    Thanks,

    Roei
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #5
    The UI can only be updated on the main thread.

    Exactly what presentModalViewController:animated: does.

    Fairly easy to implement using an NSTimer.

    Hello dismissModalViewControllerAnimated:

    But I would suggest leaving it up to the user when they want the pop-up to go away (via a button, probably) rather than making that decision for them.
     

Share This Page