tabBar隐藏后会出现白条,请问高手如何解决
1个回答
2014-12-12 · 知道合伙人数码行家
huanglenzhi
知道合伙人数码行家
向TA提问 私信TA
知道合伙人数码行家
采纳数:117538
获赞数:517198
长期从事计算机组装,维护,网络组建及管理。对计算机硬件、操作系统安装、典型网络设备具有详细认知。
向TA提问 私信TA
关注
展开全部
和楼主有缘啊,正好调试到这,刚解决完。
- (void)hide:(BOOL)yesOrNO animated:(BOOL)animated
{
if (yesOrNO == YES)
{
if (self.frame.origin.y == self.originY - self.frame.size.height)
{
return;
}
}
else
{
if (self.frame.origin.y == self.originY)
{
return;
}
}
if (animated == YES)
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3f];
if (yesOrNO == YES)
{
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y + self.frame.size.height, self.frame.size.width, self.frame.size.height);
}
else
{
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y - self.frame.size.height, self.frame.size.width, self.frame.size.height);
}
[UIView commitAnimations];
}
else
{
if (yesOrNO == YES)
{
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y + self.frame.size.height, self.frame.size.width, self.frame.size.height);
}
else
{
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y - self.frame.size.height, self.frame.size.width, self.frame.size.height);
}
}
}
转载
- (void)hide:(BOOL)yesOrNO animated:(BOOL)animated
{
if (yesOrNO == YES)
{
if (self.frame.origin.y == self.originY - self.frame.size.height)
{
return;
}
}
else
{
if (self.frame.origin.y == self.originY)
{
return;
}
}
if (animated == YES)
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3f];
if (yesOrNO == YES)
{
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y + self.frame.size.height, self.frame.size.width, self.frame.size.height);
}
else
{
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y - self.frame.size.height, self.frame.size.width, self.frame.size.height);
}
[UIView commitAnimations];
}
else
{
if (yesOrNO == YES)
{
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y + self.frame.size.height, self.frame.size.width, self.frame.size.height);
}
else
{
self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y - self.frame.size.height, self.frame.size.width, self.frame.size.height);
}
}
}
转载
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询