Tôi có đoạn code sau đây:vấn đề UIImagePickerController iPad
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] initWithRootViewController:self];
imagePicker.delegate = self;
popover = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
[imagePicker release];
[popover presentPopoverFromRect:CGRectMake(100, 100.0, 0.0, 0.0)
inView:self.view
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
Nhưng điều này chỉ phá hủy các self.view
và không hiển thị gì cả. Khi tôi đặt inView: thành [self.view window]
bộ chọn ít nhất sẽ hiển thị. Nhưng nó vẫn loại bỏ self.view. Tôi phải làm gì để chế độ xem không biến mất?
Thx, tôi phải bị mù! – V1ru8