taiyang2014

复制功能的实现

#pragma mark - copyCodeMethod

- (void)copyMethod:(UIButton *)button {
   
    if (button.tag == 7000) {
        UIPasteboard *pboard = [UIPasteboard generalPasteboard];
        pboard.string = content.text;
        NSLog(@"%@", pboard.string);
    }
   
    UIView *bigView = (UIView *)button.superview;
   
    for (int i = 0; i < self.codeArray.count - 1; i++) {
        if (button.tag == 5000 + i) {
            UILabel *conten = (UILabel *)[bigView viewWithTag:6000 + i];
                
                NSLog(@"%@", pboard.string);
           
        }
    }
}

posted on 2015-12-04 17:23  taiyang2014  阅读(140)  评论(0编辑  收藏  举报

导航