Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabBar三个菜单,外加一个自定义Button,然后显示最右边,下面的距离没有平均分布 #36

Closed
ulongx opened this issue Apr 13, 2016 · 11 comments
Labels

Comments

@ulongx
Copy link

ulongx commented Apr 13, 2016

- (instancetype)plusButton {

PulishButtonSubClass *button = [[PulishButtonSubClass alloc] init];

[button setImage:[UIImage imageNamed:@"camera"] forState:UIControlStateNormal];
[button sizeToFit];

[button addTarget:button action:@selector(clickPublish) forControlEvents:UIControlEventTouchUpInside];

return button;


}
# pragma mark - CYLPlusButtonSubclassing

 (NSUInteger)indexOfPlusButtonInTabBar {
    return 3;
}
@ChenYilong
Copy link
Owner

求截图

@ulongx
Copy link
Author

ulongx commented Apr 13, 2016

发到你的QQ了

@ChenYilong
Copy link
Owner

我测试了下,是正常的。估计是你的button太小了。
enter image description here

你把这一行代码改下,

[button sizeToFit];

改成:

button.frame = CGRectMake(0.0, 0.0, w, h);

@ulongx
Copy link
Author

ulongx commented Apr 13, 2016

好的,我试试

@ulongx
Copy link
Author

ulongx commented Apr 13, 2016

谢谢,可以了,是按钮大小的问题,如果单是放一个照相机的图片,一般是多大的尺寸?

@ChenYilong
Copy link
Owner

这个要看设计图了吧,通常情况下,你可以写死 [UIScreen mainScreen].bounds.size.width / [CYLTabBarController allItemsInTabBarCount]

@ChenYilong
Copy link
Owner

你的app叫什么名字?

@ulongx
Copy link
Author

ulongx commented Apr 13, 2016

好的谢谢,App才开始。正在搭框架。嘿嘿

@bloodspasm
Copy link

十分有用(๑′ᴗ‵๑)

@GKman6657
Copy link

你好,请问plusButton中间的actionSheet 选中其中一个“拍照”,怎么push 到下一级controller?

ChenYilong pushed a commit that referenced this issue Aug 31, 2017
@Liyongcong
Copy link

谢谢,可以了,是按钮大小的问题,如果单是放一个照相机的图片,一般是多大的尺寸?

我现在也遇到这个问题了,用的最新版本,没有平分,不知道为啥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants