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];

            }

  • 相关阅读:
    2019 SDN上机第7次作业
    第01组 Beta冲刺(4/5)
    第01组 Beta冲刺(3/5)
    第01组 Beta冲刺(2/5)
    第01组 Beta冲刺(1/5)
    2019 SDN上机第6次作业
    2019 SDN上机第5次作业
    SDN课程阅读作业(2)
    第01组 Alpha事后诸葛亮
    第01组 Alpha冲刺(6/6)
  • 原文地址:https://www.cnblogs.com/OIMM/p/5096560.html
Copyright © 2011-2022 走看看