2013-12-23 2 views
-1

텍스트 필드와 레이블 3 개로 구성된 내 응용 프로그램에서 페이지를 인쇄하고 싶습니다. 문제는 종이에 나타나지 않도록 눌렀을 때 "인쇄"버튼을 숨기고 싶습니다.IOS에서 페이지 인쇄

누군가이 예제 코드를 보여줄 수 있습니까?

+0

nameofbuttton.hidden = YES; – logixologist

답변

0
[button addTarget:self action:@selector(printPage:) forControlEvents:UIControlEventTouchUpInside]; 

- (void)printPage:(id)sender 
{ 
    // Your print command code 
    // If you want to set the button visible again, you can implement completion handler callback using block implementation 
    ((UIButton *)sender).hidden = YES; 
}