美文网首页
iOS 点击按钮复制文本

iOS 点击按钮复制文本

作者: Lee坚武 | 来源:发表于2020-10-10 10:08 被阅读0次
    UIPasteboard *pab = [UIPasteboard generalPasteboard];
            
            NSString *string = @"测试";
            
            pab.string = string;
     
            if (pab == nil) {
                [MBProgressHUD showError:@"复制失败"];
                
            }else
            {
                [MBProgressHUD showSuccess:@"已复制"];
            } 
    
    @property(nullable,nonatomic,copy) NSString *string __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
    @property(nullable,nonatomic,copy) NSArray<NSString *> *strings __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
    
    @property(nullable,nonatomic,copy) NSURL *URL __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
    @property(nullable,nonatomic,copy) NSArray<NSURL *> *URLs __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
    
    @property(nullable,nonatomic,copy) UIImage *image __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
    @property(nullable,nonatomic,copy) NSArray<UIImage *> *images __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
    
    @property(nullable,nonatomic,copy) UIColor *color __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
    @property(nullable,nonatomic,copy) NSArray<UIColor *> *colors __TVOS_PROHIBITED __WATCHOS_PROHIBITED;
    
    

    相关文章

      网友评论

          本文标题:iOS 点击按钮复制文本

          本文链接:https://www.haomeiwen.com/subject/efudpktx.html