iOS的11和Objective-C警告进口的SWIFT 4.0

iOS的11和Objective-C警告进口的SWIFT 4.0

应用通过桥接-Header.h 现在我已经在Objective-C的导入文件中的错误有更新之前没有问题SWIFT 4.0通过:SWIFT 4.0; xCode 9.1。

我在这里问大家的同样问题的唯一原因 - 所有其他答案都是关于SWIFT的。此错误位于OBJECTIVE-C文件中。这并不重要,程序运行良好,但如何解决错误(不隐藏)。

#pragma mark Containment view controller deployment and transition 

// Containment Deploy method. Returns a block to be invoked at the

// animation completion, or right after return in case of non-animated deployment.

- (void (^)(void))_deployForViewController:(UIViewController*)controller inView:(UIView*)view

{

if (!controller || !view)

return ^(void){};

CGRect frame = view.bounds;

UIView *controllerView = controller.view;

controllerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

controllerView.frame = frame;

if ([controllerView isKindOfClass:[UIScrollView class]])

{

BOOL adjust = controller.automaticallyAdjustsScrollViewInsets;

if (adjust)

{

[(id)controllerView setContentInset:UIEdgeInsetsMake(statusBarAdjustment(_contentView), 0, 0, 0)];

}

}

[view addSubview:controllerView];

void (^completionBlock)(void) = ^(void)

{

// nothing to do on completion at this stage

};

return completionBlock;

}

回答:

这与Swift没有任何关系。

随着错误消息状态,该物业的UIViewController automaticallyAdjustsScrollViewInsets已弃用的iOS 11.使用UIScrollView的contentInsetAdjustmentBehavior代替

以上是 iOS的11和Objective-C警告进口的SWIFT 4.0 的全部内容, 来源链接: utcz.com/qa/258097.html

回到顶部