Questions tagged [uipasteboard]

UIPasteboard is used to store different types of data into iOS clipboard. We can store data of NSString, NSArray, UIImage, NSUrl, NSData into it and can retrieve the data into that particular format too.

263 questions
0
votes
2 answers

How to detect a Command C in my app (Swift)?

I have a calculator app written in Swift, and it's fully compatible with custom keyboard shortcuts. I'm trying call a method when the user presses Command + C, however, whenever I try to assign the following custom shortcut, it just doesn't…
ThiagoAM
  • 1,432
  • 13
  • 20
0
votes
1 answer

How to set audio data in UIPasteboard in IOS

I am using UIPasteboard class for copy the media file. Image is successfully added in the UIPasteboard but I can't set the audio data in the UIPasteboard. So anyone please help me, how do I add audio data in the UIPasteboard? Currently I am using…
Pankaj Sonava
  • 519
  • 4
  • 20
0
votes
1 answer

Getting error "Cannot connect to pasteboard server". Swift

I am working on custom keyboard extension app with Xcode 8.2.1 and Swift3. I want to paste an Image to UIPasteboard in swift. I am using the following code. let image = UIImage(named: imageName) UIPasteboard.general.image = image; But I am…
Shahid Iqbal
  • 2,059
  • 2
  • 21
  • 29
0
votes
0 answers

UIPasteboard not releasing it's used memory?

Code like this: NSData *data = [NSMutableData dataWithLength:20*1024*1024]; UIPasteboard* genePasteboard = [UIPasteboard generalPasteboardSwizzle]; genePasteboard.items = @[@{@"test":data}]; //P1 NSLog(@"%d", (int)[genePasteboard.items…
waitianlou
  • 563
  • 3
  • 15
0
votes
1 answer

How can i hook the UIPasteboard in UITextView?

I want hook the propery string in UIPasteboard, when it changes, i will do somethings. the property defined as: @property(nullable,nonatomic,copy) NSString *string I use method swizzle replace string to stringSwizzle, setString to setStringSwizzle…
waitianlou
  • 563
  • 3
  • 15
0
votes
1 answer

Tap once to copy UITextView text substring

Say you've got a UITextView populated with a chunk of text. When a user taps on a word within the text I want the app to copy (retrieve the string) that word immediately. In your knowledge, is there any practical way to do this? Side note: I looked…
m0rtimer
  • 2,023
  • 1
  • 25
  • 31
0
votes
1 answer

Issue with custom keyboard with images

I am working on iOS custom keyboard. In this I need to show stickers and gifs in the custom keyboard, I'm able to show the images on the keyboard, but the problem is, when user select an image from the keyboard I want to show it on the…
Ramakrishna
  • 712
  • 8
  • 26
0
votes
0 answers

How to monitor changes to UIPasteboard in real time?

I'm writing a keyboard APP , I want to get the text in pasteboard , so i use UIPasteboard and this function [UIPasteboard generalPasteboard]. - (void)viewDidLoad { [super viewDidLoad]; UIPasteboard *paste = [UIPasteboard…
好多余先生丶
  • 261
  • 1
  • 2
  • 9
0
votes
1 answer

UIPasteboard in extension keyboard is not working if Allow Full Access toggle is off?

In extension keyboard, UIPasteboard is not working if Allow Full Access toggle is FALSE in device settings. Also I didn't found any documents specially on it. Anyone please write here their experience related to the same.
Sunil Targe
  • 7,251
  • 5
  • 49
  • 80
0
votes
2 answers

Image loses quality when scaled

I know that when scaling down an image you have to expect some loss of quality, but when I assign an image to a UIButton of size (75,75) it has great quality. When I scale the image to size (75,75) for copy/paste using UIPasteboard it has really bad…
MSU_Bulldog
  • 3,501
  • 5
  • 37
  • 73
0
votes
2 answers

Removing contents of pasteboard at the app level

We are trying to control out pasteboard contents for our application. I have seen the way to create a custom text field and remove the ability that way, but I'm inquiring to find if there is a way to do it at the app level. I was trying to utilize…
James Cockerham
  • 399
  • 1
  • 3
  • 13
0
votes
0 answers

Copying Gif with UIPasteboard

I want to copy .gif images to clipboard, so as user can paste that gif images from application to mails, etc... I have tried : @import MobileCoreServices; NSData *data = [NSData dataWithContentsOfURL:[NSURL…
SussmanJ
  • 11
  • 3
0
votes
1 answer

How can I edit the text copied into UIPasteboard

I am trying to manipulate the text the user copied from a UILabel into the UIPasteboard but can't find an example.
Luca De Angelis
  • 227
  • 4
  • 12
0
votes
1 answer

UIPasteboard.generalPasteboard () is always << uninitialized >>

I want to copy an image to the UIPasteboard and paste it e.g. Into WhatsApp. But this is not working. If I test it on my device, the pasteboard is not set (old copy content) and ff I check it with the debugger, po pasteboard always prints <<…
Tobonaut
  • 2,245
  • 2
  • 26
  • 39
0
votes
1 answer

How to save a label's image to a UIPasteboard? Xcode

How can you save a label's image to a UIPasteboard / Clipboard in Objective C - Xcode 7.1? I've tried this code bellow, but it only copies the text. [UIPasteboard generalPasteboard].string = helloField.text; UIPasteboard *pasteboard = [UIPasteboard…
James
  • 47
  • 11