2012-07-22 3 views
0

어떻게 UIPasteboard에서 이미지를 얻을 수 있습니다. 사용자가 실제로 UIPasteboard에서 Nsdata를 얻을 수 있지만 실제로는이 코드를 uiimageview에 할당해야한다고 생각합니다. 어떻게하면됩니까? 도와 주셔서 감사합니다.복사 이미지 pdf 또는 uiwebview에서 IOS?

답변

0
NSData *data = // however you obtain the data 
UIImage *image = [[UIImage alloc] initWithData:data]; 
UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; 
[self.view addSubview:imageView]; 

더 나은 :

UIImage *image = [[UIPasteboard generalPasteboard] image]; 
UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; 
[self.view addSubview:imageView];