new DoricLayout bug fix

This commit is contained in:
王劲鹏
2020-04-30 18:48:30 +08:00
committed by osborn
parent 2e9459f80f
commit 0c6fa027b1
3 changed files with 7 additions and 7 deletions

View File

@@ -125,16 +125,19 @@ - (void)doric_navBar_setBackgroundColor:(UIColor *)color {
}
- (void)doric_navBar_setLeft:(UIView *)view {
[view.doricLayout apply:CGSizeMake(self.navigationController.navigationBar.width, self.navigationController.navigationBar.height)];
UIBarButtonItem *custom = [[UIBarButtonItem alloc] initWithCustomView:view];
self.navigationItem.leftBarButtonItem = custom;
}
- (void)doric_navBar_setRight:(UIView *)view {
[view.doricLayout apply:CGSizeMake(self.navigationController.navigationBar.width, self.navigationController.navigationBar.height)];
UIBarButtonItem *custom = [[UIBarButtonItem alloc] initWithCustomView:view];
self.navigationItem.rightBarButtonItem = custom;
}
- (void)doric_navBar_setCenter:(UIView *)view {
[view.doricLayout apply:CGSizeMake(self.navigationController.navigationBar.width, self.navigationController.navigationBar.height)];
self.navigationItem.titleView = view;
}