我使用以下代码为我创建图像 UITabBarItem
self.tabBarItem.image = [UIImage imageNamed:@"tab_img.png"];
Run Code Online (Sandbox Code Playgroud)
tab_img.png由黑色,白色和清晰的颜色组成.但在应用程序中,黑白图像的所有部分都变为灰色.我怎么能把这个灰色变成白色?


如何改变的大小宽度UIImagePickerController上iPad?我可以改变高度,所以它是700但不能改变宽度,它仍然是320.我的代码.
UIImagePickerController* imagePicker=[[UIImagePickerController alloc]init];
imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imagePicker.delegate=self;
CGRect myRect = CGRectMake(imagePicker.view.frame.origin.x, imagePicker.view.frame.origin.y, 720, 700);
imagePicker.view.frame = myRect;
self.popover = [[UIPopoverController alloc] initWithContentViewController:imagePicker];
myRect = CGRectMake(100, 880, 900, 900);
CGRect re2 = CGRectMake(0,0,800,800);
[self.popover setPopoverContentSize:re2.size];
[self.popover presentPopoverFromRect:[self.view bounds] inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
[self.popover presentPopoverFromRect:myRect inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
[self.popover setPopoverContentSize:re2.size];
Run Code Online (Sandbox Code Playgroud) objective-c uiimagepickercontroller ipad uipopovercontroller ios