mirror of
https://github.com/purplecabbage/phonegap-plugins.git
synced 2026-04-24 03:00:11 -04:00
22 lines
514 B
Objective-C
22 lines
514 B
Objective-C
//
|
|
// ClipboardPlugin.m
|
|
// Clipboard plugin for PhoneGap
|
|
//
|
|
// Copyright 2010 Michel Weimerskirch.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "PhoneGapCommand.h"
|
|
#import "ClipboardPlugin.h"
|
|
|
|
@implementation ClipboardPlugin
|
|
|
|
-(void)setText:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options {
|
|
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
|
|
NSString *text = [arguments objectAtIndex:0];
|
|
|
|
[pasteboard setValue:text forPasteboardType:@"public.utf8-plain-text"];
|
|
}
|
|
|
|
@end
|