iOS7 UIImagePickerController取消按钮消失 [英] iOS7 UIImagePickerController cancel button disappear

查看:253
本文介绍了iOS7 UIImagePickerController取消按钮消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

取消按钮错过了?!我怎样才能解决这个问题?非常感谢。

The Cancel button is miss?! How can I fix this? Thank you very much.

    if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypePhotoLibrary])
    {
        if(buttonIndex == 1)
        {
            self.ctr = [[UIImagePickerController alloc] init];
            self.ctr.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
            self.ctr.delegate = self;
            self.ctr.allowsEditing = YES;
            [self presentModalViewController:self.ctr animated:YES];
        }

    }

推荐答案

改变UIImagePickerController navigationBar.tintColor,应该没问题。

Just change the UIImagePickerController navigationBar.tintColor, it should be OK.

self.ctr.navigationBar.tintColor = [UIColor redColor];//Cancel button text color
[self.ctr.navigationBar setTitleTextAttributes:@{UITextAttributeTextColor: [UIColor blackColor]}];// title color

这篇关于iOS7 UIImagePickerController取消按钮消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆