외규장각 도서 환수 모금 캠페인

UIBarButtonItem *rightButton = [[UIBarButtonItem allocinitWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(rightButtonAction:)];

    self.navigationItem.rightBarButtonItem = rightButton;



iPad

UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];

            UIPopoverController *popOver = [[UIPopoverController alloc] initWithContentViewController:imagePickerController];

            popOver.delegate =self;

            

            [popOver presentPopoverFromRect:CGRectMake(self.view.frame.size.width, 0, 0, 0) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];



iPhone

- (void)rightButtonAction:(id)sender {

    UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"What" otherButtonTitles:nil, nil];

    [actionSheet showInView:self.view];

    [actionSheet release];

}


-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {

    UIImagePickerController *picker = [[UIImagePickerController alloc] init];

    picker.delegate = self;

    switch (buttonIndex) {

        case 0:

        {

            picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

            [self presentModalViewController:picker animated:YES];

        }

            break;

            

        default:

            break;

    }

}

Posted by 닉네임영역
,


사랑합니다. 편안히 잠드소서