zoukankan      html  css  js  c++  java
  • 复制文字,链接,剪贴板的使用

    //获取剪贴板

            UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];

            //设置剪贴板内容

            pasteboard.string = [defaults objectForKey:@"shareURL"];

            if (pasteboard.string) {

                _alertView = [[AlertView alloc] initWithFrame:CGRectMake((UIScreen_width-(UIScreen_width/320)*150)/2, (UIScreen_width/320)*220, (UIScreen_width/320)*150, (UIScreen_width/320)*30)];

                [_alertView createAlertViewWithTitle:@"已复制到粘贴板" delayInSeconds:2 completion:^{

                    [_alertView removeFromSuperview];

                }];

                [self.view addSubview:_alertView];

            } else {

                _alertView = [[AlertView alloc] initWithFrame:CGRectMake((UIScreen_width-(UIScreen_width/320)*150)/2, (UIScreen_width/320)*220, (UIScreen_width/320)*150, (UIScreen_width/320)*30)];

                [_alertView createAlertViewWithTitle:@"复制失败" delayInSeconds:2 completion:^{

                    [_alertView removeFromSuperview];

                }];

                [self.view addSubview:_alertView];

            }

  • 相关阅读:
    The Country List
    hdoj1215--七夕节(数学)
    Poj 1654--Area(叉积)
    Poj2229--Sumsets(递推)
    数据预处理 center&scale&box-cox
    caret 分类回归树 用法
    ensemble 的2篇入门 文章
    数组 array 矩阵 list 数据框 dataframe
    R list frame, matrix
    R 如何 隐藏坐标轴
  • 原文地址:https://www.cnblogs.com/OIMM/p/5096560.html
Copyright © 2011-2022 走看看