Note that there are some explanatory texts on larger screens.

plurals
  1. POSwitching into my app causes pasteboard to clear. iPad Paste button won't appear sometimes
    primarykey
    data
    text
    <p>I'm having a really strange issue with the Pasteboard, and I'm looking for suggestions:</p> <p>When switching into my app to paste some text, the text in the pasteboard sometimes gets cleared, so when I try to paste there is nothing in the pasteboard anymore. Switching and pasting in other apps are fine, so something is unique about my app. </p> <p>heres a video of the problem (simulator) and the weird work around i've found. <a href="http://screencast.com/t/ID57TikvFOD" rel="nofollow">http://screencast.com/t/ID57TikvFOD</a></p> <p>Example: if i am in mail, copy some text, and then double tap home and switch to my running app, the paste option almost never appears. When i go to my input box and press-and-hold, the Paste button never appears. Oddly, this behavior is not consistent as it <strong>sometimes</strong> works. I'd guess about 20% of the time it works and 80% of the time the pasteboard is cleared. I thought it might be a memory warning clearing the pasteboard, so I watched my iPad with "activity monitor" in instruments and I dont see any memory warnings. </p> <p>This is driving me nuts. I can repro the same inconsistency in my iOS 5 ipad, as well as 4.2 and 5.0 simulators. My customer is running 4.2 and the work-around i've found (double switching) doesn't work for him. </p> <p>In my code, the only time i ever reference the pasteboard i'm just putting things in it. i never clear it. </p> <pre><code>- (IBAction)copyToClipboard:(id)sender { UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; pasteboard.string = currentCard.concept.chineseWord; [self._delegate dismissPopover]; </code></pre> <p>}</p> <p>Any idea what might be going wrong?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload