On iOS 13, changing layout margins of a private view is not allowed. So, expanding the frame to eliminate the layout margins can be an alternative solution.
GKNavigationBar.m中的这段代码要改下了。
// 设置导航item偏移量
if (GKDeviceVersion >= 11.0 && !GKConfigure.gk_disableFixSpace) {
self.layoutMargins = UIEdgeInsetsZero;
for (UIView *subview in self.subviews) {
if ([NSStringFromClass(subview.class) containsString:@"ContentView"]) {
// 修复iOS11 之后的偏移
subview.layoutMargins = UIEdgeInsetsMake(0, self.gk_navItemLeftSpace, 0, self.gk_navItemRightSpace);
break;
}
}
}
On iOS 13, changing layout margins of a private view is not allowed. So, expanding the frame to eliminate the layout margins can be an alternative solution.
GKNavigationBar.m中的这段代码要改下了。