Asset - Extension [SOLVED] COPY / PASTE Extension request on iOS

camerakid

Member
UPDATE:

I have found that there is already an extension for this:
https://marketplace.yoyogames.com/assets/4250/copy-paste-ios-mac-android

Sorry for the post.

Hey Guys,

As I remember there used to be a session for extension requests but I did not find it anymore.

Can anyone help me create a small extension that would allow copy/paste button on iOS to use with GMS 2 projects?

As far as I have found in a forum this is the code that should be implemented in this extension but I have zero knowledge how to make a simple extension for GMS2:

https://stackoverflow.com/questions/8045970/how-to-do-copy-paste-function-programmatically-in-iphone

Code:
To copy from a button click:

- (IBAction)copy {
    UIPasteboard *pb = [UIPasteboard generalPasteboard];
    [pb setString:[textView text]];
}

To paste from a button click:

- (IBAction)paste {
    UIPasteboard *pb = [UIPasteboard generalPasteboard];
    textView.text = [pb string];
}
Thank you for any help.


Attila
 
Top