CNN iOS アプリをダウンロードしたら、すばらしいメニューが表示されました。
2画面投稿します
今、私は自分のアプリケーションでそれを作成する方法を尋ねています。私はiOSとAndroidで開発しますが、Android用の同じアプリケーションにはそのメニューがありません..
このメニューを Andorid で作成することは可能ですか? それを作成するためのアドバイスはありますか?
前もって感謝します
解決策: listiview を使用して 1 つのビューを作成し、背景写真を使用して 1 つのボタンを作成します。ビューを画面の外に出すよりも。ビューが x = 320 y = 300 の場合、ボード要素の位置設定で y = -300 を設定し、ボタンを上隅に配置します。ボタン アクションで、y = +300 の 2 つのグラフィック オブジェクトのアニメーションを作成します。それで全部です。
- (IBAction)makeTheMagicWithButton:(id)sender {
//at first click y + 300 and view comes in
//at the 2nd click y - 300 and return back out the screen
float y;
[sender setSelected:![sender isSelected]];
if ([sender isSelected]) {
y = +300;
self.buttonImage = [UIImage imageNamed:@"menuICONSreturn.png"];
} else {
y = -300;
self.buttonImage = [UIImage imageNamed:@"menuICONS.png"];
}
//animation move the view
[UIView transitionWithView:self.view duration:0.5 options:UIViewAnimationOptionAllowAnimatedContent animations:^{[self.magicView setFrame:CGRectOffset(self.magicView.frame, 0, y)];}
completion:nil];
//animation move button menu
[UIView transitionWithView:self.view duration:0.5 options:UIViewAnimationOptionAllowAnimatedContent animations:^{[self.magicButton setFrame:CGRectOffset(self.magicButton.frame, 0, y)];}
completion:nil];
//change icon
[self.magicButton setBackgroundImage:self.buttonImage forState:UIControlStateNormal];
}
それが誰かを助けることを願っています..