UIWebView 网页图片上传报错

2 篇文章 0 订阅
1 篇文章 0 订阅

错误信息为:

2016-03-24 10:57:38.206 ----------[19720:1554725] Passed in type public.item doesn't conform to either public.content or public.data. If you are exporting a new type, please ensure that it conforms to an appropriate parent type.

2016-03-24 10:57:38.409 ----------[19720:1554725] the behavior of the UICollectionViewFlowLayout is not defined because:

2016-03-24 10:57:38.409 ----------[19720:1554725] the item width must be less than the width of the UICollectionView minus the section insets left and right values, minus the content insets left and right values.

2016-03-24 10:57:38.411 ----------[19720:1554725] The relevant UICollectionViewFlowLayout instance is <_UIAlertControllerCollectionViewFlowLayout: 0x140cb6e70>, and it is attached to <UICollectionView: 0x14000da00; frame = (0 44; 10 0); clipsToBounds = YES; gestureRecognizers = <NSArray: 0x140be5990>; animations = { bounds.origin=<CASpringAnimation: 0x140cb5b20>; bounds.size=<CASpringAnimation: 0x140cc3900>; position=<CASpringAnimation: 0x14083de00>; }; layer = <CALayer: 0x140cb73a0>; contentOffset: {0, 0}; contentSize: {0, 0}> collection view layout: <_UIAlertControllerCollectionViewFlowLayout: 0x140cb6e70>.

2016-03-24 10:57:38.411 ----------[19720:1554725] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.

2016-03-24 10:57:41.846 ----------[19720:1554725] Warning: Attempt to present <UIImagePickerController: 0x13fabb800> on <UITabBarController: 0x140abfba0> whose view is not in the window hierarchy!


从网上找的资料:

1.  http://stackoverflow.com/questions/26376940/upload-photo-with-uiwebview

2.  http://stackoverflow.com/questions/25942676/ios-8-sdk-modal-uiwebview-and-camera-image-picker


测试的webview加上这段代码可以。但是我这个不行。

-(void)dismissViewControllerAnimated:(BOOL)flag completion:(void (^)(void))completion
{
    if ( self.presentedViewController)
    {
        [super dismissViewControllerAnimated:flag completion:completion];
    }
}

因为我一开始做了一个UINavigationController控制页面,然后直接presentViewController一个tabBarController在上面 

加这段代码不行。
把presentViewController改成navigationController pushViewController就可以了。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值