generalpasteboard

Pasteboard UIImage not using scale

一个人想着一个人 提交于 2019-12-22 17:49:58
问题 I am building a custom keyboard and am having trouble adding an image to the pasteboard and maintaining the appropriate scale and resolution with in the pasted image. Let me start with a screenshot of the keyboard to illustrate my trouble: So the picture of the face in the top left of the keyboard is just a UIButton with the original photo set to the background. When the button is pressed the image is resized with the following function: func imageResize(image:UIImage, size:CGSize)-> UIImage

Receiving UIPasteboard (generalPasteboard) notification while in the background

眉间皱痕 提交于 2019-12-03 17:02:37
问题 In there a way to do this? I register my object for UIPasteboardChangedNotification at launch time, but when sending it to the background and opening (for instance) Safari and copying some text, my handler never gets called. (I'm using just the simulator for now). I've used both: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pasteboardNotificationReceived:) name:UIPasteboardChangedNotification object:[UIPasteboard generalPasteboard]]; and: [[NSNotificationCenter

Receiving UIPasteboard (generalPasteboard) notification while in the background

*爱你&永不变心* 提交于 2019-12-03 06:04:55
In there a way to do this? I register my object for UIPasteboardChangedNotification at launch time, but when sending it to the background and opening (for instance) Safari and copying some text, my handler never gets called. (I'm using just the simulator for now). I've used both: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pasteboardNotificationReceived:) name:UIPasteboardChangedNotification object:[UIPasteboard generalPasteboard]]; and: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pasteboardNotificationReceived:) name