自定义底部tool

2015-04-22  本文已影响77人  口袋海贼王_

自定义底部 tool 的时候设置自定义按钮,怎么都不显示:代码如下

XHPBottomButton*comBtn = [XHPBottomButtonbuttonWithType:UIButtonTypeCustom];

[self.viewaddSubview:comBtn];

comBtn.frame=CGRectMake(0,CGRectGetHeight(self.view.bounds) -49,CGRectGetWidth(self.view.bounds),49);

设置高度是49 ,y 轴为当前视图高度减去49 ,

设置如下代码搞定,看来自动布局还是吊.

comBtn.autoresizingMask=UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleWidth;

上一篇 下一篇

猜你喜欢

热点阅读