0
回答
iPhone中如何copy,cut,paste
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

-(IBAction)cut {
  [self copy];
  textPad.text = @"";
} 
 
-(IBAction)copy {
        NSString *copyString = [[NSString alloc] initWithFormat:@"%@",[textPad text]];
        UIPasteboard *pb = [UIPasteboard generalPasteboard];
        [pb setString:copyString];
}
-(IBAction)paste {
        UIPasteboard *pb = [UIPasteboard generalPasteboard];
        textPad.text = [pb string];
} 
 

 

代码一目了然,很简单吧。


原文链接:http://blog.csdn.net/favormm/article/details/6573349
<无标签>
举报
长平狐
发帖于5年前 0回/49阅
顶部