在日常开发中,我们会遇到一类问题就是保存qq号,并打开qq搜索好友,这里为了大家方便,通常都会将qq号帮助用户复制好在剪切板中,这里用到的技术就是UIPasteboard
UIPasteboard *pab = [UIPasteboard generalPasteboard];
NSString *string = @"测试";
[pab setString:string];
if (pab == nil) {
[MBProgressHUD showError:@"复制失败"];
}else{
[MBProgressHUD showSuccess:@"已复制"];
}
网友评论