我想知道是否有人可以協助我,我正在嘗試調整我的應用程序,以便它可以識別iPhone 5的全屏幕,但它現在可以在其他屏幕上正常工作,但是我的初始屏幕我遇到了問題,因爲我淡入淡出頂部和底部的酒吧,頂部工作正常,但底部沒有,任何人都可以幫助我的代碼來幫助我在iPhone 5上工作嗎?至於現在,酒吧是對iPhone 5的屏幕上太高,不淡出了人們的看法...iPhone 5隱藏在視圖中的酒吧佈局
- (void)barwillGo
{
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
[UIView animateWithDuration:0.5f
delay:0.0f
options:UIViewAnimationCurveEaseIn
animations:^{
CGRect top = CGRectMake(0, -51, 320, 50);
if (CGRectEqualToRect(topBar.frame,top))
{
[topBar setFrame:CGRectMake(0, 0, 320, 50)];
[bottomBar setFrame:CGRectMake(0, 430, 320, 50)];
}
else {
[topBar setFrame:CGRectMake(0, -51, 320, 50)];
[bottomBar setFrame:CGRectMake(0, 481, 320, 50)];
}
}
completion:nil];
}
else {
[UIView animateWithDuration:0.5f
delay:0.0f
options:UIViewAnimationCurveEaseIn
animations:^{
CGRect top = CGRectMake(0, -51, 768, 50);
if (CGRectEqualToRect(topBar.frame,top))
{
[topBar setFrame:CGRectMake(0, 0, 768, 50)];
[bottomBar setFrame:CGRectMake(0, 974, 768, 50)];
}
else {
[topBar setFrame:CGRectMake(0, -51, 768, 50)];
[bottomBar setFrame:CGRectMake(0, 1025, 768, 50)];
}
}
completion:nil];
}
}
精湛,感謝你,是一個很好的解決方案 - 真的再次感謝你幫我,謝謝:) – user1695971 2013-03-16 20:58:35